Skip to content

[PW_SID:962664] RISC-V: Add ACPI support for IOMMU#410

Closed
linux-riscv-bot wants to merge 5 commits into
workflow__riscv__fixesfrom
pw962664
Closed

[PW_SID:962664] RISC-V: Add ACPI support for IOMMU#410
linux-riscv-bot wants to merge 5 commits into
workflow__riscv__fixesfrom
pw962664

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 962664 applied to workflow__riscv__fixes

Name: RISC-V: Add ACPI support for IOMMU
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=962664
Version: 1

Linux RISC-V bot and others added 5 commits May 13, 2025 10:51
ACPICA commit 73c32bc89cad64ab19c1231a202361e917e6823c

RISC-V IO Mapping Table (RIMT) is a new static table defined for RISC-V
to communicate IOMMU information to the OS. The specification for RIMT
is available at [1]. Add structure definitions for RIMT.

[1] - https://github.com/riscv-non-isa/riscv-acpi-rimt

Link: acpica/acpica@73c32bc8
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
RISC-V IO Mapping Table (RIMT) is a static ACPI table to communicate
IOMMU information to the OS. The spec is available at [1].

The changes at high level are,
	a) Initialize data structures required for IOMMU/device
	   configuration using the data from RIMT. Provide APIs required
	   for device configuration.
	b) Provide an API for IOMMU drivers to register the
	   fwnode with RIMT data structures. This API will create a
	   fwnode for PCIe IOMMU.

[1] - https://github.com/riscv-non-isa/riscv-acpi-rimt

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
acpi_iommu_configure_id() currently supports only IORT (ARM) and VIOT.
Add support for RISC-V as well.

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
RISC-V IO Mapping Table (RIMT) provides the information about the IOMMU
to the OS in ACPI. Add support for ACPI in RISC-V IOMMU drivers by using
RIMT data.

The changes at high level are,

a) Register the IOMMU with RIMT data structures.
b) Enable probing of platform IOMMU in ACPI way using the ACPIID defined
   for the RISC-V IOMMU in the BRS spec [1]. Configure the MSI domain if
   the platform IOMMU uses MSIs.

[1] - https://github.com/riscv-non-isa/riscv-brs/blob/main/acpi-id.adoc

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/4] ACPICA: actbl2: Add definitions for RIMT"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 107.79 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/4] ACPICA: actbl2: Add definitions for RIMT"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1167.10 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/4] ACPICA: actbl2: Add definitions for RIMT"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1548.47 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/4] ACPICA: actbl2: Add definitions for RIMT"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 21.38 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/4] ACPICA: actbl2: Add definitions for RIMT"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 22.17 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/4] ACPICA: actbl2: Add definitions for RIMT"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1503.12 seconds
Result: WARNING
Output:

CHECK: Prefer using the BIT macro
#81: FILE: include/acpi/actbl2.h:3050:
+#define ACPI_RIMT_IOMMU_FLAGS_PXM_VALID (1 << 1)

CHECK: Prefer using the BIT macro
#91: FILE: include/acpi/actbl2.h:3060:
+#define ACPI_RIMT_GSI_ACTIVE_HIGH       (1 << 1)

CHECK: Prefer using the BIT macro
#111: FILE: include/acpi/actbl2.h:3080:
+#define ACPI_RIMT_PCIE_PRI_SUPPORTED   (1 << 1)

total: 0 errors, 0 warnings, 3 checks, 95 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 a8042dc63bd9 ("ACPICA: actbl2: Add definitions for RIMT") 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, 0 warnings, 3 checks, 95 lines checked
CHECK: Prefer using the BIT macro


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/4] ACPICA: actbl2: Add definitions for RIMT"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 69.87 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/4] ACPICA: actbl2: Add definitions for RIMT"
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: "[1/4] ACPICA: actbl2: Add definitions for RIMT"
kdoc
Desc: Detects for kdoc errors
Duration: 0.91 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/4] ACPICA: actbl2: Add definitions for RIMT"
module-param
Desc: Detect module_param changes
Duration: 0.28 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/4] ACPICA: actbl2: Add definitions for RIMT"
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: "[1/4] ACPICA: actbl2: Add definitions for RIMT"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/4] ACPI: RISC-V: Add support for RIMT"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 107.67 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/4] ACPI: RISC-V: Add support for RIMT"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1011.07 seconds
Result: ERROR
Output:

Redirect to /build/tmp.H04N7QHewH and /build/tmp.SkY25QjZUL
Tree base:
a8042dc63bd9c ("ACPICA: actbl2: Add definitions for RIMT")
Building the whole tree with the patch
Building the tree before the patch
Building the tree with the patch
New errors added:
--- /build/tmp.P0JfovHukR	2025-05-14 08:01:18.583892332 +0000
+++ /build/tmp.Fb5mclQ4Em	2025-05-14 08:01:18.586892315 +0000
@@ -116,0 +117,2 @@
+      1 /build/tmp3wacm_ol/drivers/acpi/riscv/rimt.c:487:24: warning: variable 'fwspec' set but not used [-Wunused-but-set-variable]
+      1 /build/tmp3wacm_ol/drivers/acpi/riscv/rimt.c:93:38: warning: unused function 'rimt_get_rimt_node' [-Wunused-function]
Per-file breakdown
error/warning file pre:
error/warning file post:
pre: 116 post: 118



