irqchip/gic-v3: Ignore disabled ITS nodes
Subsystems (4)
PATCH v2 1/1 irqchip/gic-v3: Ignore disabled ITS nodes
On some platforms there's an ITS available but it's not enabled because reading or writing the registers is denied by the firmware. In fact, reading or writing them will cause the system to reset. We could remove the node from DT in such a case, but it's better to skip nodes that are marked as "disabled" in DT so that we can describe the hardware that exists and use the status property to indicate how the firmware has configured things.
--- drivers/irqchip/irq-gic-v3-its-pci-msi.c | 2 ++ drivers/irqchip/irq-gic-v3-its-platform-msi.c | 2 ++ drivers/irqchip/irq-gic-v3-its.c | 2 ++ drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 2 ++ 4 files changed, 8 insertions(+)
drivers/irqchip/irq-gic-v3-its-pci-msi.c +2 -0
@@ -132,6 +132,8 @@ static int __init its_pci_of_msi_init(void)for (np =of_find_matching_node (NULL , its_device_id); np; np =of_find_matching_node (np, its_device_id)) { +if (!of_device_is_available (np)) +continue ;if (!of_property_read_bool (np,"msi-controller" ))continue ;
drivers/irqchip/irq-gic-v3-its-platform-msi.c +2 -0
@@ -154,6 +154,8 @@ static void __init its_pmsi_of_init(void)for (np =of_find_matching_node (NULL , its_device_id); np; np =of_find_matching_node (np, its_device_id)) { +if (!of_device_is_available (np)) +continue ;if (!of_property_read_bool (np,"msi-controller" ))continue ;
drivers/irqchip/irq-gic-v3-its.c +2 -0
@@ -3314,6 +3314,8 @@ static int __init its_of_probe(struct device_node *node)for (np =of_find_matching_node (node, its_device_id); np; np =of_find_matching_node (np, its_device_id)) { +if (!of_device_is_available (np)) +continue ;if (!of_property_read_bool (np,"msi-controller" )) {pr_warn ("%pOF: no msi-controller property, ITS ignored\n" , np);
drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c +2 -0
@@ -73,6 +73,8 @@ static int __init its_fsl_mc_msi_init(void)for (np =of_find_matching_node (NULL , its_device_id); np; np =of_find_matching_node (np, its_device_id)) { +if (!of_device_is_available (np)) +continue ;if (!of_property_read_bool (np,"msi-controller" ))continue ;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Marc Zyngier
AppliedQuoted 8 lines · Stephen Boyd
On some platforms there's an ITS available but it's not enabled because reading or writing the registers is denied by the firmware. In fact, reading or writing them will cause the system to reset. We could remove the node from DT in such a case, but it's better to skip nodes that are marked as "disabled" in DT so that we can describe the hardware that exists and use the status property to indicate how the firmware has configured things.
Quoted 6 lines
Cc Stuart Yoder <[email protected]>Cc Laurentiu Tudor <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Marc Zyngier <[email protected]>Cc Rajendra Nayak <[email protected]>Signed-off-by Stephen Boyd <[email protected]>
Queued, thanks Stephen.
M.
Signature · 1 line
Jazz is not dead. It just smells funny...