summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-09-17 00:35:52 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-09-17 00:35:52 +0000
commit5b1dac0d0c72eb03cbb22a6ec560ef84b94c2acf (patch)
treede700a9de79b596934a8783cd8ddee7d47d7269b
parent2eaa192936fe0fafbddf32d0b496b78f67701ba6 (diff)
Protect a few more defines with _KERNEL checks, and also allow some of them
to be visible if _STANDALONE. This will eventually be used by the upcoming new-and-improved loongson bootblocks (in the works).
-rw-r--r--sys/arch/mips64/include/cpu.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/arch/mips64/include/cpu.h b/sys/arch/mips64/include/cpu.h
index cbd48fcee14..4b3f6e66bb0 100644
--- a/sys/arch/mips64/include/cpu.h
+++ b/sys/arch/mips64/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.62 2010/09/13 21:59:07 syuu Exp $ */
+/* $OpenBSD: cpu.h,v 1.63 2010/09/17 00:35:51 miod Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -117,7 +117,7 @@ extern vaddr_t uncached_base;
#endif /* _LOCORE */
-#ifdef _KERNEL
+#if defined(_KERNEL) || defined(_STANDALONE)
/*
* Status register.
@@ -352,11 +352,13 @@ extern vaddr_t uncached_base;
#define VMTLB_FOUND_WITH_PATCH 2
#define VMTLB_PROBE_ERROR 3
+#endif /* _KERNEL || _STANDALONE */
+
/*
* Exported definitions unique to mips cpu support.
*/
-#ifndef _LOCORE
+#if defined(_KERNEL) && !defined(_LOCORE)
#include <sys/device.h>
#include <sys/lock.h>
@@ -519,8 +521,7 @@ void cpu_startclock(struct cpu_info *);
#define aston(p) p->p_md.md_astpending = 1
-#endif /* !_LOCORE */
-#endif /* _KERNEL */
+#endif /* _KERNEL && !_LOCORE */
/*
* CTL_MACHDEP definitions.
@@ -643,5 +644,5 @@ uint32_t disableintr(void);
uint32_t getsr(void);
uint32_t setsr(uint32_t);
-#endif /* _KERNEL */
+#endif /* _KERNEL && !_LOCORE */
#endif /* !_MIPS_CPU_H_ */