summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog22
-rw-r--r--i386/i386/locore.h4
-rw-r--r--i386/i386at/com.c2
-rw-r--r--i386/i386at/kd.c2
-rw-r--r--i386/i386at/kd_mouse.c2
-rw-r--r--i386/i386at/lpr.c2
-rw-r--r--i386/intel/pmap.c2
-rw-r--r--i386/intel/pmap.h6
-rw-r--r--ipc/ipc_kmsg.c4
-rw-r--r--ipc/mach_msg.c12
-rw-r--r--kern/bootstrap.c2
-rw-r--r--kern/exception.c2
-rw-r--r--kern/ipc_tt.c2
13 files changed, 43 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index f41c302..2da21aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2008-07-23 Barry deFreese <bddebian@comcast.net>
+
+ * i386/i386/locore.h (copyinmsg, copyoutmsg):
+ Make parameters const void* and void* instead of vm_offset_t.
+ * i386/i386at/com.c (comportdeath): Cast port as ipc_port_t in
+ tty_portdeath call.
+ * i386/i386at/kd.c (kdportdeath): Likewise.
+ * i386/i386at/lpr.c (lprportdeath): Likewise.
+ * i386/i386at/kd_mouse.c (mouse_handle_byte): Cast param to wakeup() as
+ vm_offset_t.
+ * i386/intel/pmap.c (pmap_destroy): Cast arg 2 of kmem_free() to
+ vm_offset_t.
+ * i386/intel/pmap.h: Cast all arg 1 params to kvtophy() to vm_offset_t.
+ * ipc/ipc_kmsg.c: Remove casts from params to copyinmsg and
+ copyoutmsg calls.
+ * ipc/mach_msg.c: Likewise.
+ * kern/exceptions.c: Likewise.
+ * ipc/mach_msg.c: Remove casts from params to copyout calls.
+ * ipc/bootstrap.c: Likewise.
+ * kern/ipc_tt.c (mach_ports_register): Cast memory[i] as ipc_port_t in
+ assignment.
+
2008-07-19 Barry deFreese <bddebian@comcast.net>
* chips/busses.h (bus_ctlr, bus_device): Make intr return void instead
diff --git a/i386/i386/locore.h b/i386/i386/locore.h
index b873e6f..5701430 100644
--- a/i386/i386/locore.h
+++ b/i386/i386/locore.h
@@ -26,11 +26,11 @@
extern int copyin (const void *userbuf, void *kernelbuf, size_t cn);
-extern int copyinmsg (vm_offset_t userbuf, vm_offset_t kernelbuf, size_t cn);
+extern int copyinmsg (const void *userbuf, void *kernelbuf, size_t cn);
extern int copyout (const void *kernelbuf, void *userbuf, size_t cn);
-extern int copyoutmsg (vm_offset_t kernelbuf, vm_offset_t userbuf, size_t cn);
+extern int copyoutmsg (const void *kernelbuf, void *userbuf, size_t cn);
extern int call_continuation (continuation_t continuation);
diff --git a/i386/i386at/com.c b/i386/i386at/com.c
index a4cfbf8..4ba625d 100644
--- a/i386/i386at/com.c
+++ b/i386/i386at/com.c
@@ -433,7 +433,7 @@ io_return_t comportdeath(dev, port)
dev_t dev;
mach_port_t port;
{
- return (tty_portdeath(&com_tty[minor(dev)], port));
+ return (tty_portdeath(&com_tty[minor(dev)], (ipc_port_t)port));
}
io_return_t
diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c
index 8975ad1..a0a36b7 100644
--- a/i386/i386at/kd.c
+++ b/i386/i386at/kd.c
@@ -590,7 +590,7 @@ kdportdeath(dev, port)
dev_t dev;
mach_port_t port;
{
- return (tty_portdeath(&kd_tty, port));
+ return (tty_portdeath(&kd_tty, (ipc_port_t)port));
}
/*ARGSUSED*/
diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c
index 94ebd79..0b4acc2 100644
--- a/i386/i386at/kd_mouse.c
+++ b/i386/i386at/kd_mouse.c
@@ -603,7 +603,7 @@ mouse_handle_byte(ch)
mousebuf[mousebufindex++] = ch;
if (mouse_char_wanted) {
mouse_char_wanted = FALSE;
- wakeup(&mousebuf);
+ wakeup((vm_offset_t)&mousebuf);
}
return;
}
diff --git a/i386/i386at/lpr.c b/i386/i386at/lpr.c
index ee8e721..07e8414 100644
--- a/i386/i386at/lpr.c
+++ b/i386/i386at/lpr.c
@@ -203,7 +203,7 @@ lprportdeath(dev, port)
dev_t dev;
mach_port_t port;
{
- return (tty_portdeath(&lpr_tty[minor(dev)], port));
+ return (tty_portdeath(&lpr_tty[minor(dev)], (ipc_port_t)port));
}
io_return_t
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index 539e3f0..b08252e 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -927,7 +927,7 @@ void pmap_destroy(p)
vm_object_unlock(pmap_object);
}
}
- kmem_free(kernel_map, p->dirbase, INTEL_PGBYTES);
+ kmem_free(kernel_map, (vm_offset_t)p->dirbase, INTEL_PGBYTES);
zfree(pmap_zone, (vm_offset_t) p);
}
diff --git a/i386/intel/pmap.h b/i386/intel/pmap.h
index b16d984..c1d741b 100644
--- a/i386/intel/pmap.h
+++ b/i386/intel/pmap.h
@@ -234,7 +234,7 @@ pt_entry_t *pmap_pte(pmap_t pmap, vm_offset_t addr);
/* \
* If this is the kernel pmap, switch to its page tables. \
*/ \
- set_dirbase(kvtophys(tpmap->dirbase)); \
+ set_dirbase(kvtophys((vm_offset_t)tpmap->dirbase)); \
} \
else { \
/* \
@@ -252,7 +252,7 @@ pt_entry_t *pmap_pte(pmap_t pmap, vm_offset_t addr);
* No need to invalidate the TLB - the entire user pmap \
* will be invalidated by reloading dirbase. \
*/ \
- set_dirbase(kvtophys(tpmap->dirbase)); \
+ set_dirbase(kvtophys((vm_offset_t)tpmap->dirbase)); \
\
/* \
* Mark that this cpu is using the pmap. \
@@ -341,7 +341,7 @@ pt_entry_t *pmap_pte(pmap_t pmap, vm_offset_t addr);
#define PMAP_ACTIVATE_USER(pmap, th, my_cpu) { \
register pmap_t tpmap = (pmap); \
\
- set_dirbase(kvtophys(tpmap->dirbase)); \
+ set_dirbase(kvtophys((vm_offset_t)tpmap->dirbase)); \
if (tpmap != kernel_pmap) { \
tpmap->cpus_using = TRUE; \
} \
diff --git a/ipc/ipc_kmsg.c b/ipc/ipc_kmsg.c
index dff0540..a12c947 100644
--- a/ipc/ipc_kmsg.c
+++ b/ipc/ipc_kmsg.c
@@ -531,7 +531,7 @@ ipc_kmsg_get(msg, size, kmsgp)
ikm_init(kmsg, size);
}
- if (copyinmsg((char *) msg, (char *) &kmsg->ikm_header, size)) {
+ if (copyinmsg(msg, &kmsg->ikm_header, size)) {
ikm_free(kmsg);
return MACH_SEND_INVALID_DATA;
}
@@ -601,7 +601,7 @@ ipc_kmsg_put(msg, kmsg, size)
ikm_check_initialized(kmsg, kmsg->ikm_size);
- if (copyoutmsg((char *) &kmsg->ikm_header, (char *) msg, size))
+ if (copyoutmsg(&kmsg->ikm_header, msg, size))
mr = MACH_RCV_INVALID_DATA;
else
mr = MACH_MSG_SUCCESS;
diff --git a/ipc/mach_msg.c b/ipc/mach_msg.c
index e6bcf61..43ae918 100644
--- a/ipc/mach_msg.c
+++ b/ipc/mach_msg.c
@@ -222,8 +222,8 @@ mach_msg_receive(msg, option, rcv_size, rcv_name, time_out, notify)
assert(real_size > rcv_size);
- (void) copyout((vm_offset_t) &real_size,
- (vm_offset_t) &msg->msgh_size,
+ (void) copyout(&real_size,
+ &msg->msgh_size,
sizeof(mach_msg_size_t));
}
@@ -313,8 +313,8 @@ mach_msg_receive_continue(void)
assert(real_size > rcv_size);
- (void) copyout((vm_offset_t) &real_size,
- (vm_offset_t) &msg->msgh_size,
+ (void) copyout(&real_size,
+ &msg->msgh_size,
sizeof(mach_msg_size_t));
}
@@ -460,7 +460,7 @@ mach_msg_trap(msg, option, send_size, rcv_size, rcv_name, time_out, notify)
ikm_cache() = IKM_NULL;
ikm_check_initialized(kmsg, IKM_SAVED_KMSG_SIZE);
- if (copyinmsg((vm_offset_t) msg, (vm_offset_t) &kmsg->ikm_header,
+ if (copyinmsg(msg, &kmsg->ikm_header,
send_size)) {
ikm_free(kmsg);
goto slow_get;
@@ -1244,7 +1244,7 @@ mach_msg_trap(msg, option, send_size, rcv_size, rcv_name, time_out, notify)
ikm_check_initialized(kmsg, kmsg->ikm_size);
if ((kmsg->ikm_size != IKM_SAVED_KMSG_SIZE) ||
- copyoutmsg((vm_offset_t) &kmsg->ikm_header, (vm_offset_t) msg,
+ copyoutmsg(&kmsg->ikm_header, msg,
reply_size) ||
(ikm_cache() != IKM_NULL))
goto slow_put;
diff --git a/kern/bootstrap.c b/kern/bootstrap.c
index ac95393..235aa7b 100644
--- a/kern/bootstrap.c
+++ b/kern/bootstrap.c
@@ -435,7 +435,7 @@ read_exec(void *handle, vm_offset_t file_ofs, vm_size_t file_size,
if (file_size > 0)
{
err = copyout((char *)phystokv (mod->mod_start) + file_ofs,
- mem_addr, file_size);
+ (void *)mem_addr, file_size);
assert(err == 0);
}
diff --git a/kern/exception.c b/kern/exception.c
index 258fedf..453a075 100644
--- a/kern/exception.c
+++ b/kern/exception.c
@@ -693,7 +693,7 @@ exception_raise(dest_port, thread_port, task_port,
ikm_check_initialized(kmsg, kmsg->ikm_size);
assert(kmsg->ikm_size == IKM_SAVED_KMSG_SIZE);
- if (copyoutmsg((vm_offset_t) &kmsg->ikm_header, (vm_offset_t)receiver->ith_msg,
+ if (copyoutmsg(&kmsg->ikm_header, receiver->ith_msg,
sizeof(struct mach_exception)) ||
(ikm_cache() != IKM_NULL)) {
mr = ipc_kmsg_put(receiver->ith_msg, kmsg,
diff --git a/kern/ipc_tt.c b/kern/ipc_tt.c
index e14ebac..de4edc6 100644
--- a/kern/ipc_tt.c
+++ b/kern/ipc_tt.c
@@ -833,7 +833,7 @@ mach_ports_register(
*/
for (i = 0; i < portsCnt; i++)
- ports[i] = memory[i];
+ ports[i] = (ipc_port_t)memory[i];
for (; i < TASK_PORT_REGISTER_MAX; i++)
ports[i] = IP_NULL;