minix/ changes for arm llvm build
. fixes needed to build Minix/ARM with LLVM without errors, mostly size_t cleanness Change-Id: If4dd0a23bc5cb399296073920a8940c34b4caef4
This commit is contained in:
parent
7f59afadd5
commit
3c8950cce9
|
@ -464,8 +464,7 @@ lan8710a_stop(void)
|
|||
* lan8710a_dma_config_tx *
|
||||
*============================================================================*/
|
||||
static void
|
||||
lan8710a_dma_config_tx(desc_idx)
|
||||
u8_t desc_idx;
|
||||
lan8710a_dma_config_tx(u8_t desc_idx)
|
||||
{
|
||||
phys_bytes phys_addr;
|
||||
int i;
|
||||
|
|
|
@ -99,7 +99,7 @@ mmc_write32(vir_bytes reg, u32_t value)
|
|||
write32(mmchs->io_base + reg, value);
|
||||
}
|
||||
|
||||
int
|
||||
void
|
||||
mmchs_set_bus_freq(u32_t freq)
|
||||
{
|
||||
u32_t freq_in = HSMMCSD_0_IN_FREQ;
|
||||
|
@ -971,7 +971,7 @@ dump(uint8_t * data, int len)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
void
|
||||
mmc_switch(int function, int value, uint8_t * data)
|
||||
{
|
||||
struct mmc_command command;
|
||||
|
@ -990,7 +990,7 @@ mmc_switch(int function, int value, uint8_t * data)
|
|||
command.args |= (value << fshift);
|
||||
if (mmc_send_cmd(&command)) {
|
||||
log_warn(&log, "Failed to set device in high speed mode\n");
|
||||
return 1;
|
||||
return;
|
||||
}
|
||||
// dump(data,64);
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ hcd_handle_event(hcd_device_state * device, hcd_event event, hcd_reg1 val)
|
|||
"for 'hub port LS attach' event");
|
||||
|
||||
USB_MSG("Low speed device connected at "
|
||||
"hub 0x%08X, port %u", device, val);
|
||||
"hub 0x%p, port %u", device, val);
|
||||
|
||||
hcd_add_child(device, val, HCD_SPEED_LOW);
|
||||
break;
|
||||
|
@ -138,7 +138,7 @@ hcd_handle_event(hcd_device_state * device, hcd_event event, hcd_reg1 val)
|
|||
"for 'hub port FS attach' event");
|
||||
|
||||
USB_MSG("Full speed device connected at "
|
||||
"hub 0x%08X, port %u", device, val);
|
||||
"hub 0x%p, port %u", device, val);
|
||||
|
||||
hcd_add_child(device, val, HCD_SPEED_FULL);
|
||||
break;
|
||||
|
@ -149,7 +149,7 @@ hcd_handle_event(hcd_device_state * device, hcd_event event, hcd_reg1 val)
|
|||
"for 'hub port HS attach' event");
|
||||
|
||||
USB_MSG("High speed device connected at "
|
||||
"hub 0x%08X, port %u", device, val);
|
||||
"hub 0x%p, port %u", device, val);
|
||||
|
||||
hcd_add_child(device, val, HCD_SPEED_HIGH);
|
||||
break;
|
||||
|
@ -162,7 +162,7 @@ hcd_handle_event(hcd_device_state * device, hcd_event event, hcd_reg1 val)
|
|||
hcd_delete_child(device, val);
|
||||
|
||||
USB_MSG("Device disconnected from "
|
||||
"hub 0x%08X, port %u", device, val);
|
||||
"hub 0x%p, port %u", device, val);
|
||||
|
||||
break;
|
||||
|
||||
|
@ -456,7 +456,7 @@ hcd_dump_tree(hcd_device_state * device, hcd_reg1 level)
|
|||
|
||||
/* DEBUG_DUMP; */ /* Let's keep tree output cleaner */
|
||||
|
||||
USB_MSG("Device on level %03u: 0x%08X", level, device);
|
||||
USB_MSG("Device on level %03u: 0x%p", level, device);
|
||||
|
||||
/* Traverse device tree recursively */
|
||||
for (child_num = 0; child_num < HCD_CHILDREN; child_num++) {
|
||||
|
|
|
@ -254,8 +254,8 @@ ddekit_usb_init(struct ddekit_usb_driver * drv,
|
|||
connect_cb = drv->connect;
|
||||
disconnect_cb = drv->disconnect;
|
||||
|
||||
*_m = malloc;
|
||||
*_f = free;
|
||||
*_m = (ddekit_usb_malloc_fn) malloc;
|
||||
*_f = (ddekit_usb_free_fn) free;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -283,7 +283,7 @@ arch_put_varscreeninfo(int minor, struct fb_var_screeninfo *fbvsp)
|
|||
|
||||
/* For now we only allow to play with the yoffset setting */
|
||||
if (fbvsp->yoffset != omap_fbvs[minor].yoffset) {
|
||||
if (fbvsp->yoffset < 0 || fbvsp->yoffset > omap_fbvs[minor].yres) {
|
||||
if (/* fbvsp->yoffset < 0 || */ fbvsp->yoffset > omap_fbvs[minor].yres) {
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ MINC_OBJS_UNPAGED= atoi.o \
|
|||
strcmp.o strcpy.o strlen.o strncmp.o \
|
||||
memcpy.o memmove.o memset.o \
|
||||
udivdi3.o umoddi3.o qdivrem.o
|
||||
MINC_OBJS_UNPAGED+= __aeabi_ldiv0.o __aeabi_idiv0.o __aeabi_uldivmod.o divide.o divsi3.o udivsi3.o
|
||||
MINC_OBJS_UNPAGED+= __aeabi_ldiv0.o __aeabi_idiv0.o __aeabi_uldivmod.o divide.o divsi3.o udivsi3.o umodsi3.o
|
||||
atoi.o: ${NETBSDSRCDIR}/minix/lib/libminc/atoi.c
|
||||
printf.o: ${NETBSDSRCDIR}/sys/lib/libsa/printf.c
|
||||
subr_prf.o: ${NETBSDSRCDIR}/sys/lib/libsa/subr_prf.c
|
||||
|
@ -37,6 +37,7 @@ __aeabi_uldivmod.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/quad/__aeabi_uldivm
|
|||
divide.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/gen/divide.S
|
||||
divsi3.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/gen/divsi3.S
|
||||
udivsi3.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/gen/udivsi3.S
|
||||
umodsi3.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/gen/umodsi3.S
|
||||
|
||||
# the following is required by pre_init.c
|
||||
strncmp.o: ${NETBSDSRCDIR}/common/lib/libc/string/strncmp.c
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
#include "hw_intr.h"
|
||||
#include "bsp_intr.h"
|
||||
|
||||
int hw_intr_mask(int irq){
|
||||
void hw_intr_mask(int irq){
|
||||
bsp_irq_mask(irq);
|
||||
}
|
||||
|
||||
int hw_intr_unmask(int irq){
|
||||
void hw_intr_unmask(int irq){
|
||||
bsp_irq_unmask(irq);
|
||||
}
|
||||
|
||||
int hw_intr_ack(int irq){};
|
||||
int hw_intr_used(int irq){};
|
||||
int hw_intr_not_used(int irq){};
|
||||
int hw_intr_disable_all(){};
|
||||
void hw_intr_ack(int irq){};
|
||||
void hw_intr_used(int irq){};
|
||||
void hw_intr_not_used(int irq){};
|
||||
void hw_intr_disable_all(){};
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
#include "kernel/kernel.h"
|
||||
void irq_handle(int irq);
|
||||
|
||||
int hw_intr_mask(int irq);
|
||||
int hw_intr_unmask(int irq);
|
||||
int hw_intr_ack(int irq);
|
||||
int hw_intr_used(int irq);
|
||||
int hw_intr_not_used(int irq);
|
||||
int hw_intr_disable_all();
|
||||
void hw_intr_mask(int irq);
|
||||
void hw_intr_unmask(int irq);
|
||||
void hw_intr_ack(int irq);
|
||||
void hw_intr_used(int irq);
|
||||
void hw_intr_not_used(int irq);
|
||||
void hw_intr_disable_all();
|
||||
|
||||
#endif /* __HW_INTR_ARM_H__ */
|
||||
|
|
|
@ -422,5 +422,5 @@ void minix_shutdown(minix_timer_t *t) { arch_shutdown(0); }
|
|||
void busy_delay_ms(int x) { }
|
||||
int raise(int n) { panic("raise(%d)\n", n); }
|
||||
int kern_phys_map_ptr( phys_bytes base_address, vir_bytes io_size, int vm_flags,
|
||||
struct kern_phys_map * priv, vir_bytes ptr) {};
|
||||
struct kern_phys_map * priv, vir_bytes ptr) { return -1; };
|
||||
struct machine machine; /* pre init stage machine */
|
||||
|
|
|
@ -1095,7 +1095,7 @@ int mini_notify(
|
|||
|
||||
#define ASCOMPLAIN(caller, entry, field) \
|
||||
printf("kernel:%s:%d: asyn failed for %s in %s " \
|
||||
"(%d/%d, tab 0x%lx)\n",__FILE__,__LINE__, \
|
||||
"(%d/%zu, tab 0x%lx)\n",__FILE__,__LINE__, \
|
||||
field, caller->p_name, entry, priv(caller)->s_asynsize, priv(caller)->s_asyntab)
|
||||
|
||||
#define A_RETR_FLD(entry, field) \
|
||||
|
|
|
@ -14,6 +14,8 @@ SRCS= buf.c clock.c inet.c inet_config.c \
|
|||
|
||||
WARNS=
|
||||
|
||||
NOCLANGERROR=yes
|
||||
|
||||
DPADD+= ${LIBCHARDRIVER} ${LIBSYS}
|
||||
LDADD+= -lchardriver -lsys
|
||||
|
||||
|
|
|
@ -1149,7 +1149,7 @@ acc_t *acc;
|
|||
}
|
||||
if (acc->acc_offset + acc->acc_length > buffer->buf_size)
|
||||
{
|
||||
printf("%d + %d > %d for buffer %p, and acc %p\n",
|
||||
printf("%d + %d > %zu for buffer %p, and acc %p\n",
|
||||
acc->acc_offset, acc->acc_length,
|
||||
buffer->buf_size, buffer, acc);
|
||||
return 0;
|
||||
|
|
|
@ -54,7 +54,7 @@ clock_t tim;
|
|||
}
|
||||
else if (!curr_time)
|
||||
{
|
||||
DBLOCK(0x20, printf("set_time: new time %lu < prev_time %lu\n",
|
||||
DBLOCK(0x20, printf("set_time: new time %u < prev_time %u\n",
|
||||
tim, prev_time));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,10 +134,10 @@ void bf_logon ARGS(( bf_freereq_t func, bf_checkreq_t checkfunc ));
|
|||
#endif
|
||||
|
||||
#ifndef BUF_TRACK_ALLOC_FREE
|
||||
acc_t *bf_memreq ARGS(( unsigned size));
|
||||
acc_t *bf_memreq ARGS(( size_t size));
|
||||
#else
|
||||
acc_t *_bf_memreq ARGS(( char *clnt_file, int clnt_line,
|
||||
unsigned size));
|
||||
size_t size));
|
||||
#endif
|
||||
/* the result is an acc with linkC == 1 */
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ void data_store_dmp()
|
|||
printf("%-10s %12s\n", "STR", (char*) p->u.mem.data);
|
||||
break;
|
||||
case DSF_TYPE_MEM:
|
||||
printf("%-10s %12u\n", "MEM", p->u.mem.length);
|
||||
printf("%-10s %12zu\n", "MEM", p->u.mem.length);
|
||||
break;
|
||||
case DSF_TYPE_LABEL:
|
||||
printf("%-10s %12u\n", "LABEL", p->u.u32);
|
||||
|
|
|
@ -163,7 +163,7 @@ size_t seg_bytes /* how much is to be transferred? */
|
|||
if((r= sys_datacopy(SELF, ((vir_bytes)execi->hdr)+off,
|
||||
execi->proc_e, seg_addr, seg_bytes)) != OK) {
|
||||
printf("RS: exec read_seg: copy 0x%x bytes into %i at 0x%08lx failed: %i\n",
|
||||
seg_bytes, execi->proc_e, seg_addr, r);
|
||||
(int) seg_bytes, execi->proc_e, seg_addr, r);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
|
|
@ -1285,7 +1285,7 @@ struct rproc *rp;
|
|||
rp->r_exec= malloc(rp->r_exec_len);
|
||||
if (rp->r_exec == NULL)
|
||||
{
|
||||
printf("RS: read_exec: unable to allocate %d bytes\n",
|
||||
printf("RS: read_exec: unable to allocate %zu bytes\n",
|
||||
rp->r_exec_len);
|
||||
close(fd);
|
||||
return ENOMEM;
|
||||
|
@ -1951,7 +1951,7 @@ char *caller_label;
|
|||
{
|
||||
printf(
|
||||
"rs:get_next_name: bad ipc list entry '%.*s' for %s: too long\n",
|
||||
len, p, caller_label);
|
||||
(int) len, p, caller_label);
|
||||
continue;
|
||||
}
|
||||
memcpy(name, p, len);
|
||||
|
|
|
@ -88,7 +88,7 @@ static int map_driver(const char label[LABEL_MAX], devmajor_t major,
|
|||
if (label != NULL) {
|
||||
len = strlen(label);
|
||||
if (len+1 > sizeof(dp->dmap_label)) {
|
||||
printf("VFS: map_driver: label too long: %d\n", len);
|
||||
printf("VFS: map_driver: label too long: %zu\n", len);
|
||||
return(EINVAL);
|
||||
}
|
||||
strlcpy(dp->dmap_label, label, sizeof(dp->dmap_label));
|
||||
|
|
|
@ -545,7 +545,7 @@ vir_bytes *vsp;
|
|||
int n, r;
|
||||
off_t pos, new_pos;
|
||||
char *sp, *interp = NULL;
|
||||
unsigned int cum_io;
|
||||
size_t cum_io;
|
||||
char buf[PAGE_SIZE];
|
||||
|
||||
/* Make 'path' the new argv[0]. */
|
||||
|
@ -645,7 +645,7 @@ static int insert_arg(char stack[ARG_MAX], size_t *stk_bytes, char *arg,
|
|||
|
||||
/* The stack will grow (or shrink) by offset bytes. */
|
||||
if ((*stk_bytes += offset) > ARG_MAX) {
|
||||
printf("vfs:: offset too big!! %d (max %d)\n", *stk_bytes,
|
||||
printf("vfs:: offset too big!! %zu (max %d)\n", *stk_bytes,
|
||||
ARG_MAX);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -693,7 +693,7 @@ static int read_seg(struct exec_info *execi, off_t off, vir_bytes seg_addr, size
|
|||
*/
|
||||
int r;
|
||||
off_t new_pos;
|
||||
unsigned int cum_io;
|
||||
size_t cum_io;
|
||||
struct vnode *vp = ((struct vfs_exec_info *) execi->opaque)->vp;
|
||||
|
||||
/* Make sure that the file is big enough */
|
||||
|
@ -735,7 +735,7 @@ static void clo_exec(struct fproc *rfp)
|
|||
static int map_header(struct vfs_exec_info *execi)
|
||||
{
|
||||
int r;
|
||||
unsigned int cum_io;
|
||||
size_t cum_io;
|
||||
off_t pos, new_pos;
|
||||
static char hdr[PAGE_SIZE]; /* Assume that header is not larger than a page */
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ int rw_pipe(int rw_flag, endpoint_t usr, struct filp *f, vir_bytes buf,
|
|||
/* request.c */
|
||||
int req_breadwrite(endpoint_t fs_e, endpoint_t user_e, dev_t dev, off_t pos,
|
||||
unsigned int num_of_bytes, vir_bytes user_addr, int rw_flag,
|
||||
off_t *new_posp, unsigned int *cum_iop);
|
||||
off_t *new_posp, size_t *cum_iop);
|
||||
int req_chmod(endpoint_t fs_e, ino_t inode_nr, mode_t rmode,
|
||||
mode_t *new_modep);
|
||||
int req_chown(endpoint_t fs_e, ino_t inode_nr, uid_t newuid, gid_t newgid,
|
||||
|
@ -231,7 +231,7 @@ int req_readsuper(struct vmnt *vmp, char *driver_name, dev_t dev, int readonly,
|
|||
int isroot, struct node_details *res_nodep, unsigned int *fs_flags);
|
||||
int req_readwrite(endpoint_t fs_e, ino_t inode_nr, off_t pos, int rw_flag,
|
||||
endpoint_t user_e, vir_bytes user_addr, unsigned int num_of_bytes,
|
||||
off_t *new_posp, unsigned int *cum_iop);
|
||||
off_t *new_posp, size_t *cum_iop);
|
||||
int req_bpeek(endpoint_t fs_e, dev_t dev, off_t pos, unsigned int num_of_bytes);
|
||||
int req_peek(endpoint_t fs_e, ino_t inode_nr, off_t pos, unsigned int bytes);
|
||||
int req_rename(endpoint_t fs_e, ino_t old_dir, char *old_name, ino_t new_dir,
|
||||
|
|
|
@ -134,7 +134,8 @@ int read_write(struct fproc *rfp, int rw_flag, struct filp *f,
|
|||
{
|
||||
register struct vnode *vp;
|
||||
off_t position, res_pos;
|
||||
unsigned int cum_io, cum_io_incr, res_cum_io;
|
||||
size_t cum_io, res_cum_io;
|
||||
size_t cum_io_incr;
|
||||
int op, r;
|
||||
dev_t dev;
|
||||
|
||||
|
@ -310,7 +311,8 @@ vir_bytes buf;
|
|||
size_t req_size;
|
||||
{
|
||||
int r, oflags, partial_pipe = 0;
|
||||
size_t size, cum_io, cum_io_incr;
|
||||
size_t size, cum_io;
|
||||
size_t cum_io_incr;
|
||||
struct vnode *vp;
|
||||
off_t position, new_pos;
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
*===========================================================================*/
|
||||
static int req_breadwrite_actual(endpoint_t fs_e, endpoint_t user_e, dev_t dev, off_t pos,
|
||||
unsigned int num_of_bytes, vir_bytes user_addr, int rw_flag,
|
||||
off_t *new_pos, unsigned int *cum_iop, int cpflag)
|
||||
off_t *new_pos, size_t *cum_iop, int cpflag)
|
||||
{
|
||||
int r;
|
||||
cp_grant_id_t grant_id;
|
||||
|
@ -61,7 +61,7 @@ static int req_breadwrite_actual(endpoint_t fs_e, endpoint_t user_e, dev_t dev,
|
|||
|
||||
int req_breadwrite(endpoint_t fs_e, endpoint_t user_e, dev_t dev, off_t pos,
|
||||
unsigned int num_of_bytes, vir_bytes user_addr, int rw_flag,
|
||||
off_t *new_pos, unsigned int *cum_iop)
|
||||
off_t *new_pos, size_t *cum_iop)
|
||||
{
|
||||
int r;
|
||||
|
||||
|
@ -870,7 +870,7 @@ static int req_readwrite_actual(endpoint_t fs_e, ino_t inode_nr, off_t pos,
|
|||
*===========================================================================*/
|
||||
int req_readwrite(endpoint_t fs_e, ino_t inode_nr, off_t pos,
|
||||
int rw_flag, endpoint_t user_e, vir_bytes user_addr,
|
||||
unsigned int num_of_bytes, off_t *new_posp, unsigned int *cum_iop)
|
||||
unsigned int num_of_bytes, off_t *new_posp, size_t *cum_iop)
|
||||
{
|
||||
int r;
|
||||
|
||||
|
|
|
@ -235,7 +235,7 @@ int do_mmap(message *m)
|
|||
mem_type_t *mt = NULL;
|
||||
|
||||
if(m->m_mmap.fd != -1) {
|
||||
printf("VM: mmap: fd %d, len 0x%x\n", m->m_mmap.fd, len);
|
||||
printf("VM: mmap: fd %d, len 0x%zx\n", m->m_mmap.fd, len);
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ static void *alloc_dma_memory(size_t size)
|
|||
MAP_PREALLOC | MAP_ANON, -1, 0);
|
||||
|
||||
if (ptr == MAP_FAILED)
|
||||
panic("unable to allocate %d bytes of memory", size);
|
||||
panic("unable to allocate %zu bytes of memory", size);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
|
|
@ -420,7 +420,7 @@ ipc_semop_out(struct trace_proc * proc, const message * m_out)
|
|||
put_value(proc, "semid", "%d", m_out->m_lc_ipc_semop.id);
|
||||
put_sembuf_array(proc, "sops", (vir_bytes)m_out->m_lc_ipc_semop.ops,
|
||||
m_out->m_lc_ipc_semop.size);
|
||||
put_value(proc, "nsops", "%zu", m_out->m_lc_ipc_semop.size);
|
||||
put_value(proc, "nsops", "%u", m_out->m_lc_ipc_semop.size);
|
||||
|
||||
return CT_DONE;
|
||||
}
|
||||
|
|
|
@ -972,7 +972,7 @@ pm_sysuname_out(struct trace_proc * proc, const message * m_out)
|
|||
|
||||
put_buf(proc, "value", PF_STRING, m_out->m_lc_pm_sysuname.value,
|
||||
m_out->m_lc_pm_sysuname.len);
|
||||
put_value(proc, "len", "%d", m_out->m_lc_pm_sysuname.len);
|
||||
put_value(proc, "len", "%zu", m_out->m_lc_pm_sysuname.len);
|
||||
return CT_DONE;
|
||||
}
|
||||
|
||||
|
@ -984,7 +984,7 @@ pm_sysuname_in(struct trace_proc * proc, const message * m_out,
|
|||
if (m_out->m_lc_pm_sysuname.req == _UTS_GET) {
|
||||
put_buf(proc, "value", failed | PF_STRING,
|
||||
m_out->m_lc_pm_sysuname.value, m_in->m_type);
|
||||
put_value(proc, "len", "%d", m_out->m_lc_pm_sysuname.len);
|
||||
put_value(proc, "len", "%zu", m_out->m_lc_pm_sysuname.len);
|
||||
put_equals(proc);
|
||||
}
|
||||
put_result(proc);
|
||||
|
|
Loading…
Reference in a new issue