Skip to content

[PW_SID:1124474] irqchip/ACPI: Arm GICv5 IWB ACPI IRQ probe deferral#2250

Closed
linux-riscv-bot wants to merge 8 commits into
workflow__riscv__fixesfrom
pw1124474
Closed

[PW_SID:1124474] irqchip/ACPI: Arm GICv5 IWB ACPI IRQ probe deferral#2250
linux-riscv-bot wants to merge 8 commits into
workflow__riscv__fixesfrom
pw1124474

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 1124474 applied to workflow__riscv__fixes

Name: irqchip/ACPI: Arm GICv5 IWB ACPI IRQ probe deferral
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1124474
Version: 4

Linux RISC-V bot and others added 8 commits July 8, 2026 17:32
Code clearing device dependencies in ACPI in drivers through

acpi_dev_clear_dependencies()

requires annoying ifdeffery to make sure it is compiled out on
!CONFIG_ACPI configurations.

Implement a wrapper function to clear device dependencies that can be used
in device drivers without conditional compilation.

Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
In riscv_acpi_add_irq_dep() the main loop condition would currently stop
the loop if an interrupt descriptor contains an interrupt for which the
respective GSI handle is NULL, which is not correct because subsequent
interrupts in the interrupt descriptor might still have a GSI dependency
that must not be skipped.

Rework riscv_acpi_add_irq_dep() and the riscv_acpi_irq_get_dep() call chain
to fix it - by not forcing the loop to stop in order to guarantee
dependency detection for all the interrupt entries in the CRS descriptor.

Fixes: 1b173cc ("ACPI: RISC-V: Implement function to add implicit dependencies")
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Tested-by: Sunil V L <sunilvl@oss.qualcomm.com>
Reviewed-by: Sunil V L <sunilvl@oss.qualcomm.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
In riscv_acpi_add_prt_dep(), the acpi_get_handle() call can fail which
would leave link_handle uninitialized.

Fix it by checking the acpi_get_handle() return status and skip the entry
if it fails.

Fixes: 1b173cc ("ACPI: RISC-V: Implement function to add implicit dependencies")
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Tested-by: Sunil V L <sunilvl@oss.qualcomm.com>
Reviewed-by: Sunil V L <sunilvl@oss.qualcomm.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The loop in riscv_acpi_add_prt_dep() includes error conditions that are
handled in a dubious - if not outright wrong - way, by continuining the
loop (which skips and misses the entry pointer update to point to the next
entry).

Rewrite the loop as a for loop (that handles the continuation correctly)
and wrap the condition and update statements using helper functions to make
it cleaner.

Fixes: 1b173cc ("ACPI: RISC-V: Implement function to add implicit dependencies")
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Tested-by: Sunil V L <sunilvl@oss.qualcomm.com>
Reviewed-by: Sunil V L <sunilvl@oss.qualcomm.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
RISC-V implements arch code to detect probe dependencies for devices and
the interrupt controller the devices GSIs are routed to.

The code itself is arch agnostic apart from an arch specific helper
function required to retrieve the acpi_handle of the interrupt controller
that manages the device GSI interrupt.

In order to enable IRQ probe dependencies detection on other architectures,
move RISC-V IRQ probe dependency detection code to generic ACPI IRQ code.

Allow interrupt controller drivers to register an arch specific function to
determine the acpi_handle for a specific GSI number to use the mechanism if
needed by the respective interrupt controller drivers.

Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Tested-by: Sunil V L <sunilvl@oss.qualcomm.com>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Anup Patel <anup@brainfault.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Cc: Marc Zyngier <maz@kernel.org>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
…ferral

Implement an IORT ACPI hook to retrieve the acpi_handle of the interrupt
controller handling a specific GSI (if any, on GICv5 systems only the IWB
is represented in firmware with an ACPI device object) and add the IWB to
the list of devices whose dependencies can be detected (and cleared) in
ACPI core to guarantee that probe dependencies for the IWB can be
satisfied.

Enable autodep detection for arm64 by adding the arch_acpi_add_auto_dep()
callback in the ACPI IORT driver.

Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Acked-by: "Rafael J. Wysocki" (Intel) <rafael@kernel.org> # ACPI: scan.c
Cc: Hanjun Guo <guohanjun@huawei.com>
Cc: Sudeep Holla <sudeep.holla@kernel.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Register an ACPI hook in the ACPI interrupt management code for GICv5 to
retrieve the ACPI interrupt controller handle (if any) of the controller
handling a specific GSI, by updating the acpi_set_irq_model() call with
the gic_v5_get_gsi_handle() function pointer parameter.

gicv5_get_gsi_handle() allows ACPI core to detect the ACPI handle
of the controller that manages a specific GSI interrupt.

Update the IWB driver to clear device dependencies in ACPI core once the
IWB driver has probed.

Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Acked-by: Thomas Gleixner <tglx@kernel.org>
Acked-by: Marc Zyngier <maz@kernel.org>
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 145.45 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1622.54 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 2033.10 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.11 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.29 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.77 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 85.98 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function"
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 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function"
kdoc
Desc: Detects for kdoc errors
Duration: 0.92 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function"
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/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 143.17 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1453.91 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1688.63 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.53 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 28.98 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.83 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 85.84 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination"
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/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination"
kdoc
Desc: Detects for kdoc errors
Duration: 0.89 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v4,2/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 6: "[v4,6/7] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.60 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 6: "[v4,6/7] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 28.17 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 6: "[v4,6/7] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.99 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 6: "[v4,6/7] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 86.18 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 6: "[v4,6/7] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral"
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 6: "[v4,6/7] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral"
kdoc
Desc: Detects for kdoc errors
Duration: 0.94 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 6: "[v4,6/7] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral"
module-param
Desc: Detect module_param changes
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 6: "[v4,6/7] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 6: "[v4,6/7] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 143.71 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1151.03 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1402.45 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.97 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.51 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.98 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 84.66 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection"
kdoc
Desc: Detects for kdoc errors
Duration: 0.87 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
linux-riscv-bot force-pushed the workflow__riscv__fixes branch 7 times, most recently from 56b6f30 to 8ca72ef Compare July 15, 2026 17:25
@linux-riscv-bot
linux-riscv-bot deleted the pw1124474 branch July 17, 2026 00:00
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.

1 participant