summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/include
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2014-11-30 22:26:16 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2014-11-30 22:26:16 +0000
commitff831e7be50a6e2e6bf9256e12d24eb4b1385a64 (patch)
tree5e2677d756028a7a986882306319a5e2f1f78c8e /sys/arch/sparc64/include
parent2a01c4afbe3052d3e848806555c6e5a63e4d86a4 (diff)
SPARC T4 and later have a pause instruction to voluntarily pause a virtual
processor in order to give other strands a chance to run. Use it in __mp_lock_spin_hook() to avoid wasting CPU cycles if we're waiting for the kernel or scheduler locks. This is instruction is patched in, just like we already do for the sleep instruction on SPARC64 VI processors. We look at the hwcap-list property of the cpu nodes in the machine description to decide whether the pause instruction is available.
Diffstat (limited to 'sys/arch/sparc64/include')
-rw-r--r--sys/arch/sparc64/include/mdesc.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/sparc64/include/mdesc.h b/sys/arch/sparc64/include/mdesc.h
index 5e5581bd739..bacc926141a 100644
--- a/sys/arch/sparc64/include/mdesc.h
+++ b/sys/arch/sparc64/include/mdesc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdesc.h,v 1.2 2009/05/10 12:37:01 kettenis Exp $ */
+/* $OpenBSD: mdesc.h,v 1.3 2014/11/30 22:26:14 kettenis Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis
*
@@ -42,7 +42,9 @@ extern size_t mdesc_len;
void mdesc_init(void);
uint64_t mdesc_get_prop_val(int, const char *);
-const char * mdesc_get_prop_str(int, const char *);
+const char *mdesc_get_prop_str(int, const char *);
+const char *mdesc_get_prop_data(int, const char *, size_t *);
int mdesc_find(const char *, uint64_t);
int mdesc_find_child(int, const char *, uint64_t);
+int mdesc_find_node(const char *);
#endif