[PW_SID:1124474] irqchip/ACPI: Arm GICv5 IWB ACPI IRQ probe deferral#2250
[PW_SID:1124474] irqchip/ACPI: Arm GICv5 IWB ACPI IRQ probe deferral#2250linux-riscv-bot wants to merge 8 commits into
Conversation
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>
|
Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function" |
|
Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function" |
|
Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function" |
|
Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function" |
|
Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function" |
|
Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function" |
|
Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function" |
|
Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function" |
|
Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function" |
|
Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function" |
|
Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function" |
|
Patch 1: "[v4,1/7] ACPI: Add acpi_device_clear_deps() helper function" |
|
Patch 2: "[v4,2/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination" |
|
Patch 2: "[v4,2/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination" |
|
Patch 2: "[v4,2/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination" |
|
Patch 2: "[v4,2/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination" |
|
Patch 2: "[v4,2/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination" |
|
Patch 2: "[v4,2/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination" |
|
Patch 2: "[v4,2/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination" |
|
Patch 2: "[v4,2/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination" |
|
Patch 2: "[v4,2/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination" |
|
Patch 2: "[v4,2/7] ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination" |
|
Patch 6: "[v4,6/7] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral" |
|
Patch 6: "[v4,6/7] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral" |
|
Patch 6: "[v4,6/7] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral" |
|
Patch 6: "[v4,6/7] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral" |
|
Patch 6: "[v4,6/7] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral" |
|
Patch 6: "[v4,6/7] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral" |
|
Patch 6: "[v4,6/7] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral" |
|
Patch 6: "[v4,6/7] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral" |
|
Patch 6: "[v4,6/7] ACPI/IORT: Implement ACPI infrastructure to enable GICv5 IWB probe deferral" |
|
Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection" |
|
Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection" |
|
Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection" |
|
Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection" |
|
Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection" |
|
Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection" |
|
Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection" |
|
Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection" |
|
Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection" |
|
Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection" |
|
Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection" |
|
Patch 7: "[v4,7/7] irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection" |
56b6f30 to
8ca72ef
Compare
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