lkml.org 
[lkml]   [2020]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ACPI/IORT: Fix PMCG node always look for a single ID mapping.
Date
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
\
 
 \ /
  Last update: 2020-05-11 22:26    [W:0.059 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site