Skip to content

Commit 95a2562

Browse files
bebarinoMarc Zyngier
authored andcommitted
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. Cc: Stuart Yoder <stuyoder@gmail.com> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Rajendra Nayak <rnayak@codeaurora.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
1 parent 21ec30c commit 95a2562

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

drivers/irqchip/irq-gic-v3-its-pci-msi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ static int __init its_pci_of_msi_init(void)
132132

133133
for (np = of_find_matching_node(NULL, its_device_id); np;
134134
np = of_find_matching_node(np, its_device_id)) {
135+
if (!of_device_is_available(np))
136+
continue;
135137
if (!of_property_read_bool(np, "msi-controller"))
136138
continue;
137139

drivers/irqchip/irq-gic-v3-its-platform-msi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ static void __init its_pmsi_of_init(void)
154154

155155
for (np = of_find_matching_node(NULL, its_device_id); np;
156156
np = of_find_matching_node(np, its_device_id)) {
157+
if (!of_device_is_available(np))
158+
continue;
157159
if (!of_property_read_bool(np, "msi-controller"))
158160
continue;
159161

drivers/irqchip/irq-gic-v3-its.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3314,6 +3314,8 @@ static int __init its_of_probe(struct device_node *node)
33143314

33153315
for (np = of_find_matching_node(node, its_device_id); np;
33163316
np = of_find_matching_node(np, its_device_id)) {
3317+
if (!of_device_is_available(np))
3318+
continue;
33173319
if (!of_property_read_bool(np, "msi-controller")) {
33183320
pr_warn("%pOF: no msi-controller property, ITS ignored\n",
33193321
np);

drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ static int __init its_fsl_mc_msi_init(void)
7373

7474
for (np = of_find_matching_node(NULL, its_device_id); np;
7575
np = of_find_matching_node(np, its_device_id)) {
76+
if (!of_device_is_available(np))
77+
continue;
7678
if (!of_property_read_bool(np, "msi-controller"))
7779
continue;
7880

0 commit comments

Comments
 (0)