real	13m39.460s
user	508m17.326s
sys	101m0.128s

real	1m31.793s
user	2m52.290s
sys	2m12.711s

real	1m30.211s
user	2m53.177s
sys	2m11.641s

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/4] ACPI: RISC-V: Add support for RIMT"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1297.76 seconds
Result: ERROR
Output:

Redirect to /build/tmp.N2HC6AbHvb and /build/tmp.eXL96HqaDY
Tree base:
a8042dc63bd9c ("ACPICA: actbl2: Add definitions for RIMT")
Building the whole tree with the patch
Building the tree before the patch
Building the tree with the patch
New errors added:
--- /build/tmp.6yZFymcOd8	2025-05-14 08:22:57.356972513 +0000
+++ /build/tmp.OeWekJvLO4	2025-05-14 08:22:57.360972484 +0000
@@ -116,0 +117 @@
+      1 /build/tmp3wacm_ol/drivers/acpi/riscv/rimt.c:487:38: warning: variable 'fwspec' set but not used [-Wunused-but-set-variable]
Per-file breakdown
error/warning file pre:
pre: 116 post: 117



real	18m1.629s
user	677m24.343s
sys	118m24.791s

real	1m45.271s
user	2m54.383s
sys	2m4.042s

real	1m40.857s
user	2m50.609s
sys	2m4.191s

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/4] ACPI: RISC-V: Add support for RIMT"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 21.00 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/4] ACPI: RISC-V: Add support for RIMT"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.92 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/4] ACPI: RISC-V: Add support for RIMT"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 3.13 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/4] ACPI: RISC-V: Add support for RIMT"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 69.71 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/4] ACPI: RISC-V: Add support for RIMT"
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 2: "[2/4] ACPI: RISC-V: Add support for RIMT"
kdoc
Desc: Detects for kdoc errors
Duration: 1.17 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/4] ACPI: RISC-V: Add support for RIMT"
module-param
Desc: Detect module_param changes
Duration: 0.38 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/4] ACPI: RISC-V: Add support for RIMT"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/4] ACPI: RISC-V: Add support for RIMT"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.42 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/4] ACPI: scan: Add support for RISC-V in acpi_iommu_configure_id()"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 107.48 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/4] ACPI: scan: Add support for RISC-V in acpi_iommu_configure_id()"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 969.62 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/4] ACPI: scan: Add support for RISC-V in acpi_iommu_configure_id()"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1266.49 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/4] ACPI: scan: Add support for RISC-V in acpi_iommu_configure_id()"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 21.04 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/4] ACPI: scan: Add support for RISC-V in acpi_iommu_configure_id()"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 23.28 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/4] ACPI: scan: Add support for RISC-V in acpi_iommu_configure_id()"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.75 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/4] ACPI: scan: Add support for RISC-V in acpi_iommu_configure_id()"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 68.51 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/4] ACPI: scan: Add support for RISC-V in acpi_iommu_configure_id()"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/4] ACPI: scan: Add support for RISC-V in acpi_iommu_configure_id()"
kdoc
Desc: Detects for kdoc errors
Duration: 0.83 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/4] ACPI: scan: Add support for RISC-V in acpi_iommu_configure_id()"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/4] ACPI: scan: Add support for RISC-V in acpi_iommu_configure_id()"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/4] ACPI: scan: Add support for RISC-V in acpi_iommu_configure_id()"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.31 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[4/4] iommu/riscv: Add ACPI support"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 107.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[4/4] iommu/riscv: Add ACPI support"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 971.77 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[4/4] iommu/riscv: Add ACPI support"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1265.50 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[4/4] iommu/riscv: Add ACPI support"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 21.58 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[4/4] iommu/riscv: Add ACPI support"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 22.04 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[4/4] iommu/riscv: Add ACPI support"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.99 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[4/4] iommu/riscv: Add ACPI support"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 67.71 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[4/4] iommu/riscv: Add ACPI support"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[4/4] iommu/riscv: Add ACPI support"
kdoc
Desc: Detects for kdoc errors
Duration: 0.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[4/4] iommu/riscv: Add ACPI support"
module-param
Desc: Detect module_param changes
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[4/4] iommu/riscv: Add ACPI support"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[4/4] iommu/riscv: Add ACPI support"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.31 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot force-pushed the workflow__riscv__fixes branch 2 times, most recently from de90874 to 400e3f8 Compare May 14, 2025 13:11
@linux-riscv-bot linux-riscv-bot deleted the pw962664 branch May 22, 2025 01:04
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