linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI/IORT: Fix PMCG node always look for a single ID mapping.
@ 2020-05-11 20:22 Tuan Phan
  2020-05-12 10:40 ` Lorenzo Pieralisi
  0 siblings, 1 reply; 3+ messages in thread
From: Tuan Phan @ 2020-05-11 20:22 UTC (permalink / raw)
  To: patches
  Cc: Lorenzo Pieralisi, Hanjun Guo, Sudeep Holla, Rafael J. Wysocki,
	Len Brown, linux-acpi, linux-arm-kernel, linux-kernel

PMCG node can have zero ID mapping if its overflow interrupt
is wire based. The code to parse PMCG node can not assume it will
have a single ID mapping.

Signed-off-by: Tuan Phan <tuanphan@os.amperecomputing.com>
---
 drivers/acpi/arm64/iort.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index ed3d2d1..72444e1 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -441,7 +441,9 @@ static int iort_get_id_mapping_index(struct acpi_iort_node *node)
 
 		return smmu->id_mapping_index;
 	case ACPI_IORT_NODE_PMCG:
-		return 0;
+		if (node->mapping_count)
+			return 0;
+		return -EINVAL;
 	default:
 		return -EINVAL;
 	}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-12 23:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 20:22 [PATCH] ACPI/IORT: Fix PMCG node always look for a single ID mapping Tuan Phan
2020-05-12 10:40 ` Lorenzo Pieralisi
2020-05-12 23:53   ` Tuan Phan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).