linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI/IORT: fix IORT Reserved Memory Range node mapping error
@ 2023-07-17  8:38 Guanghui Feng
  2023-07-17  8:48 ` Marc Zyngier
  0 siblings, 1 reply; 7+ messages in thread
From: Guanghui Feng @ 2023-07-17  8:38 UTC (permalink / raw)
  To: lpieralisi, guohanjun, sudeep.holla, lenb, linux-arm-kernel; +Cc: baolin.wang

In the ARM IORT specifications DEN 0049E.d, the recommended ID mapping format:
Field		Note Description
--------------------------------
Input base	The lowest value in the input range
Number of IDs	The number of IDs in the range "minus" one

When there is only one id mapping in the Reserved Memory Range
(RMR) node, the node filed: "Number of IDs" is zero and
iort_node_get_rmr_info will not analyse id mapping. This is
not in compliance with the regulations.

Signed-off-by: Guanghui Feng <guanghuifeng@linux.alibaba.com>
---
 drivers/acpi/arm64/iort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index 3631230..8427cc3 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -1007,7 +1007,7 @@ static void iort_node_get_rmr_info(struct acpi_iort_node *node,
 	for (i = 0; i < node->mapping_count; i++, map++) {
 		struct acpi_iort_node *parent;
 
-		if (!map->id_count)
+		if (!(map->id_count + 1))
 			continue;
 
 		parent = ACPI_ADD_PTR(struct acpi_iort_node, iort_table,
-- 
1.8.3.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] ACPI/IORT: fix IORT Reserved Memory Range node mapping error
@ 2023-07-17  8:42 Guanghui Feng
  0 siblings, 0 replies; 7+ messages in thread
From: Guanghui Feng @ 2023-07-17  8:42 UTC (permalink / raw)
  To: lpieralisi, guohanjun, sudeep.holla, linux-arm-kernel; +Cc: baolin.wang

In the ARM IORT specifications DEN 0049E.d, the recommended ID mapping format:
Field		Note Description
--------------------------------
Input base	The lowest value in the input range
Number of IDs	The number of IDs in the range "minus" one

When there is only one id mapping in the Reserved Memory Range
(RMR) node, the node filed: "Number of IDs" is zero and
iort_node_get_rmr_info will not analyse id mapping. This is
not in compliance with the regulations.

Signed-off-by: Guanghui Feng <guanghuifeng@linux.alibaba.com>
---
 drivers/acpi/arm64/iort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index 3631230..8427cc3 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -1007,7 +1007,7 @@ static void iort_node_get_rmr_info(struct acpi_iort_node *node,
 	for (i = 0; i < node->mapping_count; i++, map++) {
 		struct acpi_iort_node *parent;
 
-		if (!map->id_count)
+		if (!(map->id_count + 1))
 			continue;
 
 		parent = ACPI_ADD_PTR(struct acpi_iort_node, iort_table,
-- 
1.8.3.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] ACPI/IORT: fix IORT Reserved Memory Range node mapping error
@ 2023-07-17  7:57 Guanghui Feng
  0 siblings, 0 replies; 7+ messages in thread
From: Guanghui Feng @ 2023-07-17  7:57 UTC (permalink / raw)
  To: lpieralisi, guohanjun, sudeep.holla, rafael, lenb,
	linux-arm-kernel
  Cc: baolin.wang, alikernel-developer

In the ARM IORT specifications DEN 0049E.d, the recommended ID mapping format:
Field		Note Description
--------------------------------
Input base	The lowest value in the input range
Number of IDs	The number of IDs in the range "minus" one

When there is only one id mapping in the Reserved Memory Range
(RMR) node, the node filed: "Number of IDs" is zero and
iort_node_get_rmr_info will not analyse id mapping. This is
not in compliance with the regulations.

Signed-off-by: Guanghui Feng <guanghuifeng@linux.alibaba.com>
---
 drivers/acpi/arm64/iort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index 3631230..8427cc3 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -1007,7 +1007,7 @@ static void iort_node_get_rmr_info(struct acpi_iort_node *node,
 	for (i = 0; i < node->mapping_count; i++, map++) {
 		struct acpi_iort_node *parent;
 
-		if (!map->id_count)
+		if (!(map->id_count + 1))
 			continue;
 
 		parent = ACPI_ADD_PTR(struct acpi_iort_node, iort_table,
-- 
1.8.3.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-07-17  9:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17  8:38 [PATCH] ACPI/IORT: fix IORT Reserved Memory Range node mapping error Guanghui Feng
2023-07-17  8:48 ` Marc Zyngier
2023-07-17  9:03   ` guanghuifeng
2023-07-17  9:07   ` guanghui.fgh
2023-07-17  9:25     ` Marc Zyngier
  -- strict thread matches above, loose matches on Subject: below --
2023-07-17  8:42 Guanghui Feng
2023-07-17  7:57 Guanghui Feng

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).