Skip to content

Commit

Permalink
irqchip/gic-v3: Ignore disabled ITS nodes
Browse files Browse the repository at this point in the history
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 <[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]>
Signed-off-by: Marc Zyngier <[email protected]>
  • Loading branch information
bebarino authored and Marc Zyngier committed Feb 16, 2018
1 parent 21ec30c commit 95a2562
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/irqchip/irq-gic-v3-its-pci-msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions drivers/irqchip/irq-gic-v3-its-platform-msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions drivers/irqchip/irq-gic-v3-its.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 95a2562

Please sign in to comment.