summaryrefslogtreecommitdiff
path: root/sys/arch/hppa/include
diff options
context:
space:
mode:
authorMartin Reindl <martin@cvs.openbsd.org>2007-05-14 19:54:22 +0000
committerMartin Reindl <martin@cvs.openbsd.org>2007-05-14 19:54:22 +0000
commitd5917096feb9ef17299adc90d0ba61fe531ea007 (patch)
treea782fb663fbdf24f5ef1539bcabf65a3c4ca9965 /sys/arch/hppa/include
parent94f5c5f3b4032aa9030bf85e8b12faa4afdb5bbb (diff)
move hppa to __HAVE_CPUINFO
input from miod@, ok kettenis@
Diffstat (limited to 'sys/arch/hppa/include')
-rw-r--r--sys/arch/hppa/include/_types.h3
-rw-r--r--sys/arch/hppa/include/cpu.h21
-rw-r--r--sys/arch/hppa/include/intr.h3
3 files changed, 24 insertions, 3 deletions
diff --git a/sys/arch/hppa/include/_types.h b/sys/arch/hppa/include/_types.h
index ca78d3fbe2a..481795bf2fa 100644
--- a/sys/arch/hppa/include/_types.h
+++ b/sys/arch/hppa/include/_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: _types.h,v 1.3 2007/05/05 12:00:55 miod Exp $ */
+/* $OpenBSD: _types.h,v 1.4 2007/05/14 19:54:21 martin Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -125,5 +125,6 @@ typedef void * __wctype_t;
/* Feature test macros */
#define __HAVE_DEVICE_REGISTER
#define __HAVE_MUTEX
+#define __HAVE_CPUINFO
#endif /* _HPPA__TYPES_H_ */
diff --git a/sys/arch/hppa/include/cpu.h b/sys/arch/hppa/include/cpu.h
index 8ccf039327c..ab186368e29 100644
--- a/sys/arch/hppa/include/cpu.h
+++ b/sys/arch/hppa/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.48 2007/03/15 10:22:29 art Exp $ */
+/* $OpenBSD: cpu.h,v 1.49 2007/05/14 19:54:21 martin Exp $ */
/*
* Copyright (c) 2000-2004 Michael Shalayeff
@@ -63,6 +63,25 @@
#define HPPA_FTRS_W32B 0x00000008
#ifndef _LOCORE
+#include <sys/sched.h>
+
+struct cpu_info {
+ struct proc *ci_curproc;
+
+ struct schedstate_percpu ci_schedstate;
+};
+
+extern struct cpu_info cpu_info_primary;
+
+#define curcpu() (&cpu_info_primary)
+
+#define CPU_IS_PRIMARY(ci) 1
+#define CPU_INFO_ITERATOR int
+#define CPU_INFO_FOREACH(cii, ci) \
+ for (cii = 0, ci = curcpu(); ci != NULL; ci = NULL)
+
+#define cpu_number() 0
+
/* types */
enum hppa_cpu_type {
hpcxs, hpcxt, hpcxta, hpcxl, hpcxl2, hpcxu, hpcxu2, hpcxw
diff --git a/sys/arch/hppa/include/intr.h b/sys/arch/hppa/include/intr.h
index 3ed7bccee0a..f7a82352d58 100644
--- a/sys/arch/hppa/include/intr.h
+++ b/sys/arch/hppa/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.21 2007/04/26 20:52:48 miod Exp $ */
+/* $OpenBSD: intr.h,v 1.22 2007/05/14 19:54:21 martin Exp $ */
/*
* Copyright (c) 2002-2004 Michael Shalayeff
@@ -114,6 +114,7 @@ splx(int ncpl)
#define splvm() splraise(IPL_VM)
#define splaudio() splraise(IPL_AUDIO)
#define splclock() splraise(IPL_CLOCK)
+#define splsched() splraise(IPL_SCHED)
#define splstatclock() splraise(IPL_STATCLOCK)
#define splhigh() splraise(IPL_HIGH)
#define spl0() spllower(IPL_NONE)