summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/include
diff options
context:
space:
mode:
Diffstat (limited to 'sys/powerpc/include')
-rw-r--r--sys/powerpc/include/atomic.h52
-rw-r--r--sys/powerpc/include/clock.h2
-rw-r--r--sys/powerpc/include/cpufunc.h127
-rw-r--r--sys/powerpc/include/elf.h3
-rw-r--r--sys/powerpc/include/globaldata.h10
-rw-r--r--sys/powerpc/include/globals.h21
-rw-r--r--sys/powerpc/include/ipl.h7
-rw-r--r--sys/powerpc/include/md_var.h18
-rw-r--r--sys/powerpc/include/mutex.h48
-rw-r--r--sys/powerpc/include/param.h30
-rw-r--r--sys/powerpc/include/pcpu.h10
-rw-r--r--sys/powerpc/include/reloc.h33
-rw-r--r--sys/powerpc/include/smp.h7
-rw-r--r--sys/powerpc/include/types.h14
14 files changed, 293 insertions, 89 deletions
diff --git a/sys/powerpc/include/atomic.h b/sys/powerpc/include/atomic.h
index ebd45ba..619ca7e 100644
--- a/sys/powerpc/include/atomic.h
+++ b/sys/powerpc/include/atomic.h
@@ -38,15 +38,15 @@
* of interrupts and SMP safe.
*/
-void atomic_set_8(volatile u_int8_t *, u_int8_t);
-void atomic_clear_8(volatile u_int8_t *, u_int8_t);
-void atomic_add_8(volatile u_int8_t *, u_int8_t);
-void atomic_subtract_8(volatile u_int8_t *, u_int8_t);
+void atomic_set_8(volatile u_int8_t *, u_int8_t);
+void atomic_clear_8(volatile u_int8_t *, u_int8_t);
+void atomic_add_8(volatile u_int8_t *, u_int8_t);
+void atomic_subtract_8(volatile u_int8_t *, u_int8_t);
-void atomic_set_16(volatile u_int16_t *, u_int16_t);
-void atomic_clear_16(volatile u_int16_t *, u_int16_t);
-void atomic_add_16(volatile u_int16_t *, u_int16_t);
-void atomic_subtract_16(volatile u_int16_t *, u_int16_t);
+void atomic_set_16(volatile u_int16_t *, u_int16_t);
+void atomic_clear_16(volatile u_int16_t *, u_int16_t);
+void atomic_add_16(volatile u_int16_t *, u_int16_t);
+void atomic_subtract_16(volatile u_int16_t *, u_int16_t);
static __inline void
atomic_set_32(volatile u_int32_t *p, u_int32_t v)
@@ -217,7 +217,7 @@ atomic_readandclear_64(volatile u_int64_t *addr)
#define atomic_set_long atomic_set_32
#define atomic_clear_long atomic_clear_32
-#define atomic_add_long atomic_add_32
+#define atomic_add_long(p, v) atomic_add_32((u_int32_t *)p, (u_int32_t)v)
#define atomic_subtract_long atomic_subtract_32
#define atomic_readandclear_long atomic_readandclear_32
@@ -334,19 +334,21 @@ ATOMIC_STORE_LOAD(int, 32)
static __inline u_int32_t
atomic_cmpset_32(volatile u_int32_t* p, u_int32_t cmpval, u_int32_t newval)
{
- u_int32_t ret;
+ u_int32_t ret;
+
+ ret = 0;
__asm __volatile (
- "1:\tlwarx %0, 0, %4\n\t" /* load old value */
- "cmplw 0, %2, %0\n\t" /* compare */
- "bne 2\n\t" /* exit if not equal */
- "mr %0, %3\n\t" /* value to store */
- "stwcx. %0, 0, %1\n\t" /* attempt to store */
- "bne- 1\n\t" /* spin if failed */
+ "1:\tlwarx %0, 0, %3\n\t" /* load old value */
+ "cmplw 0, %1, %0\n\t" /* compare */
+ "bne 2f\n\t" /* exit if not equal */
+ "mr %0, %2\n\t" /* value to store */
+ "stwcx. %0, 0, %3\n\t" /* attempt to store */
+ "bne- 1b\n\t" /* spin if failed */
"eieio\n" /* memory barrier */
"2:\t\n"
- : "=&r" (ret), "=r" (*p)
- : "r" (cmpval), "r" (newval), "r" (*p)
+ : "=r" (ret)
+ : "r" (cmpval), "r" (newval), "r" (p)
: "memory");
return ret;
@@ -416,7 +418,7 @@ static __inline int
atomic_cmpset_acq_ptr(volatile void *dst, void *exp, void *src)
{
- return (atomic_cmpset_acq_long((volatile u_int32_t *)dst,
+ return (atomic_cmpset_acq_32((volatile u_int32_t *)dst,
(u_int32_t)exp, (u_int32_t)src));
}
@@ -424,7 +426,7 @@ static __inline int
atomic_cmpset_rel_ptr(volatile void *dst, void *exp, void *src)
{
- return (atomic_cmpset_rel_long((volatile u_int32_t *)dst,
+ return (atomic_cmpset_rel_32((volatile u_int32_t *)dst,
(u_int32_t)exp, (u_int32_t)src));
}
@@ -432,33 +434,33 @@ static __inline void *
atomic_load_acq_ptr(volatile void *p)
{
- return (void *)atomic_load_acq_long((volatile u_int32_t *)p);
+ return (void *)atomic_load_acq_32((volatile u_int32_t *)p);
}
static __inline void
atomic_store_rel_ptr(volatile void *p, void *v)
{
- atomic_store_rel_long((volatile u_int32_t *)p, (u_int32_t)v);
+ atomic_store_rel_32((volatile u_int32_t *)p, (u_int32_t)v);
}
#define ATOMIC_PTR(NAME) \
static __inline void \
atomic_##NAME##_ptr(volatile void *p, uintptr_t v) \
{ \
- atomic_##NAME##_long((volatile u_int32_t *)p, v); \
+ atomic_##NAME##_32((volatile u_int32_t *)p, v); \
} \
\
static __inline void \
atomic_##NAME##_acq_ptr(volatile void *p, uintptr_t v) \
{ \
- atomic_##NAME##_acq_long((volatile u_int32_t *)p, v); \
+ atomic_##NAME##_acq_32((volatile u_int32_t *)p, v); \
} \
\
static __inline void \
atomic_##NAME##_rel_ptr(volatile void *p, uintptr_t v) \
{ \
- atomic_##NAME##_rel_long((volatile u_int32_t *)p, v); \
+ atomic_##NAME##_rel_32((volatile u_int32_t *)p, v); \
}
ATOMIC_PTR(set)
diff --git a/sys/powerpc/include/clock.h b/sys/powerpc/include/clock.h
index 9e4ad71..a7e6263 100644
--- a/sys/powerpc/include/clock.h
+++ b/sys/powerpc/include/clock.h
@@ -19,6 +19,8 @@ int sysbeep __P((int pitch, int period));
int acquire_timer2 __P((int mode));
int release_timer2 __P((void));
+void decr_intr(struct clockframe *);
+
#endif
#endif /* !_MACHINE_CLOCK_H_ */
diff --git a/sys/powerpc/include/cpufunc.h b/sys/powerpc/include/cpufunc.h
new file mode 100644
index 0000000..d9ad6ae
--- /dev/null
+++ b/sys/powerpc/include/cpufunc.h
@@ -0,0 +1,127 @@
+/*-
+ * Copyright (c) 1998 Doug Rabson
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _MACHINE_CPUFUNC_H_
+#define _MACHINE_CPUFUNC_H_
+
+#ifdef _KERNEL
+
+#include <sys/types.h>
+
+#ifdef __GNUC__
+
+static __inline void
+breakpoint(void)
+{
+ return;
+}
+
+#endif
+
+/*
+ * Bogus interrupt manipulation
+ */
+static __inline void
+disable_intr(void)
+{
+ u_int32_t msr;
+
+ msr = 0;
+ __asm __volatile(
+ "mfmsr %0\n\t"
+ "rlwinm %0, %0, 0, 17, 15\n\t"
+ "mtmsr %0"
+ : "+r" (msr));
+
+ return;
+}
+
+static __inline void
+enable_intr(void)
+{
+ u_int32_t msr;
+
+ msr = 0;
+ __asm __volatile(
+ "mfmsr %0\n\t"
+ "ori %0, %0, 0x8000\n\t"
+ "mtmsr %0"
+ : "+r" (msr));
+
+ return;
+}
+
+static __inline u_int
+save_intr(void)
+{
+ u_int msr;
+
+ __asm __volatile("mfmsr %0" : "=r" (msr));
+
+ return msr;
+}
+
+static __inline critical_t
+critical_enter(void)
+{
+ return ((critical_t)save_intr());
+}
+
+static __inline void
+restore_intr(u_int msr)
+{
+ __asm __volatile("mtmsr %0" : : "r" (msr));
+
+ return;
+}
+
+static __inline void
+critical_exit(critical_t msr)
+{
+ return (restore_intr((u_int)msr));
+}
+
+static __inline void
+powerpc_mb(void)
+{
+ __asm __volatile("eieio;" : : : "memory");
+}
+
+static __inline void
+*powerpc_get_globalp(void)
+{
+ void *ret;
+
+ __asm __volatile("mfsprg %0, 0" : "=r" (ret));
+
+ return(ret);
+}
+
+#endif /* _KERNEL */
+
+#endif /* !_MACHINE_CPUFUNC_H_ */
diff --git a/sys/powerpc/include/elf.h b/sys/powerpc/include/elf.h
index 1935654..c10dfb4 100644
--- a/sys/powerpc/include/elf.h
+++ b/sys/powerpc/include/elf.h
@@ -80,6 +80,9 @@ __ElfType(Auxinfo);
#define AT_COUNT 13 /* Count of defined aux entry types. */
+/* Used in John Polstra's testbed stuff. */
+#define AT_DEBUG 14 /* Debugging level. */
+
/*
* Relocation types.
*/
diff --git a/sys/powerpc/include/globaldata.h b/sys/powerpc/include/globaldata.h
index 4d6d02f..de9a1ce 100644
--- a/sys/powerpc/include/globaldata.h
+++ b/sys/powerpc/include/globaldata.h
@@ -43,7 +43,6 @@
* point at the globaldata structure.
*/
struct globaldata {
- struct alpha_pcb gd_idlepcb; /* pcb for idling */
struct proc *gd_curproc; /* current process */
struct proc *gd_idleproc; /* idle process */
struct proc *gd_fpcurproc; /* fp state owner */
@@ -52,17 +51,20 @@ struct globaldata {
int gd_switchticks;
u_int gd_cpuid; /* this cpu number */
u_int gd_other_cpus; /* all other cpus */
- u_int64_t gd_idlepcbphys; /* pa of gd_idlepcb */
- u_int64_t gd_pending_ipis; /* pending IPI events */
+ int gd_inside_intr;
u_int32_t gd_next_asn; /* next ASN to allocate */
u_int32_t gd_current_asngen; /* ASN rollover check */
+ u_int32_t gd_intr_nesting_level; /* interrupt recursion */
+ u_int gd_astpending;
SLIST_ENTRY(globaldata) gd_allcpu;
struct lock_list_entry *gd_spinlocks;
#ifdef KTR_PERCPU
+#ifdef KTR
volatile int gd_ktr_idx; /* Index into trace table */
char *gd_ktr_buf;
- char gd_ktr_buf_data[0];
+ char gd_ktr_buf_data[KTR_SIZE];
+#endif
#endif
};
diff --git a/sys/powerpc/include/globals.h b/sys/powerpc/include/globals.h
index 10de1b7..286e5eb 100644
--- a/sys/powerpc/include/globals.h
+++ b/sys/powerpc/include/globals.h
@@ -30,23 +30,30 @@
#define _MACHINE_GLOBALS_H_
#ifdef _KERNEL
+#include <machine/cpufunc.h>
#include <machine/globaldata.h>
-register struct globaldata *globalp __asm__("$8");
-
-#if 1
-#define GLOBALP globalp
-#else
-#define GLOBALP ((struct globaldata *) alpha_pal_rdval())
-#endif
+#define GLOBALP ((struct globaldata *) powerpc_get_globalp())
#define PCPU_GET(name) (GLOBALP->gd_##name)
#define PCPU_PTR(name) (&GLOBALP->gd_##name)
#define PCPU_SET(name,value) (GLOBALP->gd_##name = (value))
+/*
+ * The following set of macros works for UP kernel as well, but for maximum
+ * performance we allow the global variables to be accessed directly. On the
+ * other hand, kernel modules should always use these macros to maintain
+ * portability between UP and SMP kernels.
+ */
#define CURPROC PCPU_GET(curproc)
#define CURTHD PCPU_GET(curproc) /* temporary */
#define curproc PCPU_GET(curproc)
+#define idleproc PCPU_GET(idleproc)
+#define curpcb PCPU_GET(curpcb)
+#define fpcurproc PCPU_GET(fpcurproc)
+#define switchtime PCPU_GET(switchtime)
+#define switchticks PCPU_GET(switchticks)
+#define witness_spin_check PCPU_GET(witness_spin_check)
#endif /* _KERNEL */
diff --git a/sys/powerpc/include/ipl.h b/sys/powerpc/include/ipl.h
new file mode 100644
index 0000000..15ec74c
--- /dev/null
+++ b/sys/powerpc/include/ipl.h
@@ -0,0 +1,7 @@
+/* $FreeBSD$ */
+
+/*
+ * An empty file now,
+ * Although in the times to come,
+ * More may be found here.
+ */
diff --git a/sys/powerpc/include/md_var.h b/sys/powerpc/include/md_var.h
index bf99dd7..f5df84c 100644
--- a/sys/powerpc/include/md_var.h
+++ b/sys/powerpc/include/md_var.h
@@ -55,23 +55,5 @@ int fill_regs __P((struct proc *, struct reg *));
int set_regs __P((struct proc *, struct reg *));
int fill_fpregs __P((struct proc *, struct fpreg *));
int set_fpregs __P((struct proc *, struct fpreg *));
-void alpha_register_pci_scsi __P((int bus, int slot, struct cam_sim *sim));
-#ifdef _SYS_BUS_H_
-struct resource *alpha_platform_alloc_ide_intr(int chan);
-int alpha_platform_release_ide_intr(int chan, struct resource *res);
-int alpha_platform_setup_ide_intr(struct device *dev,
- struct resource *res,
- driver_intr_t *fn, void *arg,
- void **cookiep);
-int alpha_platform_teardown_ide_intr(struct device *dev,
- struct resource *res, void *cookie);
-int alpha_platform_pci_setup_intr(device_t dev, device_t child,
- struct resource *irq, int flags,
- driver_intr_t *intr, void *arg,
- void **cookiep);
-int alpha_platform_pci_teardown_intr(device_t dev, device_t child,
- struct resource *irq, void *cookie);
-int alpha_pci_route_interrupt(device_t bus, device_t dev, int pin);
-#endif
#endif /* !_MACHINE_MD_VAR_H_ */
diff --git a/sys/powerpc/include/mutex.h b/sys/powerpc/include/mutex.h
index c141d6f..5038f42 100644
--- a/sys/powerpc/include/mutex.h
+++ b/sys/powerpc/include/mutex.h
@@ -36,10 +36,14 @@
#ifdef _KERNEL
-/* Global locks */
-extern struct mtx clock_lock;
+#define mtx_intr_enable(mutex) do (mutex)->mtx_savecrit |= PSL_EE; while (0)
-#define mtx_intr_enable(mutex) do (mutex)->mtx_savecrit = ALPHA_PSL_IPL_0; while (0)
+/*
+ * Assembly macros (for internal use only)
+ *--------------------------------------------------------------------------
+ */
+
+#define _V(x) __STRING(x)
#endif /* _KERNEL */
@@ -47,29 +51,29 @@ extern struct mtx clock_lock;
/*
* Simple assembly macros to get and release non-recursive spin locks
- *
- * XXX: These are presently unused and cannot be used right now. Need to be
- * re-written (they are wrong). If you plan to use this and still see
- * this message, know not to unless you fix them first! :-)
*/
#define MTX_ENTER(lck) \
- ldiq a0, ALPHA_PSL_IPL_HIGH; \
- call_pal PAL_OSF1_swpipl; \
-1: ldq_l a0, lck+MTX_LOCK; \
- cmpeq a0, MTX_UNOWNED, a1; \
- beq a1, 1b; \
- ldq a0, PC_CURPROC(globalp); \
- stq_c a0, lck+MTX_LOCK; \
- beq a0, 1b; \
- mb; \
- stl v0, lck+MTX_SAVEINTR
+ mfmsr r10; \ /* disable interrupts */
+ rlwinm r0, r10, 0, 17, 15; \
+ mtmsr r0; \
+1: li r11, MTX_LOCK; \ /* MTX_LOCK offset */
+ lwarx r0, r11, lck; \ /* load current lock value */
+ cmplwi r0, r1, MTX_UNOWNED; \ /* compare with unowned */
+ beq 1; \ /* if owned, loop */
+ lwz r0, PC_CURPROC(globalp); \ /* load curproc */
+ stwcx. r0, r11, lck; \ /* attempt to store */
+ beq 1; \ /* loop if failed */
+ sync; \ /* sync */
+ eieio; \ /* sync */
+ stw r10, MTX_SAVEINTR(lck) /* save flags */
#define MTX_EXIT(lck) \
- mb; \
- ldiq a0, MTX_UNOWNED; \
- stq a0, lck+MTX_LOCK; \
- ldl a0, lck+MTX_SAVEINTR; \
- call_pal PAL_OSF1_swpipl
+ sync; \ /* sync */
+ eieio; \ /* sync */
+ li r0, MTX_UNOWNED; \ /* load in unowned */
+ stw r0, MTX_LOCK(lck); \ /* store to lock */
+ lwz r0, MTX_SAVEINTR(lck); \ /* load saved flags */
+ mtmsr r0 /* enable interrupts */
#endif /* !LOCORE */
diff --git a/sys/powerpc/include/param.h b/sys/powerpc/include/param.h
index ebc67b7..3ebcd94 100644
--- a/sys/powerpc/include/param.h
+++ b/sys/powerpc/include/param.h
@@ -74,7 +74,9 @@
#endif
#define MID_MACHINE MID_POWERPC
+#if !defined(LOCORE)
#include <machine/cpu.h>
+#endif
/*
* OBJFORMAT_NAMES is a comma-separated list of the object formats
@@ -158,18 +160,40 @@
/*
* Mach derived conversion macros
*/
-#define trunc_page(x) ((x) & ~PAGE_MASK)
+#define trunc_page(x) ((unsigned long)(x) & ~(PAGE_MASK))
#define round_page(x) (((x) + PAGE_MASK) & ~PAGE_MASK)
#define trunc_4mpage(x) ((unsigned)(x) & ~PDRMASK)
#define round_4mpage(x) ((((unsigned)(x)) + PDRMASK) & ~PDRMASK)
-#define atop(x) ((unsigned)(x) >> PAGE_SHIFT)
-#define ptoa(x) ((unsigned)(x) << PAGE_SHIFT)
+#define atop(x) ((unsigned long)(x) >> PAGE_SHIFT)
+#define ptoa(x) ((unsigned long)(x) << PAGE_SHIFT)
#define powerpc_btop(x) ((unsigned)(x) >> PAGE_SHIFT)
#define powerpc_ptob(x) ((unsigned)(x) << PAGE_SHIFT)
#define pgtok(x) ((x) * (PAGE_SIZE / 1024))
+/* XXX: NetBSD defines that we're using for the moment */
+#define USER_SR 13
+#define KERNEL_SR 14
+#define KERNEL_SEGMENT (0xfffff0 + KERNEL_SR)
+#define EMPTY_SEGMENT 0xfffff0
+#define USER_ADDR ((void *)(USER_SR << ADDR_SR_SHFT))
+#define SEGMENT_LENGTH 0x10000000
+#define SEGMENT_MASK 0xf0000000
+
+#if !defined(NPMAPS)
+#define NPMAPS 32768
+#endif /* !defined(NPMAPS) */
+
+#if !defined(MSGBUFSIZE)
+#define MSGBUFSIZE PAGE_SIZE
+#endif /* !defined(MSGBUFSIZE) */
+
+/*
+ * XXX: Stop NetBSD msgbuf_paddr code from happening.
+ */
+#define MSGBUFADDR
+
#endif /* !_MACHINE_PARAM_H_ */
#endif /* !_NO_NAMESPACE_POLLUTION */
diff --git a/sys/powerpc/include/pcpu.h b/sys/powerpc/include/pcpu.h
index 4d6d02f..de9a1ce 100644
--- a/sys/powerpc/include/pcpu.h
+++ b/sys/powerpc/include/pcpu.h
@@ -43,7 +43,6 @@
* point at the globaldata structure.
*/
struct globaldata {
- struct alpha_pcb gd_idlepcb; /* pcb for idling */
struct proc *gd_curproc; /* current process */
struct proc *gd_idleproc; /* idle process */
struct proc *gd_fpcurproc; /* fp state owner */
@@ -52,17 +51,20 @@ struct globaldata {
int gd_switchticks;
u_int gd_cpuid; /* this cpu number */
u_int gd_other_cpus; /* all other cpus */
- u_int64_t gd_idlepcbphys; /* pa of gd_idlepcb */
- u_int64_t gd_pending_ipis; /* pending IPI events */
+ int gd_inside_intr;
u_int32_t gd_next_asn; /* next ASN to allocate */
u_int32_t gd_current_asngen; /* ASN rollover check */
+ u_int32_t gd_intr_nesting_level; /* interrupt recursion */
+ u_int gd_astpending;
SLIST_ENTRY(globaldata) gd_allcpu;
struct lock_list_entry *gd_spinlocks;
#ifdef KTR_PERCPU
+#ifdef KTR
volatile int gd_ktr_idx; /* Index into trace table */
char *gd_ktr_buf;
- char gd_ktr_buf_data[0];
+ char gd_ktr_buf_data[KTR_SIZE];
+#endif
#endif
};
diff --git a/sys/powerpc/include/reloc.h b/sys/powerpc/include/reloc.h
new file mode 100644
index 0000000..a8ce0b1
--- /dev/null
+++ b/sys/powerpc/include/reloc.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by John Birrell.
+ * 4. Neither the name of the author nor the names of any co-contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
diff --git a/sys/powerpc/include/smp.h b/sys/powerpc/include/smp.h
new file mode 100644
index 0000000..15ec74c
--- /dev/null
+++ b/sys/powerpc/include/smp.h
@@ -0,0 +1,7 @@
+/* $FreeBSD$ */
+
+/*
+ * An empty file now,
+ * Although in the times to come,
+ * More may be found here.
+ */
diff --git a/sys/powerpc/include/types.h b/sys/powerpc/include/types.h
index 4231ab0..8d6b107 100644
--- a/sys/powerpc/include/types.h
+++ b/sys/powerpc/include/types.h
@@ -49,20 +49,22 @@ typedef struct label_t {
} label_t;
#endif
-typedef unsigned int vm_offset_t;
-typedef __int64_t vm_ooffset_t;
-typedef unsigned int vm_pindex_t;
-typedef unsigned int vm_size_t;
+typedef unsigned int vm_offset_t;
+typedef __int64_t vm_ooffset_t;
+typedef unsigned int vm_pindex_t;
+typedef unsigned int vm_size_t;
typedef __int32_t register_t;
typedef __uint32_t u_register_t;
#ifdef _KERNEL
-typedef int intfptr_t;
-typedef unsigned int uintfptr_t;
+typedef int intfptr_t;
+typedef unsigned int uintfptr_t;
#endif
/* Interrupt mask (spl, xxx_imask, etc) */
typedef __uint32_t intrmask_t;
+typedef register_t critical_t;
+
#endif /* _MACHTYPES_H_ */
OpenPOWER on IntegriCloud