37 lines
1.5 KiB
Diff
37 lines
1.5 KiB
Diff
diff -up hwloc-1.10.1/NEWS.arm hwloc-1.10.1/NEWS
|
|
diff -up hwloc-1.10.1/src/topology-linux.c.arm hwloc-1.10.1/src/topology-linux.c
|
|
--- hwloc-1.10.1/src/topology-linux.c.arm 2015-01-19 06:28:30.000000000 -0700
|
|
+++ hwloc-1.10.1/src/topology-linux.c 2015-04-04 20:25:11.519848174 -0600
|
|
@@ -2505,6 +2505,10 @@ look_powerpc_device_tree(struct hwloc_to
|
|
DIR *dt;
|
|
struct dirent *dirent;
|
|
|
|
+ /* only works for Power so far, and not useful on ARM */
|
|
+ if (strncmp(data->utsname.machine, "ppc", 3))
|
|
+ return;
|
|
+
|
|
ofroot = "/sys/firmware/devicetree/base/cpus";
|
|
ofrootlen = 34;
|
|
dt = hwloc_opendir(ofroot, root_fd);
|
|
@@ -2571,6 +2575,10 @@ look_powerpc_device_tree(struct hwloc_to
|
|
}
|
|
free(threads);
|
|
} else if ((unsigned int)-1 != reg) {
|
|
+ /* Doesn't work on ARM because cpu "reg" do not start at 0.
|
|
+ * We know the first cpu "reg" is the lowest. The others are likely
|
|
+ * in order assuming the device-tree shows objects in order.
|
|
+ */
|
|
cpuset = hwloc_bitmap_alloc();
|
|
hwloc_bitmap_set(cpuset, reg);
|
|
}
|
|
diff --git a/tests/linux/32ppc-4n4c2c.output b/tests/linux/32ppc-4n4c2c.output
|
|
index e0d73dc..733abb4 100644
|
|
--- a/tests/linux/32ppc-4n4c2c.output
|
|
+++ b/tests/linux/32ppc-4n4c2c.output
|
|
@@ -1,4 +1,4 @@
|
|
-Machine (P#0 total=129236992KB Backend=Linux)
|
|
+Machine (P#0 total=129236992KB PlatformName=pSeries PlatformModel="CHRP IBM,9125-F2A" Backend=Linux Architecture=ppc)
|
|
NUMANode L#0 (P#0 local=31195136KB total=31195136KB)
|
|
L3Cache L#0 (size=32768KB linesize=128)
|
|
L2Cache L#0 (size=4096KB linesize=128 ways=8)
|