mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-14 12:37:32 +00:00
irqchip/gic-v3: Ignore disabled ITS nodes
[ Upstream commit 95a2562590
]
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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2d8d8d23c4
commit
c834b955d3
4 changed files with 8 additions and 0 deletions
|
@ -132,6 +132,8 @@ static int __init its_pci_of_msi_init(void)
|
||||||
|
|
||||||
for (np = of_find_matching_node(NULL, its_device_id); np;
|
for (np = of_find_matching_node(NULL, its_device_id); np;
|
||||||
np = of_find_matching_node(np, its_device_id)) {
|
np = of_find_matching_node(np, its_device_id)) {
|
||||||
|
if (!of_device_is_available(np))
|
||||||
|
continue;
|
||||||
if (!of_property_read_bool(np, "msi-controller"))
|
if (!of_property_read_bool(np, "msi-controller"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,8 @@ static void __init its_pmsi_of_init(void)
|
||||||
|
|
||||||
for (np = of_find_matching_node(NULL, its_device_id); np;
|
for (np = of_find_matching_node(NULL, its_device_id); np;
|
||||||
np = of_find_matching_node(np, its_device_id)) {
|
np = of_find_matching_node(np, its_device_id)) {
|
||||||
|
if (!of_device_is_available(np))
|
||||||
|
continue;
|
||||||
if (!of_property_read_bool(np, "msi-controller"))
|
if (!of_property_read_bool(np, "msi-controller"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
@ -3083,6 +3083,8 @@ static int __init its_of_probe(struct device_node *node)
|
||||||
|
|
||||||
for (np = of_find_matching_node(node, its_device_id); np;
|
for (np = of_find_matching_node(node, its_device_id); np;
|
||||||
np = of_find_matching_node(np, its_device_id)) {
|
np = of_find_matching_node(np, its_device_id)) {
|
||||||
|
if (!of_device_is_available(np))
|
||||||
|
continue;
|
||||||
if (!of_property_read_bool(np, "msi-controller")) {
|
if (!of_property_read_bool(np, "msi-controller")) {
|
||||||
pr_warn("%pOF: no msi-controller property, ITS ignored\n",
|
pr_warn("%pOF: no msi-controller property, ITS ignored\n",
|
||||||
np);
|
np);
|
||||||
|
|
|
@ -75,6 +75,8 @@ int __init its_fsl_mc_msi_init(void)
|
||||||
|
|
||||||
for (np = of_find_matching_node(NULL, its_device_id); np;
|
for (np = of_find_matching_node(NULL, its_device_id); np;
|
||||||
np = of_find_matching_node(np, its_device_id)) {
|
np = of_find_matching_node(np, its_device_id)) {
|
||||||
|
if (!of_device_is_available(np))
|
||||||
|
continue;
|
||||||
if (!of_property_read_bool(np, "msi-controller"))
|
if (!of_property_read_bool(np, "msi-controller"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue