summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc/include
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2005-11-08 20:30:48 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2005-11-08 20:30:48 +0000
commitee0d799229263ae515e2b45b8c20d64ae69b5e1d (patch)
tree1ac58577c1edf901a6bf03283a9d19788e8a2a78 /sys/arch/powerpc/include
parent49be5609040bc74c9e5ff4028b0608416eca6604 (diff)
Add support for 64-bit SPRs.
ok drahn@
Diffstat (limited to 'sys/arch/powerpc/include')
-rw-r--r--sys/arch/powerpc/include/cpu.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/arch/powerpc/include/cpu.h b/sys/arch/powerpc/include/cpu.h
index 7493fb4d6c1..89fab8a2b45 100644
--- a/sys/arch/powerpc/include/cpu.h
+++ b/sys/arch/powerpc/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.23 2005/10/22 09:19:18 kettenis Exp $ */
+/* $OpenBSD: cpu.h,v 1.24 2005/11/08 20:30:47 kettenis Exp $ */
/* $NetBSD: cpu.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */
/*
@@ -51,7 +51,7 @@ void delay(unsigned);
extern volatile int want_resched;
extern volatile int astpending;
-#define need_resched(ci) (want_resched = 1, astpending = 1)
+#define need_resched(ci) (want_resched = 1, astpending = 1)
#define need_proftick(p) ((p)->p_flag |= P_OWEUPC, astpending = 1)
#define signotify(p) (astpending = 1)
@@ -103,7 +103,7 @@ invdcache(void *from, int len)
#define FUNC_SPR(n, name) \
static __inline u_int32_t ppc_mf ## name (void) \
{ \
- int ret; \
+ u_int32_t ret; \
__asm __volatile ("mfspr %0," # n : "=r" (ret)); \
return ret; \
} \
@@ -170,8 +170,8 @@ ppc_mftb(void)
u_long scratch;
u_int64_t tb;
- __asm __volatile ("1: mftbu %0; mftb %0+1; mftbu %1; cmpw 0,%0,%1; bne 1b"
- : "=r"(tb), "=r"(scratch));
+ __asm __volatile ("1: mftbu %0; mftb %0+1; mftbu %1;"
+ " cmpw 0,%0,%1; bne 1b" : "=r"(tb), "=r"(scratch));
return tb;
}
@@ -192,10 +192,13 @@ ppc_mtmsr (u_int32_t val)
static __inline void
ppc_mtsrin(u_int32_t val, u_int32_t sn_shifted)
{
- __asm __volatile ("mtsrin %0,%1" :: "r"(val), "r"(sn_shifted) );
-
+ __asm __volatile ("mtsrin %0,%1" :: "r"(val), "r"(sn_shifted));
}
+u_int64_t ppc64_mfscomc(void);
+void ppc64_mtscomc(u_int64_t);
+u_int64_t ppc64_mfscomd(void);
+
/*
* General functions to enable and disable interrupts
* without having inlined assembly code in many functions.
@@ -204,7 +207,7 @@ static __inline void
ppc_intr_enable(int enable)
{
u_int32_t msr;
- if (enable != 0) {
+ if (enable != 0) {
msr = ppc_mfmsr();
msr |= PSL_EE;
ppc_mtmsr(msr);