summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-11-17 05:36:24 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-11-17 05:36:24 +0000
commitd49d5416628d60b6b03c7b70973a0a5d8e6f3384 (patch)
treeecaed9db0c8e1a372ee531bf0c4113e5e1a59759 /sys
parent1e1c2f1bdb1296512db1f03495b1df91e1a3ad1b (diff)
Replace many ``unsigned'' variables with ``unsigned int'', ``u_int'' or other
appropriate types. No functional change.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/aviion/aviion/av400_machdep.c14
-rw-r--r--sys/arch/aviion/aviion/machdep.c4
-rw-r--r--sys/arch/luna88k/luna88k/machdep.c30
-rw-r--r--sys/arch/m88k/include/asm_macro.h4
-rw-r--r--sys/arch/m88k/include/m88100.h6
-rw-r--r--sys/arch/m88k/include/pcb.h46
-rw-r--r--sys/arch/m88k/include/trap.h6
-rw-r--r--sys/arch/m88k/m88k/db_trace.c75
-rw-r--r--sys/arch/m88k/m88k/eh_common.S4
-rw-r--r--sys/arch/m88k/m88k/m88100_machdep.c12
-rw-r--r--sys/arch/m88k/m88k/m88k_machdep.c4
-rw-r--r--sys/arch/m88k/m88k/sig_machdep.c6
-rw-r--r--sys/arch/m88k/m88k/trap.c20
-rw-r--r--sys/arch/mvme88k/include/m88110.h94
-rw-r--r--sys/arch/mvme88k/mvme88k/m188_machdep.c16
-rw-r--r--sys/arch/mvme88k/mvme88k/m197_machdep.c4
-rw-r--r--sys/arch/mvme88k/mvme88k/m88110.c6
-rw-r--r--sys/arch/mvme88k/mvme88k/m8820x.c8
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c4
19 files changed, 182 insertions, 181 deletions
diff --git a/sys/arch/aviion/aviion/av400_machdep.c b/sys/arch/aviion/aviion/av400_machdep.c
index 31f24ab51f1..b495812a29d 100644
--- a/sys/arch/aviion/aviion/av400_machdep.c
+++ b/sys/arch/aviion/aviion/av400_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: av400_machdep.c,v 1.6 2007/11/17 05:32:04 miod Exp $ */
+/* $OpenBSD: av400_machdep.c,v 1.7 2007/11/17 05:36:21 miod Exp $ */
/*
* Copyright (c) 2006, Miodrag Vallat.
*
@@ -195,14 +195,14 @@ const struct board board_av400 = {
* Note that, on the AV400 design, the interrupt enable registers are
* write-only and read back as 0xffffffff.
*/
-unsigned int int_mask_reg[] = { 0, 0, 0, 0 };
+u_int32_t int_mask_reg[] = { 0, 0, 0, 0 };
u_int av400_curspl[] = { IPL_NONE, IPL_NONE, IPL_NONE, IPL_NONE };
/*
* external interrupt masks per spl.
*/
-const unsigned int int_mask_val[INT_LEVEL] = {
+const u_int32_t int_mask_val[INT_LEVEL] = {
MASK_LVL_0,
MASK_LVL_1,
MASK_LVL_2,
@@ -354,7 +354,7 @@ av400_raiseipl(u_int level)
* Hard coded vector table for onboard devices and hardware failure
* interrupts.
*/
-const unsigned int obio_vec[32] = {
+const u_int obio_vec[32] = {
0, /* SWI0 */
0, /* SWI1 */
0,
@@ -396,7 +396,7 @@ void
av400_intr(u_int v, struct trapframe *eframe)
{
int cpu = cpu_number();
- unsigned int cur_mask, ign_mask;
+ u_int32_t cur_mask, ign_mask;
u_int level, old_spl;
struct intrhand *intr;
intrhand_t *list;
@@ -544,7 +544,7 @@ out:
* Clock routines
*/
-void av400_cio_init(unsigned);
+void av400_cio_init(u_int);
u_int read_cio(int);
void write_cio(int, u_int);
@@ -673,7 +673,7 @@ read_cio(int reg)
* Only the counter/timers are used - the IO ports are un-comitted.
*/
void
-av400_cio_init(unsigned period)
+av400_cio_init(u_int period)
{
volatile int i;
diff --git a/sys/arch/aviion/aviion/machdep.c b/sys/arch/aviion/aviion/machdep.c
index 668f450da1b..8938d5e15ca 100644
--- a/sys/arch/aviion/aviion/machdep.c
+++ b/sys/arch/aviion/aviion/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.16 2007/11/17 05:32:04 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.17 2007/11/17 05:36:21 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -826,7 +826,7 @@ aviion_bootstrap()
/* Steal MSGBUFSIZE at the top of physical memory for msgbuf. */
avail_end -= round_page(MSGBUFSIZE);
- pmap_bootstrap((vaddr_t)trunc_page((unsigned)&kernelstart));
+ pmap_bootstrap((vaddr_t)trunc_page((vaddr_t)&kernelstart));
/*
* Tell the VM system about available physical memory.
diff --git a/sys/arch/luna88k/luna88k/machdep.c b/sys/arch/luna88k/luna88k/machdep.c
index d3f0028589f..23ea2b41035 100644
--- a/sys/arch/luna88k/luna88k/machdep.c
+++ b/sys/arch/luna88k/luna88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.50 2007/11/17 05:32:05 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.51 2007/11/17 05:36:23 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -129,16 +129,16 @@ int clockintr(void *); /* in clock.c */
* *int_mask_reg[CPU]
* Points to the hardware interrupt status register for each CPU.
*/
-unsigned int *volatile int_mask_reg[] = {
- (unsigned int *)INT_ST_MASK0,
- (unsigned int *)INT_ST_MASK1,
- (unsigned int *)INT_ST_MASK2,
- (unsigned int *)INT_ST_MASK3
+u_int32_t *volatile int_mask_reg[] = {
+ (u_int32_t *)INT_ST_MASK0,
+ (u_int32_t *)INT_ST_MASK1,
+ (u_int32_t *)INT_ST_MASK2,
+ (u_int32_t *)INT_ST_MASK3
};
u_int luna88k_curspl[] = { IPL_NONE, IPL_NONE, IPL_NONE, IPL_NONE };
-unsigned int int_set_val[INT_LEVEL] = {
+u_int32_t int_set_val[INT_LEVEL] = {
INT_SET_LV0,
INT_SET_LV1,
INT_SET_LV2,
@@ -152,11 +152,11 @@ unsigned int int_set_val[INT_LEVEL] = {
/*
* *clock_reg[CPU]
*/
-unsigned int *volatile clock_reg[] = {
- (unsigned int *)OBIO_CLOCK0,
- (unsigned int *)OBIO_CLOCK1,
- (unsigned int *)OBIO_CLOCK2,
- (unsigned int *)OBIO_CLOCK3
+u_int32_t *volatile clock_reg[] = {
+ (u_int32_t *)OBIO_CLOCK0,
+ (u_int32_t *)OBIO_CLOCK1,
+ (u_int32_t *)OBIO_CLOCK2,
+ (u_int32_t *)OBIO_CLOCK3
};
/*
@@ -327,7 +327,7 @@ size_memory()
*look = save;
}
- return (trunc_page((unsigned)look));
+ return (trunc_page((vaddr_t)look));
}
int
@@ -837,7 +837,7 @@ void
luna88k_ext_int(u_int v, struct trapframe *eframe)
{
int cpu = cpu_number();
- unsigned int cur_mask, cur_int;
+ u_int32_t cur_mask, cur_int;
u_int level, old_spl;
cur_mask = *int_mask_reg[cpu];
@@ -1035,7 +1035,7 @@ luna88k_bootstrap()
printf("LUNA88K boot: memory from 0x%x to 0x%x\n",
avail_start, avail_end);
#endif
- pmap_bootstrap((vaddr_t)trunc_page((unsigned)&kernelstart));
+ pmap_bootstrap((vaddr_t)trunc_page((vaddr_t)&kernelstart));
/*
* Tell the VM system about available physical memory.
diff --git a/sys/arch/m88k/include/asm_macro.h b/sys/arch/m88k/include/asm_macro.h
index 2ece4e147d1..7eff4f3d1bb 100644
--- a/sys/arch/m88k/include/asm_macro.h
+++ b/sys/arch/m88k/include/asm_macro.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm_macro.h,v 1.3 2005/12/03 16:52:16 miod Exp $ */
+/* $OpenBSD: asm_macro.h,v 1.4 2007/11/17 05:36:23 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -66,7 +66,7 @@ static __inline__ u_int get_psr(void)
/*
* Provide access from C code to the assembly instruction ff1
*/
-static __inline__ unsigned ff1(unsigned val)
+static __inline__ u_int ff1(u_int val)
{
__asm__ __volatile__ ("ff1 %0, %0" : "=r" (val) : "0" (val));
return (val);
diff --git a/sys/arch/m88k/include/m88100.h b/sys/arch/m88k/include/m88100.h
index 53180beb2e2..ded8b635150 100644
--- a/sys/arch/m88k/include/m88100.h
+++ b/sys/arch/m88k/include/m88100.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: m88100.h,v 1.3 2006/11/18 22:58:28 miod Exp $ */
+/* $OpenBSD: m88100.h,v 1.4 2007/11/17 05:36:23 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1992 Carnegie Mellon University
@@ -58,8 +58,8 @@
#if defined(_KERNEL) && !defined(_LOCORE)
-void dae_print(unsigned *);
-void data_access_emulation(unsigned *);
+void dae_print(u_int *);
+void data_access_emulation(u_int *);
u_int32_t do_load_word(vaddr_t, int);
u_int16_t do_load_half(vaddr_t, int);
diff --git a/sys/arch/m88k/include/pcb.h b/sys/arch/m88k/include/pcb.h
index 7baa1e69bf8..f67c12022a5 100644
--- a/sys/arch/m88k/include/pcb.h
+++ b/sys/arch/m88k/include/pcb.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcb.h,v 1.4 2007/01/13 22:00:56 miod Exp $ */
+/* $OpenBSD: pcb.h,v 1.5 2007/11/17 05:36:23 miod Exp $ */
/*
* Copyright (c) 1996 Nivas Madhur
* Mach Operating System
@@ -48,29 +48,29 @@
*/
struct m88100_pcb {
- unsigned pcb_pc; /* address to return */
- unsigned :32;
- unsigned pcb_r14;
- unsigned pcb_r15;
- unsigned pcb_r16;
- unsigned pcb_r17;
- unsigned pcb_r18;
- unsigned pcb_r19;
- unsigned pcb_r20;
- unsigned pcb_r21;
- unsigned pcb_r22;
- unsigned pcb_r23;
- unsigned pcb_r24;
- unsigned pcb_r25;
- unsigned pcb_r26;
- unsigned pcb_r27;
- unsigned pcb_r28;
- unsigned pcb_r29;
- unsigned pcb_r30;
- unsigned pcb_sp; /* kernel stack pointer */
+ unsigned int pcb_pc; /* address to return */
+ unsigned int :32;
+ unsigned int pcb_r14;
+ unsigned int pcb_r15;
+ unsigned int pcb_r16;
+ unsigned int pcb_r17;
+ unsigned int pcb_r18;
+ unsigned int pcb_r19;
+ unsigned int pcb_r20;
+ unsigned int pcb_r21;
+ unsigned int pcb_r22;
+ unsigned int pcb_r23;
+ unsigned int pcb_r24;
+ unsigned int pcb_r25;
+ unsigned int pcb_r26;
+ unsigned int pcb_r27;
+ unsigned int pcb_r28;
+ unsigned int pcb_r29;
+ unsigned int pcb_r30;
+ unsigned int pcb_sp; /* kernel stack pointer */
/* floating-point state */
- unsigned pcb_fcr62;
- unsigned pcb_fcr63;
+ unsigned int pcb_fcr62;
+ unsigned int pcb_fcr63;
};
struct pcb
diff --git a/sys/arch/m88k/include/trap.h b/sys/arch/m88k/include/trap.h
index 0fda5f005b3..e617c73d958 100644
--- a/sys/arch/m88k/include/trap.h
+++ b/sys/arch/m88k/include/trap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.h,v 1.3 2006/05/08 14:03:34 miod Exp $ */
+/* $OpenBSD: trap.h,v 1.4 2007/11/17 05:36:23 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1992 Carnegie Mellon University
@@ -61,9 +61,9 @@
#ifndef _LOCORE
void cache_flush(struct trapframe *);
void m88100_syscall(register_t, struct trapframe *);
-void m88100_trap(unsigned, struct trapframe *);
+void m88100_trap(u_int, struct trapframe *);
void m88110_syscall(register_t, struct trapframe *);
-void m88110_trap(unsigned, struct trapframe *);
+void m88110_trap(u_int, struct trapframe *);
#endif /* _LOCORE */
#endif /* __MACHINE_TRAP_H__ */
diff --git a/sys/arch/m88k/m88k/db_trace.c b/sys/arch/m88k/m88k/db_trace.c
index cdc61e047d1..7909960d94d 100644
--- a/sys/arch/m88k/m88k/db_trace.c
+++ b/sys/arch/m88k/m88k/db_trace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_trace.c,v 1.9 2006/05/08 14:36:09 miod Exp $ */
+/* $OpenBSD: db_trace.c,v 1.10 2007/11/17 05:36:23 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -40,7 +40,7 @@
#include <ddb/db_interface.h>
static inline
-unsigned br_dest(unsigned addr, u_int inst)
+u_int br_dest(vaddr_t addr, u_int inst)
{
inst = (inst & 0x03ffffff) << 2;
/* check if sign extension is needed */
@@ -50,8 +50,8 @@ unsigned br_dest(unsigned addr, u_int inst)
}
int frame_is_sane(db_regs_t *regs, int);
-const char *m88k_exception_name(unsigned vector);
-unsigned db_trace_get_val(vaddr_t addr, unsigned *ptr);
+const char *m88k_exception_name(u_int vector);
+u_int db_trace_get_val(vaddr_t addr, u_int *ptr);
/*
* Some macros to tell if the given text is the instruction.
@@ -125,11 +125,12 @@ struct db_variable *db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]);
* Given a word of instruction text, return some flags about that
* instruction (flags defined above).
*/
-static unsigned
-m88k_instruction_info(unsigned instruction)
+static u_int
+m88k_instruction_info(u_int32_t instruction)
{
static const struct {
- unsigned mask, value, flags;
+ u_int32_t mask, value;
+ u_int flags;
} *ptr, control[] = {
/* runs in the same order as 2nd Ed 88100 manual Table 3-14 */
{ 0xf0000000U, 0x00000000U, /* xmem */ TRASHES | STORE | LOAD},
@@ -172,7 +173,7 @@ m88k_instruction_info(unsigned instruction)
}
static int
-hex_value_needs_0x(unsigned value)
+hex_value_needs_0x(u_int value)
{
int c;
int have_a_hex_digit = 0;
@@ -253,7 +254,7 @@ out:
}
const char *
-m88k_exception_name(unsigned vector)
+m88k_exception_name(u_int vector)
{
switch (vector) {
default:
@@ -285,8 +286,8 @@ m88k_exception_name(unsigned vector)
* Read a word at address addr.
* Return 1 if was able to read, 0 otherwise.
*/
-unsigned
-db_trace_get_val(vaddr_t addr, unsigned *ptr)
+u_int
+db_trace_get_val(vaddr_t addr, u_int *ptr)
{
label_t db_jmpbuf;
label_t *prev = db_recover;
@@ -307,15 +308,15 @@ db_trace_get_val(vaddr_t addr, unsigned *ptr)
#define LAST_ARG_REG 9
#define RETURN_VAL_REG 1
-static unsigned global_saved_list = 0x0; /* one bit per register */
-static unsigned local_saved_list = 0x0; /* one bit per register */
-static unsigned trashed_list = 0x0; /* one bit per register */
-static unsigned saved_reg[32]; /* one value per register */
+static u_int global_saved_list = 0x0; /* one bit per register */
+static u_int local_saved_list = 0x0; /* one bit per register */
+static u_int trashed_list = 0x0; /* one bit per register */
+static u_int saved_reg[32]; /* one value per register */
#define reg_bit(reg) 1 << (reg)
static void
-save_reg(int reg, unsigned value)
+save_reg(int reg, u_int value)
{
reg &= 0x1f;
if (trashed_list & reg_bit(reg))
@@ -358,7 +359,7 @@ print_args(void)
if (!have_local_reg(reg))
db_printf("?");
else {
- unsigned value = saved_reg_value(reg);
+ u_int value = saved_reg_value(reg);
db_printf("%s%x", hex_value_needs_0x(value) ?
"0x" : "", value);
}
@@ -396,9 +397,9 @@ print_args(void)
* wrong.
*/
static int
-is_jump_source_ok(unsigned return_to, unsigned jump_to)
+is_jump_source_ok(vaddr_t return_to, vaddr_t jump_to)
{
- unsigned flags;
+ u_int flags;
u_int instruction;
/*
@@ -449,8 +450,8 @@ static int next_address_likely_wrong = 0;
/*
* Stack decode -
- * unsigned addr; program counter
- * unsigned *stack; IN/OUT stack pointer
+ * vaddr_t addr; program counter
+ * vaddr_t *stack; IN/OUT stack pointer
*
* given an address within a function and a stack pointer,
* try to find the function from which this one was called
@@ -466,17 +467,17 @@ static int next_address_likely_wrong = 0;
* stack pointer can be adjusted.
*/
static int
-stack_decode(db_addr_t addr, unsigned *stack, int (*pr)(const char *, ...))
+stack_decode(db_addr_t addr, vaddr_t *stack, int (*pr)(const char *, ...))
{
db_sym_t proc;
db_expr_t offset_from_proc;
- unsigned instructions_to_search;
+ u_int instructions_to_search;
db_addr_t check_addr;
db_addr_t function_addr; /* start of function */
- unsigned r31 = *stack; /* the r31 of the function */
- unsigned inst; /* text of an instruction */
- unsigned ret_addr; /* address to which we return */
- unsigned tried_to_save_r1 = 0;
+ u_int32_t r31 = *stack; /* the r31 of the function */
+ u_int32_t inst; /* text of an instruction */
+ vaddr_t ret_addr; /* address to which we return */
+ u_int tried_to_save_r1 = 0;
/* get what we hope will be the db_sym_t for the function name */
proc = db_search_symbol(addr, DB_STGY_PROC, &offset_from_proc);
@@ -568,8 +569,8 @@ stack_decode(db_addr_t addr, unsigned *stack, int (*pr)(const char *, ...))
for (instructions_to_search = (addr - check_addr)/sizeof(long);
instructions_to_search-- > 0;
check_addr += 4) {
- u_int instruction, s1, d;
- unsigned flags;
+ u_int32_t instruction, s1, d;
+ u_int flags;
/* read the instruction */
if (!db_trace_get_val(check_addr, &instruction))
@@ -584,7 +585,7 @@ stack_decode(db_addr_t addr, unsigned *stack, int (*pr)(const char *, ...))
/* if a store to something off the stack pointer, note the value */
if ((flags & STORE) && s1 == 31 /*stack pointer*/) {
- unsigned value;
+ u_int value;
if (!have_local_reg(d)) {
if (d == 1)
tried_to_save_r1 = r31 +
@@ -648,11 +649,11 @@ stack_decode(db_addr_t addr, unsigned *stack, int (*pr)(const char *, ...))
static void
db_stack_trace_cmd2(db_regs_t *regs, int (*pr)(const char *, ...))
{
- unsigned stack;
- unsigned depth=1;
- unsigned where;
- unsigned ft;
- unsigned pair[2];
+ vaddr_t stack;
+ u_int depth=1;
+ u_int where;
+ u_int ft;
+ u_int pair[2];
int i;
/*
@@ -826,8 +827,8 @@ db_stack_trace_print(db_expr_t addr,
break;
case Stack:
{
- unsigned val1, val2, sxip;
- unsigned ptr;
+ u_int val1, val2, sxip;
+ u_int ptr;
bzero((void *)&frame, sizeof(frame));
#define REASONABLE_FRAME_DISTANCE 2048
diff --git a/sys/arch/m88k/m88k/eh_common.S b/sys/arch/m88k/m88k/eh_common.S
index 09b36a66be8..aedd5f18ad9 100644
--- a/sys/arch/m88k/m88k/eh_common.S
+++ b/sys/arch/m88k/m88k/eh_common.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: eh_common.S,v 1.32 2007/11/15 21:27:22 miod Exp $ */
+/* $OpenBSD: eh_common.S,v 1.33 2007/11/17 05:36:23 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -782,7 +782,7 @@ ASLOCAL(m88110_ignore_data_exception)
#endif /* M88110 */
/*
- * extern boolean_t badaddr(unsigned addr, unsigned len)
+ * extern boolean_t badaddr(vaddr_t addr, u_int len)
*
* Returns true (non-zero) if the given LEN bytes starting at ADDR are
* not all currently accessible by the kernel.
diff --git a/sys/arch/m88k/m88k/m88100_machdep.c b/sys/arch/m88k/m88k/m88100_machdep.c
index a20b648ac47..bc324f982bc 100644
--- a/sys/arch/m88k/m88k/m88100_machdep.c
+++ b/sys/arch/m88k/m88k/m88100_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m88100_machdep.c,v 1.3 2007/05/20 20:12:31 miod Exp $ */
+/* $OpenBSD: m88100_machdep.c,v 1.4 2007/11/17 05:36:23 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -65,10 +65,10 @@ int data_access_emulation_debug = 0;
#endif
void
-dae_print(unsigned *eframe)
+dae_print(u_int *eframe)
{
int x;
- unsigned dmax, dmdx, dmtx;
+ u_int dmax, dmdx, dmtx;
if (!ISSET(eframe[EF_DMT0], DMT_VALID))
return;
@@ -97,11 +97,11 @@ dae_print(unsigned *eframe)
}
void
-data_access_emulation(unsigned *eframe)
+data_access_emulation(u_int *eframe)
{
int x;
- unsigned dmax, dmdx, dmtx;
- unsigned v, reg;
+ u_int dmax, dmdx, dmtx;
+ u_int v, reg;
dmtx = eframe[EF_DMT0];
if (!ISSET(dmtx, DMT_VALID))
diff --git a/sys/arch/m88k/m88k/m88k_machdep.c b/sys/arch/m88k/m88k/m88k_machdep.c
index 5b3b5e4c16f..737e888038c 100644
--- a/sys/arch/m88k/m88k/m88k_machdep.c
+++ b/sys/arch/m88k/m88k/m88k_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m88k_machdep.c,v 1.31 2007/11/15 21:27:22 miod Exp $ */
+/* $OpenBSD: m88k_machdep.c,v 1.32 2007/11/17 05:36:23 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -237,7 +237,7 @@ regdump(struct trapframe *f)
printf("dmt2 %x dmd2 %x dma2 %x\n",
f->tf_dmt2, f->tf_dmd2, f->tf_dma2);
printf("fault type %d\n", (f->tf_dpfsr >> 16) & 0x7);
- dae_print((unsigned *)f);
+ dae_print((u_int *)f);
}
if (CPU_IS88100 && longformat != 0) {
printf("fpsr %x fpcr %x epsr %x ssbr %x\n",
diff --git a/sys/arch/m88k/m88k/sig_machdep.c b/sys/arch/m88k/m88k/sig_machdep.c
index c9940964dfd..e30b95bc3a7 100644
--- a/sys/arch/m88k/m88k/sig_machdep.c
+++ b/sys/arch/m88k/m88k/sig_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sig_machdep.c,v 1.4 2006/01/02 19:46:12 miod Exp $ */
+/* $OpenBSD: sig_machdep.c,v 1.5 2007/11/17 05:36:23 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -118,8 +118,8 @@ sendsig(sig_t catcher, int sig, int mask, unsigned long code, int type,
if (((vaddr_t)fp & 0x07) != 0)
fp = (struct sigframe *)((vaddr_t)fp & ~0x07);
- if ((unsigned)fp <= USRSTACK - ctob(p->p_vmspace->vm_ssize))
- (void)uvm_grow(p, (unsigned)fp);
+ if ((vaddr_t)fp <= USRSTACK - ctob(p->p_vmspace->vm_ssize))
+ (void)uvm_grow(p, (vaddr_t)fp);
#ifdef DEBUG
if ((sigdebug & SDB_FOLLOW) ||
diff --git a/sys/arch/m88k/m88k/trap.c b/sys/arch/m88k/m88k/trap.c
index 5e0d171ccc0..0dedb1e2ee3 100644
--- a/sys/arch/m88k/m88k/trap.c
+++ b/sys/arch/m88k/m88k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.42 2007/11/14 22:56:56 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.43 2007/11/17 05:36:23 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -175,7 +175,7 @@ panictrap(int type, struct trapframe *frame)
#ifdef M88100
void
-m88100_trap(unsigned type, struct trapframe *frame)
+m88100_trap(u_int type, struct trapframe *frame)
{
struct proc *p;
struct vm_map *map;
@@ -183,7 +183,7 @@ m88100_trap(unsigned type, struct trapframe *frame)
vm_prot_t ftype;
int fault_type, pbus_type;
u_long fault_code;
- unsigned fault_addr;
+ vaddr_t fault_addr;
struct vmspace *vm;
union sigval sv;
int result;
@@ -300,7 +300,7 @@ m88100_trap(unsigned type, struct trapframe *frame)
* to drain the data unit pipe line and reset dmt0
* so that trap won't get called again.
*/
- data_access_emulation((unsigned *)frame);
+ data_access_emulation((u_int *)frame);
frame->tf_dpfsr = 0;
frame->tf_dmt0 = 0;
KERNEL_UNLOCK();
@@ -318,7 +318,7 @@ m88100_trap(unsigned type, struct trapframe *frame)
* unit pipe line and reset dmt0 so that trap
* won't get called again.
*/
- data_access_emulation((unsigned *)frame);
+ data_access_emulation((u_int *)frame);
frame->tf_dpfsr = 0;
frame->tf_dmt0 = 0;
KERNEL_UNLOCK();
@@ -425,7 +425,7 @@ user_fault:
* pipe line and reset dmt0 so that trap won't
* get called again.
*/
- data_access_emulation((unsigned *)frame);
+ data_access_emulation((u_int *)frame);
frame->tf_dpfsr = 0;
frame->tf_dmt0 = 0;
}
@@ -575,7 +575,7 @@ user_fault:
#ifdef M88110
void
-m88110_trap(unsigned type, struct trapframe *frame)
+m88110_trap(u_int type, struct trapframe *frame)
{
struct proc *p;
struct vm_map *map;
@@ -583,7 +583,7 @@ m88110_trap(unsigned type, struct trapframe *frame)
vm_prot_t ftype;
int fault_type;
u_long fault_code;
- unsigned fault_addr;
+ vaddr_t fault_addr;
struct vmspace *vm;
union sigval sv;
int result;
@@ -1602,8 +1602,8 @@ int
process_sstep(struct proc *p, int sstep)
{
struct reg *sstf = USER_REGS(p);
- unsigned pc, brpc;
- unsigned instr;
+ vaddr_t pc, brpc;
+ u_int32_t instr;
int rc;
if (sstep == 0) {
diff --git a/sys/arch/mvme88k/include/m88110.h b/sys/arch/mvme88k/include/m88110.h
index 1f1548ffdcd..a3edd8df00d 100644
--- a/sys/arch/mvme88k/include/m88110.h
+++ b/sys/arch/mvme88k/include/m88110.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: m88110.h,v 1.17 2004/06/22 04:55:35 miod Exp $ */
+/* $OpenBSD: m88110.h,v 1.18 2007/11/17 05:36:23 miod Exp $ */
#ifndef __MACHINE_M88110_H__
#define __MACHINE_M88110_H__
@@ -125,48 +125,48 @@
#ifndef _LOCORE
-void set_icmd(unsigned value);
-void set_ictl(unsigned value);
-void set_isar(unsigned value);
-void set_isap(unsigned value);
-void set_iuap(unsigned value);
-void set_iir(unsigned value);
-void set_ibp(unsigned value);
-void set_ippu(unsigned value);
-void set_ippl(unsigned value);
-void set_isr(unsigned value);
-void set_dcmd(unsigned value);
-void set_dctl(unsigned value);
-void set_dsar(unsigned value);
-void set_dsap(unsigned value);
-void set_duap(unsigned value);
-void set_dir(unsigned value);
-void set_dbp(unsigned value);
-void set_dppu(unsigned value);
-void set_dppl(unsigned value);
-void set_dsr(unsigned value);
+void set_icmd(u_int value);
+void set_ictl(u_int value);
+void set_isar(u_int value);
+void set_isap(u_int value);
+void set_iuap(u_int value);
+void set_iir(u_int value);
+void set_ibp(u_int value);
+void set_ippu(u_int value);
+void set_ippl(u_int value);
+void set_isr(u_int value);
+void set_dcmd(u_int value);
+void set_dctl(u_int value);
+void set_dsar(u_int value);
+void set_dsap(u_int value);
+void set_duap(u_int value);
+void set_dir(u_int value);
+void set_dbp(u_int value);
+void set_dppu(u_int value);
+void set_dppl(u_int value);
+void set_dsr(u_int value);
/* get routines */
-unsigned get_icmd(void);
-unsigned get_ictl(void);
-unsigned get_isar(void);
-unsigned get_isap(void);
-unsigned get_iuap(void);
-unsigned get_iir(void);
-unsigned get_ibp(void);
-unsigned get_ippu(void);
-unsigned get_ippl(void);
-unsigned get_isr(void);
-unsigned get_dcmd(void);
-unsigned get_dctl(void);
-unsigned get_dsar(void);
-unsigned get_dsap(void);
-unsigned get_duap(void);
-unsigned get_dir(void);
-unsigned get_dbp(void);
-unsigned get_dppu(void);
-unsigned get_dppl(void);
-unsigned get_dsr(void);
+u_int get_icmd(void);
+u_int get_ictl(void);
+u_int get_isar(void);
+u_int get_isap(void);
+u_int get_iuap(void);
+u_int get_iir(void);
+u_int get_ibp(void);
+u_int get_ippu(void);
+u_int get_ippl(void);
+u_int get_isr(void);
+u_int get_dcmd(void);
+u_int get_dctl(void);
+u_int get_dsar(void);
+u_int get_dsap(void);
+u_int get_duap(void);
+u_int get_dir(void);
+u_int get_dbp(void);
+u_int get_dppu(void);
+u_int get_dppl(void);
+u_int get_dsr(void);
/* Cache inlines */
@@ -175,7 +175,7 @@ unsigned get_dsr(void);
static __inline__ void mc88110_flush_data_line(paddr_t x)
{
- unsigned dctl = get_dctl();
+ u_int dctl = get_dctl();
if (dctl & CMMU_DCTL_CEN) {
set_dsar(line_addr(x));
set_dcmd(CMMU_DCMD_FLUSH_LINE);
@@ -184,7 +184,7 @@ static __inline__ void mc88110_flush_data_line(paddr_t x)
static __inline__ void mc88110_flush_data_page(paddr_t x)
{
- unsigned dctl = get_dctl();
+ u_int dctl = get_dctl();
if (dctl & CMMU_DCTL_CEN) {
set_dsar(page_addr(x));
set_dcmd(CMMU_DCMD_FLUSH_PG);
@@ -193,7 +193,7 @@ static __inline__ void mc88110_flush_data_page(paddr_t x)
static __inline__ void mc88110_flush_data(void)
{
- unsigned dctl = get_dctl();
+ u_int dctl = get_dctl();
if (dctl & CMMU_DCTL_CEN) {
set_dcmd(CMMU_DCMD_FLUSH_ALL);
}
@@ -212,7 +212,7 @@ static __inline__ void mc88110_inval_data(void)
static __inline__ void mc88110_sync_data_line(paddr_t x)
{
- unsigned dctl = get_dctl();
+ u_int dctl = get_dctl();
if (dctl & CMMU_DCTL_CEN) {
set_dsar(line_addr(x));
set_dcmd(CMMU_DCMD_FLUSH_LINE_INV);
@@ -221,7 +221,7 @@ static __inline__ void mc88110_sync_data_line(paddr_t x)
static __inline__ void mc88110_sync_data_page(paddr_t x)
{
- unsigned dctl = get_dctl();
+ u_int dctl = get_dctl();
if (dctl & CMMU_DCTL_CEN) {
set_dsar(page_addr(x));
set_dcmd(CMMU_DCMD_FLUSH_PG_INV);
@@ -230,7 +230,7 @@ static __inline__ void mc88110_sync_data_page(paddr_t x)
static __inline__ void mc88110_sync_data(void)
{
- unsigned dctl = get_dctl();
+ u_int dctl = get_dctl();
if (dctl & CMMU_DCTL_CEN) {
set_dcmd(CMMU_DCMD_FLUSH_ALL_INV);
}
diff --git a/sys/arch/mvme88k/mvme88k/m188_machdep.c b/sys/arch/mvme88k/mvme88k/m188_machdep.c
index 31b6bdef70d..52a290c48a1 100644
--- a/sys/arch/mvme88k/mvme88k/m188_machdep.c
+++ b/sys/arch/mvme88k/mvme88k/m188_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m188_machdep.c,v 1.41 2007/11/17 05:32:05 miod Exp $ */
+/* $OpenBSD: m188_machdep.c,v 1.42 2007/11/17 05:36:23 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -157,14 +157,14 @@ void m188_startup(void);
/*
* Copy of the interrupt enable register for each CPU.
*/
-unsigned int int_mask_reg[] = { 0, 0, 0, 0 };
+u_int32_t int_mask_reg[] = { 0, 0, 0, 0 };
u_int m188_curspl[] = { IPL_NONE, IPL_NONE, IPL_NONE, IPL_NONE };
/*
* external interrupt masks per spl.
*/
-const unsigned int int_mask_val[INT_LEVEL] = {
+const u_int32_t int_mask_val[INT_LEVEL] = {
MASK_LVL_0,
MASK_LVL_1,
MASK_LVL_2,
@@ -189,7 +189,7 @@ const unsigned int int_mask_val[INT_LEVEL] = {
vaddr_t
m188_memsize()
{
- unsigned int pgnum;
+ u_int pgnum;
int32_t rmad;
#define MVME188_MAX_MEMORY ((4 * 64) / 4) /* 4 64MB boards */
@@ -443,7 +443,7 @@ m188_clock_ipi_handler(struct trapframe *eframe)
* Hard coded vector table for onboard devices and hardware failure
* interrupts.
*/
-const unsigned int obio_vec[32] = {
+const u_int obio_vec[32] = {
0, /* SWI0 */
0, /* SWI1 */
0, /* SWI2 */
@@ -490,7 +490,7 @@ m188_ext_int(u_int v, struct trapframe *eframe)
#else
u_int cpu = cpu_number();
#endif
- unsigned int cur_mask, ign_mask;
+ u_int32_t cur_mask, ign_mask;
u_int level, old_spl;
struct intrhand *intr;
intrhand_t *list;
@@ -703,7 +703,7 @@ out:
* Clock routines
*/
-void m188_cio_init(unsigned);
+void m188_cio_init(u_int);
u_int read_cio(int);
void write_cio(int, u_int);
@@ -930,7 +930,7 @@ read_cio(int reg)
* Only the counter/timers are used - the IO ports are un-comitted.
*/
void
-m188_cio_init(unsigned period)
+m188_cio_init(u_int period)
{
volatile int i;
diff --git a/sys/arch/mvme88k/mvme88k/m197_machdep.c b/sys/arch/mvme88k/mvme88k/m197_machdep.c
index 6a33e498703..6a1addea5f1 100644
--- a/sys/arch/mvme88k/mvme88k/m197_machdep.c
+++ b/sys/arch/mvme88k/mvme88k/m197_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m197_machdep.c,v 1.15 2007/11/17 05:32:05 miod Exp $ */
+/* $OpenBSD: m197_machdep.c,v 1.16 2007/11/17 05:36:23 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -117,7 +117,7 @@ m197_memsize()
*look = save;
}
- return (trunc_page((unsigned)look));
+ return (trunc_page((vaddr_t)look));
}
void
diff --git a/sys/arch/mvme88k/mvme88k/m88110.c b/sys/arch/mvme88k/mvme88k/m88110.c
index cd41cb49e7d..3b4c87c1c72 100644
--- a/sys/arch/mvme88k/mvme88k/m88110.c
+++ b/sys/arch/mvme88k/mvme88k/m88110.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m88110.c,v 1.38 2007/02/11 12:49:38 miod Exp $ */
+/* $OpenBSD: m88110.c,v 1.39 2007/11/17 05:36:23 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* All rights reserved.
@@ -79,7 +79,7 @@ void m88110_shutdown(void);
cpuid_t m88110_cpu_number(void);
void m88110_set_sapr(cpuid_t, apr_t);
void m88110_set_uapr(apr_t);
-void m88110_flush_tlb(cpuid_t, unsigned, vaddr_t, u_int);
+void m88110_flush_tlb(cpuid_t, u_int, vaddr_t, u_int);
void m88110_flush_cache(cpuid_t, paddr_t, psize_t);
void m88110_flush_inst_cache(cpuid_t, paddr_t, psize_t);
void m88110_flush_data_page(cpuid_t, paddr_t);
@@ -297,7 +297,7 @@ m88110_set_uapr(apr_t ap)
* flush any tlb
*/
void
-m88110_flush_tlb(cpuid_t cpu, unsigned kernel, vaddr_t vaddr, u_int count)
+m88110_flush_tlb(cpuid_t cpu, u_int kernel, vaddr_t vaddr, u_int count)
{
u_int32_t psr;
diff --git a/sys/arch/mvme88k/mvme88k/m8820x.c b/sys/arch/mvme88k/mvme88k/m8820x.c
index 0208c214cd8..98fbd15b889 100644
--- a/sys/arch/mvme88k/mvme88k/m8820x.c
+++ b/sys/arch/mvme88k/mvme88k/m8820x.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m8820x.c,v 1.48 2007/11/17 05:33:40 miod Exp $ */
+/* $OpenBSD: m8820x.c,v 1.49 2007/11/17 05:36:23 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
*
@@ -153,7 +153,7 @@ m8820x_setup_board_config()
* Check CMMU type
*/
for (cmmu_num = 0; cmmu_num < max_cmmus; cmmu_num++) {
- volatile unsigned *cr = m8820x_cmmu[cmmu_num].cmmu_regs;
+ volatile u_int32_t *cr = m8820x_cmmu[cmmu_num].cmmu_regs;
if (badaddr((vaddr_t)cr, 4) == 0) {
int type;
@@ -203,8 +203,8 @@ m8820x_setup_board_config()
* discarded. Just don't do this on a 187...
*/
if (brdtyp == BRD_188) {
- *(volatile unsigned long *)MVME188_PCNFA = 0;
- *(volatile unsigned long *)MVME188_PCNFB = 0;
+ *(volatile u_int32_t *)MVME188_PCNFA = 0;
+ *(volatile u_int32_t *)MVME188_PCNFB = 0;
}
/*
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index cf5975048e9..a5da86354a8 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.202 2007/11/17 05:32:05 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.203 2007/11/17 05:36:23 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -1012,7 +1012,7 @@ mvme_bootstrap()
printf("MVME%x boot: memory from 0x%x to 0x%x\n",
brdtyp, avail_start, avail_end);
#endif
- pmap_bootstrap((vaddr_t)trunc_page((unsigned)&kernelstart));
+ pmap_bootstrap((vaddr_t)trunc_page((vaddr_t)&kernelstart));
/*
* Tell the VM system about available physical memory.