Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F139410478
D15482.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D15482.diff
View Options
Index: sys/powerpc/ofw/ofw_machdep.c
===================================================================
--- sys/powerpc/ofw/ofw_machdep.c
+++ sys/powerpc/ofw/ofw_machdep.c
@@ -342,7 +342,19 @@
res = parse_ofw_memory(phandle, "reg", &memp[msz]);
msz += res/sizeof(struct mem_region);
- if (OF_getproplen(phandle, "available") >= 0)
+
+ /* Order is important below. On POWER9 System, device-tree
+ * might have both /linux,usable-memory and /reg properties
+ * with different size values. For discovering memory slots, we
+ * must use /linux-usable-memory otherwise we can grab NVlink
+ * memories that contains len=0 on linux,usable-memory but >0 on
+ * /reg property, even not being a standard memory region, which
+ * is wrong and causes ghost memories to show up.
+ */
+ if (OF_getproplen(phandle, "linux,usable-memory") >= 0)
+ res = parse_ofw_memory(phandle, "linux,usable-memory",
+ &availp[asz]);
+ else if (OF_getproplen(phandle, "available") >= 0)
res = parse_ofw_memory(phandle, "available",
&availp[asz]);
else
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 12, 6:54 PM (14 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26909246
Default Alt Text
D15482.diff (1 KB)
Attached To
Mode
D15482: powerpc64: Ignore NVlink memory regions
Attached
Detach File
Event Timeline
Log In to Comment