summaryrefslogtreecommitdiff
path: root/usr.sbin/ldomctl
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2012-11-25 18:23:03 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2012-11-25 18:23:03 +0000
commit5fde8a795cb34146e53bc42ace0cb7f99a912684 (patch)
tree4886ca06a4cb36598223a635d2679bad23bc8463 /usr.sbin/ldomctl
parentfd672504b20e033fde3663abc4c6567a23a902f5 (diff)
Use "id" property as physical ID for CPUs on UltraSPARC T2 and later.
Diffstat (limited to 'usr.sbin/ldomctl')
-rw-r--r--usr.sbin/ldomctl/config.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/ldomctl/config.c b/usr.sbin/ldomctl/config.c
index 6f5fba56717..ab90e516151 100644
--- a/usr.sbin/ldomctl/config.c
+++ b/usr.sbin/ldomctl/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.5 2012/11/25 16:18:04 kettenis Exp $ */
+/* $OpenBSD: config.c,v 1.6 2012/11/25 18:23:02 kettenis Exp $ */
/*
* Copyright (c) 2012 Mark Kettenis
@@ -138,7 +138,12 @@ pri_add_cpu(struct md *md, struct md_node *node)
uint64_t page_size;
cpu = xzalloc(sizeof(*cpu));
- md_get_prop_val(md, node, "pid", &cpu->pid);
+ /*
+ * Only UltraSPARC T1 CPUs have a "pid" property. All other
+ * just have a "id" property that can be used as the physical ID.
+ */
+ if (!md_get_prop_val(md, node, "pid", &cpu->pid))
+ md_get_prop_val(md, node, "id", &cpu->pid);
cpu->vid = -1;
cpu->gid = -1;
cpu->partid = -1;