summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hppa/include/_types.h6
-rw-r--r--sys/arch/hppa/include/bus.h3
-rw-r--r--sys/arch/hppa/include/conf.h33
-rw-r--r--sys/arch/hppa/include/db_machdep.h33
-rw-r--r--sys/arch/hppa/include/frame.h126
-rw-r--r--sys/arch/hppa/include/pmap.h6
-rw-r--r--sys/arch/hppa/include/signal.h20
-rw-r--r--sys/arch/hppa/include/spinlock.h4
-rw-r--r--sys/arch/hppa64/include/atomic.h21
-rw-r--r--sys/arch/hppa64/include/bus.h31
-rw-r--r--sys/arch/hppa64/include/conf.h4
-rw-r--r--sys/arch/hppa64/include/db_machdep.h4
-rw-r--r--sys/arch/hppa64/include/intr.h41
-rw-r--r--sys/arch/hppa64/include/spinlock.h4
-rw-r--r--sys/arch/hppa64/include/vmparam.h26
15 files changed, 181 insertions, 181 deletions
diff --git a/sys/arch/hppa/include/_types.h b/sys/arch/hppa/include/_types.h
index 6e77c4429a8..b765998be55 100644
--- a/sys/arch/hppa/include/_types.h
+++ b/sys/arch/hppa/include/_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: _types.h,v 1.14 2011/09/08 03:40:32 guenther Exp $ */
+/* $OpenBSD: _types.h,v 1.15 2011/11/14 14:29:53 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -135,11 +135,7 @@ typedef unsigned long __size_t;
typedef long __ssize_t;
typedef int __time_t;
typedef int __timer_t;
-#if defined(__GNUC__) && __GNUC__ >= 3
typedef __builtin_va_list __va_list;
-#else
-typedef double * __va_list;
-#endif
/* Wide character support types */
#ifndef __cplusplus
diff --git a/sys/arch/hppa/include/bus.h b/sys/arch/hppa/include/bus.h
index 6b48cbae96e..6d14a0df439 100644
--- a/sys/arch/hppa/include/bus.h
+++ b/sys/arch/hppa/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.30 2011/11/10 22:48:13 deraadt Exp $ */
+/* $OpenBSD: bus.h,v 1.31 2011/11/14 14:29:53 deraadt Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -26,7 +26,6 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-
#ifndef _MACHINE_BUS_H_
#define _MACHINE_BUS_H_
diff --git a/sys/arch/hppa/include/conf.h b/sys/arch/hppa/include/conf.h
index f951eac555b..48a78709f4b 100644
--- a/sys/arch/hppa/include/conf.h
+++ b/sys/arch/hppa/include/conf.h
@@ -1,29 +1,20 @@
-/* $OpenBSD: conf.h,v 1.5 2004/04/07 18:24:19 mickey Exp $ */
+/* $OpenBSD: conf.h,v 1.6 2011/11/14 14:29:53 deraadt Exp $ */
/*
- * Copyright (c) 1998-2004 Michael Shalayeff
+ * Copyright (c) 1998-2005 Michael Shalayeff
* 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.
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 HIS RELATIVES 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 MIND, 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.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _MACHINE_CONF_H_
diff --git a/sys/arch/hppa/include/db_machdep.h b/sys/arch/hppa/include/db_machdep.h
index 141501fc0f6..d0b9c3ef5ab 100644
--- a/sys/arch/hppa/include/db_machdep.h
+++ b/sys/arch/hppa/include/db_machdep.h
@@ -1,29 +1,20 @@
-/* $OpenBSD: db_machdep.h,v 1.16 2010/11/27 19:57:23 miod Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.17 2011/11/14 14:29:53 deraadt Exp $ */
/*
- * Copyright (c) 1998-2004 Michael Shalayeff
+ * Copyright (c) 1998-2005 Michael Shalayeff
* 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.
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 HIS RELATIVES 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 MIND, 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.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _MACHINE_DB_MACHDEP_H_
diff --git a/sys/arch/hppa/include/frame.h b/sys/arch/hppa/include/frame.h
index bc759615426..09b289e476f 100644
--- a/sys/arch/hppa/include/frame.h
+++ b/sys/arch/hppa/include/frame.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: frame.h,v 1.17 2011/11/08 15:39:50 kettenis Exp $ */
+/* $OpenBSD: frame.h,v 1.18 2011/11/14 14:29:53 deraadt Exp $ */
/*
* Copyright (c) 1999-2004 Michael Shalayeff
@@ -69,71 +69,71 @@
*/
struct trapframe {
/* the `physical' part of the trapframe */
- unsigned tf_t1; /* r22 */
- unsigned tf_t2; /* r21 */
- unsigned tf_sp; /* r30 */
- unsigned tf_t3; /* r20 */
- unsigned tf_iisq_head; /* cr17 */
- unsigned tf_iisq_tail;
- unsigned tf_iioq_head; /* cr18 */
- unsigned tf_iioq_tail;
- unsigned tf_eiem; /* cr15 */
- unsigned tf_ipsw; /* cr22 */
- unsigned tf_sr3;
- unsigned tf_pidr1; /* cr8 */
- unsigned tf_isr; /* cr20 */
- unsigned tf_ior; /* cr21 */
- unsigned tf_iir; /* cr19 */
- unsigned tf_flags;
+ unsigned long tf_t1; /* r22 */
+ unsigned long tf_t2; /* r21 */
+ unsigned long tf_sp; /* r30 */
+ unsigned long tf_t3; /* r20 */
+ unsigned long tf_iisq_head; /* cr17 */
+ unsigned long tf_iisq_tail;
+ unsigned long tf_iioq_head; /* cr18 */
+ unsigned long tf_iioq_tail;
+ unsigned long tf_eiem; /* cr15 */
+ unsigned long tf_ipsw; /* cr22 */
+ unsigned long tf_sr3;
+ unsigned long tf_pidr1; /* cr8 */
+ unsigned long tf_isr; /* cr20 */
+ unsigned long tf_ior; /* cr21 */
+ unsigned long tf_iir; /* cr19 */
+ unsigned long tf_flags;
/* here starts the `virtual' part */
- unsigned tf_sar; /* cr11 */
- unsigned tf_r1;
- unsigned tf_rp; /* r2 */
- unsigned tf_r3; /* frame pointer when -g */
- unsigned tf_r4;
- unsigned tf_r5;
- unsigned tf_r6;
- unsigned tf_r7;
- unsigned tf_r8;
- unsigned tf_r9;
- unsigned tf_r10;
- unsigned tf_r11;
- unsigned tf_r12;
- unsigned tf_r13;
- unsigned tf_r14;
- unsigned tf_r15;
- unsigned tf_r16;
- unsigned tf_r17;
- unsigned tf_r18;
- unsigned tf_t4; /* r19 */
- unsigned tf_arg3; /* r23 */
- unsigned tf_arg2; /* r24 */
- unsigned tf_arg1; /* r25 */
- unsigned tf_arg0; /* r26 */
- unsigned tf_dp; /* r27 */
- unsigned tf_ret0; /* r28 */
- unsigned tf_ret1; /* r29 */
- unsigned tf_r31;
- unsigned tf_sr0;
- unsigned tf_sr1;
- unsigned tf_sr2;
- unsigned tf_sr4;
- unsigned tf_sr5;
- unsigned tf_sr6;
- unsigned tf_sr7;
- unsigned tf_pidr2; /* cr9 */
- unsigned tf_pidr3; /* cr12 */
- unsigned tf_pidr4; /* cr13 */
- unsigned tf_rctr; /* cr0 */
- unsigned tf_ccr; /* cr10 */
- unsigned tf_eirr; /* cr23 - DDB */
- unsigned tf_vtop; /* cr25 - DDB */
- unsigned tf_cr27;
- unsigned tf_cr28; /* - DDB */
- unsigned tf_cr30; /* uaddr */
+ unsigned long tf_sar; /* cr11 */
+ unsigned long tf_r1;
+ unsigned long tf_rp; /* r2 */
+ unsigned long tf_r3; /* frame pointer when -g */
+ unsigned long tf_r4;
+ unsigned long tf_r5;
+ unsigned long tf_r6;
+ unsigned long tf_r7;
+ unsigned long tf_r8;
+ unsigned long tf_r9;
+ unsigned long tf_r10;
+ unsigned long tf_r11;
+ unsigned long tf_r12;
+ unsigned long tf_r13;
+ unsigned long tf_r14;
+ unsigned long tf_r15;
+ unsigned long tf_r16;
+ unsigned long tf_r17;
+ unsigned long tf_r18;
+ unsigned long tf_t4; /* r19 */
+ unsigned long tf_arg3; /* r23 */
+ unsigned long tf_arg2; /* r24 */
+ unsigned long tf_arg1; /* r25 */
+ unsigned long tf_arg0; /* r26 */
+ unsigned long tf_dp; /* r27 */
+ unsigned long tf_ret0; /* r28 */
+ unsigned long tf_ret1; /* r29 */
+ unsigned long tf_r31;
+ unsigned long tf_sr0;
+ unsigned long tf_sr1;
+ unsigned long tf_sr2;
+ unsigned long tf_sr4;
+ unsigned long tf_sr5;
+ unsigned long tf_sr6;
+ unsigned long tf_sr7;
+ unsigned long tf_pidr2; /* cr9 */
+ unsigned long tf_pidr3; /* cr12 */
+ unsigned long tf_pidr4; /* cr13 */
+ unsigned long tf_rctr; /* cr0 */
+ unsigned long tf_ccr; /* cr10 */
+ unsigned long tf_eirr; /* cr23 - DDB */
+ unsigned long tf_vtop; /* cr25 - DDB */
+ unsigned long tf_cr27;
+ unsigned long tf_cr28; /* - DDB */
+ unsigned long tf_cr30; /* uaddr */
- unsigned tf_pad[3]; /* pad to 256 bytes */
+ unsigned long tf_pad[3]; /* pad to 256 bytes */
};
#endif /* !_LOCORE */
diff --git a/sys/arch/hppa/include/pmap.h b/sys/arch/hppa/include/pmap.h
index 563c1f8d2bb..a34a8dbe227 100644
--- a/sys/arch/hppa/include/pmap.h
+++ b/sys/arch/hppa/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.42 2011/05/07 15:27:01 oga Exp $ */
+/* $OpenBSD: pmap.h,v 1.43 2011/11/14 14:29:53 deraadt Exp $ */
/*
* Copyright (c) 2002-2004 Michael Shalayeff
@@ -120,8 +120,8 @@ pmap_prefer(vaddr_t offs, vaddr_t hint)
#define pmap_remove_holes(map) do { /* nothing */ } while (0)
void pmap_bootstrap(vaddr_t);
-boolean_t pmap_changebit(struct vm_page *, u_int, u_int);
-boolean_t pmap_testbit(struct vm_page *, u_int);
+boolean_t pmap_changebit(struct vm_page *, pt_entry_t, pt_entry_t);
+boolean_t pmap_testbit(struct vm_page *, pt_entry_t);
void pmap_write_protect(struct pmap *, vaddr_t, vaddr_t, vm_prot_t);
void pmap_remove(struct pmap *pmap, vaddr_t sva, vaddr_t eva);
void pmap_page_remove(struct vm_page *pg);
diff --git a/sys/arch/hppa/include/signal.h b/sys/arch/hppa/include/signal.h
index c857ff1ea88..e44a2cca195 100644
--- a/sys/arch/hppa/include/signal.h
+++ b/sys/arch/hppa/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.8 2011/03/23 16:54:35 pirofti Exp $ */
+/* $OpenBSD: signal.h,v 1.9 2011/11/14 14:29:53 deraadt Exp $ */
/*
* Copyright (c) 1994, The University of Utah and
@@ -47,15 +47,15 @@ typedef int sig_atomic_t;
* a non-standard exit is performed.
*/
struct sigcontext {
- unsigned sc_onstack; /* sigstack state to restore */
- unsigned sc_mask; /* signal mask to restore */
- unsigned sc_ps; /* psl to restore */
- unsigned sc_fp; /* fp to restore */
- unsigned sc_pcoqh; /* pc offset queue (head) to restore */
- unsigned sc_pcoqt; /* pc offset queue (tail) to restore */
- unsigned sc_resv[2];
- unsigned sc_regs[32];
- unsigned sc_fpregs[64];
+ unsigned long sc_onstack; /* sigstack state to restore */
+ unsigned long sc_mask; /* signal mask to restore */
+ unsigned long sc_ps; /* psl to restore */
+ unsigned long sc_fp; /* fp to restore */
+ unsigned long sc_pcoqh; /* pc offset queue (head) to restore */
+ unsigned long sc_pcoqt; /* pc offset queue (tail) to restore */
+ unsigned long sc_resv[2];
+ unsigned long sc_regs[32];
+ unsigned long sc_fpregs[64];
};
#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */
#endif /* !_MACHINE_SIGNAL_H_ */
diff --git a/sys/arch/hppa/include/spinlock.h b/sys/arch/hppa/include/spinlock.h
index 221f35a8621..a53dc35aa62 100644
--- a/sys/arch/hppa/include/spinlock.h
+++ b/sys/arch/hppa/include/spinlock.h
@@ -1,10 +1,10 @@
-/* $OpenBSD: spinlock.h,v 1.2 2005/12/19 21:30:10 marco Exp $ */
+/* $OpenBSD: spinlock.h,v 1.3 2011/11/14 14:29:53 deraadt Exp $ */
#ifndef _MACHINE_SPINLOCK_H_
#define _MACHINE_SPINLOCK_H_
#define _SPINLOCK_UNLOCKED (1)
#define _SPINLOCK_LOCKED (0)
-typedef int _spinlock_lock_t __attribute__((__aligned__(16)));
+typedef long _spinlock_lock_t __attribute__((__aligned__(16)));
#endif
diff --git a/sys/arch/hppa64/include/atomic.h b/sys/arch/hppa64/include/atomic.h
index bb4a8e244c8..9a02d9e0d05 100644
--- a/sys/arch/hppa64/include/atomic.h
+++ b/sys/arch/hppa64/include/atomic.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: atomic.h,v 1.4 2011/03/23 16:54:35 pirofti Exp $ */
+/* $OpenBSD: atomic.h,v 1.5 2011/11/14 14:29:57 deraadt Exp $ */
/* Public Domain */
@@ -7,6 +7,17 @@
#if defined(_KERNEL)
+#include <sys/mutex.h>
+
+#ifdef MULTIPROCESSOR
+extern struct mutex mtx_atomic;
+#define ATOMIC_LOCK mtx_enter(&mtx_atomic)
+#define ATOMIC_UNLOCK mtx_leave(&mtx_atomic)
+#else
+#define ATOMIC_LOCK
+#define ATOMIC_UNLOCK
+#endif
+
static __inline void
atomic_setbits_int(__volatile unsigned int *uip, unsigned int v)
{
@@ -14,7 +25,9 @@ atomic_setbits_int(__volatile unsigned int *uip, unsigned int v)
__asm __volatile("mfctl %%cr15, %0": "=r" (eiem));
__asm __volatile("mtctl %r0, %cr15");
+ ATOMIC_LOCK;
*uip |= v;
+ ATOMIC_UNLOCK;
__asm __volatile("mtctl %0, %%cr15":: "r" (eiem));
}
@@ -25,7 +38,9 @@ atomic_clearbits_int(__volatile unsigned int *uip, unsigned int v)
__asm __volatile("mfctl %%cr15, %0": "=r" (eiem));
__asm __volatile("mtctl %r0, %cr15");
+ ATOMIC_LOCK;
*uip &= ~v;
+ ATOMIC_UNLOCK;
__asm __volatile("mtctl %0, %%cr15":: "r" (eiem));
}
@@ -36,7 +51,9 @@ atomic_setbits_long(__volatile unsigned long *uip, unsigned long v)
__asm __volatile("mfctl %%cr15, %0": "=r" (eiem));
__asm __volatile("mtctl %r0, %cr15");
+ ATOMIC_LOCK;
*uip |= v;
+ ATOMIC_UNLOCK;
__asm __volatile("mtctl %0, %%cr15":: "r" (eiem));
}
@@ -47,7 +64,9 @@ atomic_clearbits_long(__volatile unsigned long *uip, unsigned long v)
__asm __volatile("mfctl %%cr15, %0": "=r" (eiem));
__asm __volatile("mtctl %r0, %cr15");
+ ATOMIC_LOCK;
*uip &= ~v;
+ ATOMIC_UNLOCK;
__asm __volatile("mtctl %0, %%cr15":: "r" (eiem));
}
diff --git a/sys/arch/hppa64/include/bus.h b/sys/arch/hppa64/include/bus.h
index f2bc61ae1a2..269829998e8 100644
--- a/sys/arch/hppa64/include/bus.h
+++ b/sys/arch/hppa64/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.5 2009/07/30 21:39:54 miod Exp $ */
+/* $OpenBSD: bus.h,v 1.6 2011/11/14 14:29:57 deraadt Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -30,17 +30,17 @@ typedef u_long bus_space_handle_t;
struct hppa64_bus_space_tag {
void *hbt_cookie;
- int (*hbt_map)(void *v, bus_addr_t addr, bus_size_t size,
+ int (*hbt_map)(void *v, bus_addr_t addr, bus_size_t size,
int flags, bus_space_handle_t *bshp);
- void (*hbt_unmap)(void *v, bus_space_handle_t bsh, bus_size_t size);
- int (*hbt_subregion)(void *v, bus_space_handle_t bsh,
+ void (*hbt_unmap)(void *v, bus_space_handle_t bsh, bus_size_t size);
+ int (*hbt_subregion)(void *v, bus_space_handle_t bsh,
bus_size_t offset, bus_size_t size,
bus_space_handle_t *nbshp);
- int (*hbt_alloc)(void *v, bus_addr_t rstart, bus_addr_t rend,
+ int (*hbt_alloc)(void *v, bus_addr_t rstart, bus_addr_t rend,
bus_size_t size, bus_size_t align, bus_size_t boundary,
int flags, bus_addr_t *addrp, bus_space_handle_t *bshp);
- void (*hbt_free)(void *, bus_space_handle_t, bus_size_t);
- void (*hbt_barrier)(void *v, bus_space_handle_t h,
+ void (*hbt_free)(void *, bus_space_handle_t, bus_size_t);
+ void (*hbt_barrier)(void *v, bus_space_handle_t h,
bus_size_t o, bus_size_t l, int op);
void *(*hbt_vaddr)(void *v, bus_space_handle_t h);
@@ -166,14 +166,6 @@ typedef struct hppa64_bus_space_tag *bus_space_tag_t;
#define bus_space_free(t,h,c) \
(((t)->hbt_free)((t)->hbt_cookie,(h),(c)))
-#define BUS_SPACE_BARRIER_READ 0x01
-#define BUS_SPACE_BARRIER_WRITE 0x02
-
-#define bus_space_barrier(t,h,o,l,op) \
- ((t)->hbt_barrier((t)->hbt_cookie, (h), (o), (l), (op)))
-#define bus_space_vaddr(t,h) \
- ((t)->hbt_vaddr((t)->hbt_cookie, (h)))
-
#define bus_space_read_1(t,h,o) (((t)->hbt_r1)((t)->hbt_cookie,(h),(o)))
#define bus_space_read_2(t,h,o) (((t)->hbt_r2)((t)->hbt_cookie,(h),(o)))
#define bus_space_read_4(t,h,o) (((t)->hbt_r4)((t)->hbt_cookie,(h),(o)))
@@ -274,6 +266,15 @@ typedef struct hppa64_bus_space_tag *bus_space_tag_t;
(((t)->hbt_cp_4)((t)->hbt_cookie, (h1), (o1), (h2), (o2), (c)))
#define bus_space_copy_8(t, h1, o1, h2, o2, c) \
(((t)->hbt_cp_8)((t)->hbt_cookie, (h1), (o1), (h2), (o2), (c)))
+
+#define BUS_SPACE_BARRIER_READ 0x01
+#define BUS_SPACE_BARRIER_WRITE 0x02
+
+#define bus_space_barrier(t,h,o,l,op) \
+ ((t)->hbt_barrier((t)->hbt_cookie, (h), (o), (l), (op)))
+#define bus_space_vaddr(t,h) \
+ ((t)->hbt_vaddr((t)->hbt_cookie, (h)))
+
#define BUS_DMA_WAITOK 0x0000 /* safe to sleep (pseudo-flag) */
#define BUS_DMA_NOWAIT 0x0001 /* not safe to sleep */
#define BUS_DMA_ALLOCNOW 0x0002 /* perform resource allocation now */
diff --git a/sys/arch/hppa64/include/conf.h b/sys/arch/hppa64/include/conf.h
index cbe367c02f5..45287a35f69 100644
--- a/sys/arch/hppa64/include/conf.h
+++ b/sys/arch/hppa64/include/conf.h
@@ -1,7 +1,7 @@
-/* $OpenBSD: conf.h,v 1.1 2005/04/01 10:40:48 mickey Exp $ */
+/* $OpenBSD: conf.h,v 1.2 2011/11/14 14:29:57 deraadt Exp $ */
/*
- * Copyright (c) 2005 Michael Shalayeff
+ * Copyright (c) 1998-2005 Michael Shalayeff
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software for any
diff --git a/sys/arch/hppa64/include/db_machdep.h b/sys/arch/hppa64/include/db_machdep.h
index 4f374e14a0a..aab311e5081 100644
--- a/sys/arch/hppa64/include/db_machdep.h
+++ b/sys/arch/hppa64/include/db_machdep.h
@@ -1,7 +1,7 @@
-/* $OpenBSD: db_machdep.h,v 1.2 2010/11/27 19:57:23 miod Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.3 2011/11/14 14:29:57 deraadt Exp $ */
/*
- * Copyright (c) 2005 Michael Shalayeff
+ * Copyright (c) 1998-2005 Michael Shalayeff
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software for any
diff --git a/sys/arch/hppa64/include/intr.h b/sys/arch/hppa64/include/intr.h
index 0dc9a7ffec9..f4007111df5 100644
--- a/sys/arch/hppa64/include/intr.h
+++ b/sys/arch/hppa64/include/intr.h
@@ -17,29 +17,28 @@
#ifndef _MACHINE_INTR_H_
#define _MACHINE_INTR_H_
-#define CPU_NINTS 64
+#define CPU_NINTS 64
+#define NIPL 12
-#define NIPL 12
+#define IPL_NONE 0
+#define IPL_SOFTCLOCK 1
+#define IPL_SOFTNET 2
+#define IPL_BIO 3
+#define IPL_NET 4
+#define IPL_SOFTTTY 5
+#define IPL_TTY 6
+#define IPL_VM 7
+#define IPL_AUDIO 8
+#define IPL_CLOCK 9
+#define IPL_STATCLOCK 10
+#define IPL_SCHED 10
+#define IPL_HIGH 10
+#define IPL_IPI 11
-#define IPL_NONE 0
-#define IPL_SOFTCLOCK 1
-#define IPL_SOFTNET 2
-#define IPL_BIO 3
-#define IPL_NET 4
-#define IPL_SOFTTTY 5
-#define IPL_TTY 6
-#define IPL_VM 7
-#define IPL_AUDIO 8
-#define IPL_CLOCK 9
-#define IPL_STATCLOCK 10
-#define IPL_SCHED 10
-#define IPL_HIGH 10
-#define IPL_IPI 11
-
-#define IST_NONE 0
-#define IST_PULSE 1
-#define IST_EDGE 2
-#define IST_LEVEL 3
+#define IST_NONE 0
+#define IST_PULSE 1
+#define IST_EDGE 2
+#define IST_LEVEL 3
#define SOFTINT_MASK ((1 << (IPL_SOFTCLOCK - 1)) | \
(1 << (IPL_SOFTNET - 1)) | (1 << (IPL_SOFTTTY - 1)))
diff --git a/sys/arch/hppa64/include/spinlock.h b/sys/arch/hppa64/include/spinlock.h
index d9e362736c5..613d06300df 100644
--- a/sys/arch/hppa64/include/spinlock.h
+++ b/sys/arch/hppa64/include/spinlock.h
@@ -1,10 +1,10 @@
-/* $OpenBSD: spinlock.h,v 1.1 2005/04/01 10:40:48 mickey Exp $ */
+/* $OpenBSD: spinlock.h,v 1.2 2011/11/14 14:29:57 deraadt Exp $ */
#ifndef _MACHINE_SPINLOCK_H_
#define _MACHINE_SPINLOCK_H_
#define _SPINLOCK_UNLOCKED (1)
#define _SPINLOCK_LOCKED (0)
-typedef long _spinlock_lock_t;
+typedef long _spinlock_lock_t __attribute__((__aligned__(16)));
#endif
diff --git a/sys/arch/hppa64/include/vmparam.h b/sys/arch/hppa64/include/vmparam.h
index 16f8d796767..a6d03e4ebe3 100644
--- a/sys/arch/hppa64/include/vmparam.h
+++ b/sys/arch/hppa64/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmparam.h,v 1.6 2011/05/30 22:25:21 oga Exp $ */
+/* $OpenBSD: vmparam.h,v 1.7 2011/11/14 14:29:57 deraadt Exp $ */
/*
* Copyright (c) 1988-1994, The University of Utah and
@@ -41,28 +41,28 @@
* Virtual memory related constants, all in bytes
*/
#ifndef MAXTSIZ
-#define MAXTSIZ (64*1024*1024) /* max text size */
+#define MAXTSIZ (64*1024*1024UL) /* max text size */
#endif
#ifndef DFLDSIZ
#define DFLDSIZ (16*1024*1024) /* initial data size limit */
#endif
#ifndef MAXDSIZ
-#define MAXDSIZ (1*1024*1024*1024) /* max data size */
+#define MAXDSIZ (1*1024*1024*1024UL) /* max data size */
#endif
#ifndef BRKSIZ
#define BRKSIZ MAXDSIZ /* heap gap size */
#endif
#ifndef DFLSSIZ
-#define DFLSSIZ (512*1024) /* initial stack size limit */
+#define DFLSSIZ (2*1024*1024) /* initial stack size limit */
#endif
#ifndef MAXSSIZ
-#define MAXSSIZ (32*1024*1024) /* max stack size */
+#define MAXSSIZ (128*1024*1024UL) /* max stack size */
#endif
#define STACKGAP_RANDOM 256*1024
#ifndef USRIOSIZE
-#define USRIOSIZE ((2*HPPA_PGALIAS)/PAGE_SIZE) /* 2mb */
+#define USRIOSIZE ((2*HPPA_PGALIAS)/PAGE_SIZE) /* 8mb */
#endif
/*
@@ -73,11 +73,16 @@
#define SHMMAXPGS 8192 /* 32mb */
#endif
-#define VM_MIN_ADDRESS (0UL)
-#define VM_MAXUSER_ADDRESS (0x20000000000UL)
+/* user/kernel map constants */
+#define VM_MIN_ADDRESS ((vaddr_t)0)
+#define VM_MAXUSER_ADDRESS ((vaddr_t)0x20000000000UL)
#define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS
-#define VM_MIN_KERNEL_ADDRESS (0x1000000000UL)
-#define VM_MAX_KERNEL_ADDRESS (0x10f0000000UL)
+#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0x1000000000UL)
+#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0x10f0000000UL)
+
+/* use a small range for PIE to minimize mmap pressure */
+#define VM_PIE_MIN_ADDR PAGE_SIZE
+#define VM_PIE_MAX_ADDR 0x40000UL
/* virtual sizes (bytes) for various kernel submaps */
#define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE)
@@ -92,7 +97,6 @@
#include <sys/lock.h>
#define __HAVE_VM_PAGE_MD
-
struct pv_entry;
struct vm_page_md {
struct simplelock pvh_lock; /* locks every pv on this list */