Skip to contentSkip to conversation

of-numa-return-einval-when-no-numa-node-id-is-found.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Sep 4, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: of, numa: return -EINVAL when no numa-node-id is found
has been removed from the -mm tree. Its filename was
of-numa-return-einval-when-no-numa-node-id-is-found.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: "Mike Rapoport (Microsoft)" <[email protected]>
Subject: of, numa: return -EINVAL when no numa-node-id is found
Date: Wed, 7 Aug 2024 09:41:07 +0300

Currently of_numa_parse_memory_nodes() returns 0 if no "memory" node in device tree contains "numa-node-id" property. This makes of_numa_init() to return "success" despite no NUMA nodes were actually parsed and set up.

arch_numa workarounds this by returning an error if numa_nodes_parsed is empty.

numa_memblks however would WARN() in such case and since it will be used by arch_numa shortly, such warning is not desirable.

Make sure of_numa_init() returns -EINVAL when no NUMA node information was found in the device tree.

Cc Alexander Gordeev <[email protected]>
Cc Andreas Larsson <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Christophe Leroy <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Davidlohr Bueso <[email protected]>
Cc David S. Miller <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Huacai Chen <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Jiaxun Yang <[email protected]>
Cc John Paul Adrian Glaubitz <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Palmer Dabbelt <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Cc Rob Herring (Arm) <[email protected]>
Cc Samuel Holland <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Will Deacon <[email protected]>
Cc Zi Yan <[email protected]>

---

 drivers/of/of_numa.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/of/of_numa.c renamed from drivers/of/of_numa.c~of-numa-return-einval-when-no-numa-node-id-is-found +2 -2
@@ -45,7 +45,7 @@ static int __init of_numa_parse_memory_n
 	struct device_node *np = NULL;
 	struct resource rsrc;
 	u32 nid;
-	int i, r;
+	int i, r = -EINVAL;
 
 	for_each_node_by_type(np, "memory") {
 		r = of_property_read_u32(np, "numa-node-id", &nid);
@@ -72,7 +72,7 @@ static int __init of_numa_parse_memory_n
 		}
 	}
 
-	return 0;
+	return r;
 }
 
 static int __init of_numa_parse_distance_map_v1(struct device_node *map)

_

Patches currently in -mm which might be from [email protected] are