From f47f0c335c767c988a11f25bc64d8215587af41e Mon Sep 17 00:00:00 2001 From: jasper Date: Sat, 10 May 2014 22:25:16 +0000 Subject: [PATCH] various format string fixes and remove -Wno-format from octeon feedback/ok miod@ --- sys/arch/mips64/mips64/db_machdep.c | 6 +-- sys/arch/mips64/mips64/pmap.c | 76 ++++++++++++++++------------ sys/arch/mips64/mips64/trap.c | 27 +++++----- sys/arch/mips64/mips64/vm_machdep.c | 4 +- sys/arch/octeon/conf/Makefile.octeon | 4 +- sys/arch/octeon/dev/if_cnmac.c | 4 +- sys/arch/octeon/dev/octcf.c | 9 ++-- sys/arch/octeon/dev/octeon_iobus.c | 4 +- sys/arch/octeon/dev/octeon_pcibus.c | 8 +-- sys/arch/octeon/dev/octeon_uartbus.c | 4 +- sys/arch/octeon/octeon/bus_dma.c | 4 +- sys/arch/octeon/octeon/machdep.c | 32 ++++++------ 12 files changed, 97 insertions(+), 85 deletions(-) diff --git a/sys/arch/mips64/mips64/db_machdep.c b/sys/arch/mips64/mips64/db_machdep.c index 18f5a46c550..dcc48bc46ed 100644 --- a/sys/arch/mips64/mips64/db_machdep.c +++ b/sys/arch/mips64/mips64/db_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.c,v 1.38 2014/04/09 21:10:35 miod Exp $ */ +/* $OpenBSD: db_machdep.c,v 1.39 2014/05/10 22:25:16 jasper Exp $ */ /* * Copyright (c) 1998-2003 Opsycon AB (www.opsycon.se) @@ -499,13 +499,13 @@ db_dump_tlb_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *m) asid = 0; /* KV1 addresses ignore ASID */ va |= ptoa((tlbno ^ asid) % 128); #endif - db_printf("%3d v=%016llx", tlbno, va); + db_printf("%3d v=%016lx", tlbno, va); db_printf("/%02x ", asid); db_print_tlb(tlbno, tlb.tlb_lo0); #ifndef CPU_R8000 db_print_tlb(tlbno, tlb.tlb_lo1); - db_printf(" sz=%x", tlb.tlb_mask); + db_printf(" sz=%llx", tlb.tlb_mask); #endif } else if (pid < 0) { db_printf("%3d v=invalid ", tlbno); diff --git a/sys/arch/mips64/mips64/pmap.c b/sys/arch/mips64/mips64/pmap.c index 23e65e37c7b..7cf749bf929 100644 --- a/sys/arch/mips64/mips64/pmap.c +++ b/sys/arch/mips64/mips64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.74 2014/04/04 20:52:05 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.75 2014/05/10 22:25:16 jasper Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -648,7 +648,7 @@ pmap_remove(pmap_t pmap, vaddr_t sva, vaddr_t eva) struct cpu_info *ci = curcpu(); DPRINTF(PDB_FOLLOW|PDB_REMOVE|PDB_PROTECT, - ("pmap_remove(%p, %p, %p)\n", pmap, sva, eva)); + ("pmap_remove(%p, %p, %p)\n", pmap, (void *)sva, (void *)eva)); stat_count(remove_stats.calls); @@ -660,7 +660,8 @@ pmap_remove(pmap_t pmap, vaddr_t sva, vaddr_t eva) #ifdef DIAGNOSTIC if (sva < VM_MIN_KERNEL_ADDRESS || eva >= VM_MAX_KERNEL_ADDRESS || eva < sva) - panic("pmap_remove(%p, %p): not in range", sva, eva); + panic("pmap_remove(%p, %p): not in range", + (void *)sva, (void *)eva); #endif pte = kvtopte(sva); for(; sva < eva; sva += PAGE_SIZE, pte++) { @@ -738,10 +739,10 @@ pmap_page_protect(struct vm_page *pg, vm_prot_t prot) int s; if (prot == VM_PROT_NONE) { - DPRINTF(PDB_REMOVE, ("pmap_page_protect(%p, %p)\n", pg, prot)); + DPRINTF(PDB_REMOVE, ("pmap_page_protect(%p, 0x%x)\n", pg, prot)); } else { DPRINTF(PDB_FOLLOW|PDB_PROTECT, - ("pmap_page_protect(%p, %p)\n", pg, prot)); + ("pmap_page_protect(%p, 0x%x)\n", pg, prot)); } switch (prot) { @@ -791,7 +792,8 @@ pmap_protect(pmap_t pmap, vaddr_t sva, vaddr_t eva, vm_prot_t prot) struct cpu_info *ci = curcpu(); DPRINTF(PDB_FOLLOW|PDB_PROTECT, - ("pmap_protect(%p, %p, %p, %p)\n", pmap, sva, eva, prot)); + ("pmap_protect(%p, %p, %p, 0x%x)\n", + pmap, (void *)sva, (void *)eva, prot)); if ((prot & VM_PROT_READ) == VM_PROT_NONE) { pmap_remove(pmap, sva, eva); @@ -812,7 +814,8 @@ pmap_protect(pmap_t pmap, vaddr_t sva, vaddr_t eva, vm_prot_t prot) #ifdef DIAGNOSTIC if (sva < VM_MIN_KERNEL_ADDRESS || eva >= VM_MAX_KERNEL_ADDRESS || eva < sva) - panic("pmap_protect(%p, %p): not in range", sva, eva); + panic("pmap_protect(%p, %p): not in range", + (void *)sva, (void *)eva); #endif pte = kvtopte(sva); for (; sva < eva; sva += PAGE_SIZE, pte++) { @@ -886,18 +889,19 @@ pmap_enter(pmap_t pmap, vaddr_t va, paddr_t pa, vm_prot_t prot, int flags) boolean_t wired = (flags & PMAP_WIRED) != 0; DPRINTF(PDB_FOLLOW|PDB_ENTER, - ("pmap_enter(%p, %p, %p, %p, %p)\n", pmap, va, pa, prot, flags)); + ("pmap_enter(%p, %p, %p, 0x%x, 0x%x)\n", + pmap, (void *)va, (void *)pa, prot, flags)); #ifdef DIAGNOSTIC if (pmap == pmap_kernel()) { stat_count(enter_stats.kernel); if (va < VM_MIN_KERNEL_ADDRESS || va >= VM_MAX_KERNEL_ADDRESS) - panic("pmap_enter: kva %p", va); + panic("pmap_enter: kva %p", (void *)va); } else { stat_count(enter_stats.user); if (va >= VM_MAXUSER_ADDRESS) - panic("pmap_enter: uva %p", va); + panic("pmap_enter: uva %p", (void *)va); } #endif @@ -1077,12 +1081,12 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot) pt_entry_t *pte, npte; DPRINTF(PDB_FOLLOW|PDB_ENTER, - ("pmap_kenter_pa(%p, %p, 0x%x)\n", va, pa, prot)); + ("pmap_kenter_pa(%p, %p, 0x%x)\n", (void *)va, (void *)pa, prot)); #ifdef DIAGNOSTIC if (va < VM_MIN_KERNEL_ADDRESS || va >= VM_MAX_KERNEL_ADDRESS) - panic("pmap_kenter_pa: kva %p", va); + panic("pmap_kenter_pa: kva %p", (void *)va); #endif npte = vad_to_pfn(pa) | PG_G | PG_WIRED; @@ -1114,13 +1118,14 @@ pmap_kremove(vaddr_t va, vsize_t len) vaddr_t eva; struct cpu_info *ci = curcpu(); - DPRINTF(PDB_FOLLOW|PDB_REMOVE, ("pmap_kremove(%p, %p)\n", va, len)); + DPRINTF(PDB_FOLLOW|PDB_REMOVE, + ("pmap_kremove(%p, 0x%lx)\n", (void *)va, len)); eva = va + len; #ifdef DIAGNOSTIC if (va < VM_MIN_KERNEL_ADDRESS || eva >= VM_MAX_KERNEL_ADDRESS || eva < va) - panic("pmap_kremove: va %p len %p", va, len); + panic("pmap_kremove: va %p len %lx", (void *)va, len); #endif pte = kvtopte(va); for (; va < eva; va += PAGE_SIZE, pte++) { @@ -1185,7 +1190,7 @@ pmap_extract(pmap_t pmap, vaddr_t va, paddr_t *pap) #ifdef DIAGNOSTIC if (va < VM_MIN_KERNEL_ADDRESS || va >= VM_MAX_KERNEL_ADDRESS) - panic("pmap_extract(%p, %p)", pmap, va); + panic("pmap_extract(%p, %p)", pmap, (void *)va); #endif pte = kvtopte(va); if (*pte & PG_V) @@ -1207,7 +1212,8 @@ pmap_extract(pmap_t pmap, vaddr_t va, paddr_t *pap) if (rv != FALSE) *pap = pa; - DPRINTF(PDB_FOLLOW, ("pmap_extract(%p, %p)=%p(%d)", pmap, va, pa, rv)); + DPRINTF(PDB_FOLLOW, ("pmap_extract(%p, %p)=%p(%d)", + pmap, (void *)va, (void *)pa, rv)); return (rv); } @@ -1241,8 +1247,8 @@ pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr) vaddr_t src_addr; { - DPRINTF(PDB_FOLLOW, ("pmap_copy(%p, %p, %p, %p, %p)\n", - dst_pmap, src_pmap, dst_addr, len, src_addr)); + DPRINTF(PDB_FOLLOW,("pmap_copy(%p, %p, %p, 0x%lx, %p)\n", + dst_pmap, src_pmap, (void *)dst_addr, len, (void *)src_addr)); } /* @@ -1257,7 +1263,7 @@ pmap_zero_page(struct vm_page *pg) struct cpu_info *ci = curcpu(); int df = 0; - DPRINTF(PDB_FOLLOW, ("pmap_zero_page(%p)\n", phys)); + DPRINTF(PDB_FOLLOW, ("pmap_zero_page(%p)\n", (void *)phys)); va = (vaddr_t)PHYS_TO_XKPHYS(phys, CCA_CACHED); pv = pg_to_pvh(pg); @@ -1299,7 +1305,8 @@ pmap_copy_page(struct vm_page *srcpg, struct vm_page *dstpg) s = (vaddr_t)PHYS_TO_XKPHYS(src, CCA_CACHED); d = (vaddr_t)PHYS_TO_XKPHYS(dst, CCA_CACHED); - DPRINTF(PDB_FOLLOW, ("pmap_copy_page(%p, %p)\n", src, dst)); + DPRINTF(PDB_FOLLOW, + ("pmap_copy_page(%p, %p)\n", (void *)src, (void *)dst)); pv = pg_to_pvh(srcpg); if (srcpg->pg_flags & PGF_UNCACHED) @@ -1346,7 +1353,8 @@ pmap_clear_modify(struct vm_page *pg) paddr_t pa; struct cpu_info *ci = curcpu(); - DPRINTF(PDB_FOLLOW, ("pmap_clear_modify(%p)\n", VM_PAGE_TO_PHYS(pg))); + DPRINTF(PDB_FOLLOW, + ("pmap_clear_modify(%p)\n", (void *)VM_PAGE_TO_PHYS(pg))); pa = VM_PAGE_TO_PHYS(pg); pv = pg_to_pvh(pg); @@ -1361,7 +1369,8 @@ pmap_clear_modify(struct vm_page *pg) #ifdef DIAGNOSTIC if (pv->pv_va < VM_MIN_KERNEL_ADDRESS || pv->pv_va >= VM_MAX_KERNEL_ADDRESS) - panic("pmap_clear_modify(%p)", pv->pv_va); + panic("pmap_clear_modify(%p)", + (void *)pv->pv_va); #endif pte = kvtopte(pv->pv_va); entry = *pte; @@ -1410,7 +1419,8 @@ pmap_clear_reference(struct vm_page *pg) { boolean_t rv; - DPRINTF(PDB_FOLLOW, ("pmap_clear_reference(%p)\n", VM_PAGE_TO_PHYS(pg))); + DPRINTF(PDB_FOLLOW, ("pmap_clear_reference(%p)\n", + (void *)VM_PAGE_TO_PHYS(pg))); rv = (pg->pg_flags & PGF_ATTR_REF) != 0; atomic_clearbits_int(&pg->pg_flags, PGF_ATTR_REF); @@ -1478,7 +1488,7 @@ pmap_page_cache(vm_page_t pg, u_int mode) #ifdef DIAGNOSTIC if (pv->pv_va < VM_MIN_KERNEL_ADDRESS || pv->pv_va >= VM_MAX_KERNEL_ADDRESS) - panic("pmap_page_cache(%p)", pv->pv_va); + panic("pmap_page_cache(%p)", (void *)pv->pv_va); #endif pte = kvtopte(pv->pv_va); entry = *pte; @@ -1573,7 +1583,7 @@ pmap_enter_pv(pmap_t pmap, vaddr_t va, vm_page_t pg, pt_entry_t *npte) DPRINTF(PDB_PVENTRY, ("pmap_enter: first pv: pmap %p va %p pa %p\n", - pmap, va, VM_PAGE_TO_PHYS(pg))); + pmap, (void *)va, (void *)VM_PAGE_TO_PHYS(pg))); stat_count(enter_stats.firstpv); @@ -1612,7 +1622,7 @@ pmap_enter_pv(pmap_t pmap, vaddr_t va, vm_page_t pg, pt_entry_t *npte) DPRINTF(PDB_PVENTRY, ("pmap_enter: new pv: pmap %p va %p pg %p\n", - pmap, va, VM_PAGE_TO_PHYS(pg))); + pmap, (void *)va, (void *)VM_PAGE_TO_PHYS(pg))); npv = pmap_pv_alloc(); if (npv == NULL) { @@ -1632,10 +1642,10 @@ pmap_enter_pv(pmap_t pmap, vaddr_t va, vm_page_t pg, pt_entry_t *npte) * cache and set page to not be mapped cached. */ if (((pv->pv_va ^ va) & cache_valias_mask) != 0) { -#ifdef PMAP_DEBUG +#ifdef PMAPDEBUG printf("%s: uncaching page pa %p, va %p/%p\n", - __func__, VM_PAGE_TO_PHYS(pg), - pv->pv_va, va); + __func__, (void *)VM_PAGE_TO_PHYS(pg), + (void *)pv->pv_va, (void *)va); #endif pmap_page_cache(pg, 0); Mips_SyncDCachePage(curcpu(), pv->pv_va, @@ -1668,7 +1678,7 @@ pmap_remove_pv(pmap_t pmap, vaddr_t va, paddr_t pa) int s; DPRINTF(PDB_FOLLOW|PDB_PVENTRY, - ("pmap_remove_pv(%p, %p, %p)\n", pmap, va, pa)); + ("pmap_remove_pv(%p, %p, %p)\n", pmap, (void *)va, (void *)pa)); /* * Remove page from the PV table @@ -1707,7 +1717,7 @@ pmap_remove_pv(pmap_t pmap, vaddr_t va, paddr_t pa) } else { #ifdef DIAGNOSTIC panic("pmap_remove_pv(%p, %p, %p) not found", - pmap, va, pa); + pmap, (void *)va, (void *)pa); #endif } } @@ -1727,9 +1737,9 @@ pmap_remove_pv(pmap_t pmap, vaddr_t va, paddr_t pa) } if (pv == NULL) { -#ifdef PMAP_DEBUG +#ifdef PMAPDEBUG printf("%s: caching page pa %p, va %p again\n", - __func__, VM_PAGE_TO_PHYS(pg), va); + __func__, (void *)VM_PAGE_TO_PHYS(pg), (void *)va); #endif pmap_page_cache(pg, PGF_CACHED); } diff --git a/sys/arch/mips64/mips64/trap.c b/sys/arch/mips64/mips64/trap.c index d24a98afe3d..d78a525c13d 100644 --- a/sys/arch/mips64/mips64/trap.c +++ b/sys/arch/mips64/mips64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.94 2014/05/10 05:33:00 guenther Exp $ */ +/* $OpenBSD: trap.c,v 1.95 2014/05/10 22:25:16 jasper Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -621,7 +621,8 @@ fault_common_no_miss: printf("trap: %s (%d): breakpoint at %p " "(insn %08x)\n", p->p_comm, p->p_pid, - p->p_md.md_ss_addr, p->p_md.md_ss_instr); + (void *)p->p_md.md_ss_addr, + p->p_md.md_ss_instr); #endif /* Restore original instruction and clear BP */ @@ -756,7 +757,7 @@ fault_common_no_miss: return; case T_FPE: - printf("FPU Trap: PC %x CR %x SR %x\n", + printf("FPU Trap: PC %lx CR %lx SR %lx\n", trapframe->pc, trapframe->cause, trapframe->sr); goto err; @@ -788,7 +789,8 @@ fault_common_no_miss: #endif printf("\nTrap cause = %d Frame %p\n", type, trapframe); printf("Trap PC %p RA %p fault %p\n", - trapframe->pc, trapframe->ra, trapframe->badvaddr); + (void *)trapframe->pc, (void *)trapframe->ra, + (void *)trapframe->badvaddr); #ifdef DDB stacktrace(!USERMODE(trapframe->sr) ? trapframe : p->p_md.md_regs); kdb_trap(type, trapframe); @@ -1069,7 +1071,8 @@ process_sstep(struct proc *p, int sstep) printf("WARNING: %s (%d): can't restore " "instruction at %p: %08x\n", p->p_comm, p->p_pid, - p->p_md.md_ss_addr, p->p_md.md_ss_instr); + (void *)p->p_md.md_ss_addr, + p->p_md.md_ss_instr); #endif p->p_md.md_ss_addr = 0; } else @@ -1093,7 +1096,7 @@ process_sstep(struct proc *p, int sstep) if (p->p_md.md_ss_addr != 0) { printf("WARNING: %s (%d): breakpoint request " "at %p, already set at %p\n", - p->p_comm, p->p_pid, va, p->p_md.md_ss_addr); + p->p_comm, p->p_pid, (void *)va, (void *)p->p_md.md_ss_addr); return EFAULT; } #endif @@ -1112,8 +1115,8 @@ process_sstep(struct proc *p, int sstep) #ifdef DEBUG printf("%s (%d): breakpoint set at %p: %08x (pc %p %08x)\n", - p->p_comm, p->p_pid, - p->p_md.md_ss_addr, p->p_md.md_ss_instr, locr0->pc, curinstr); + p->p_comm, p->p_pid, (void *)p->p_md.md_ss_addr, + p->p_md.md_ss_instr, (void *)locr0->pc, curinstr); #endif return 0; } @@ -1470,7 +1473,7 @@ fpe_branch_emulate(struct proc *p, struct trap_frame *tf, uint32_t insn, if (rc != 0) { #ifdef DEBUG printf("%s: uvm_map_protect on %p failed: %d\n", - __func__, p->p_md.md_fppgva, rc); + __func__, (void *)p->p_md.md_fppgva, rc); #endif return rc; } @@ -1479,7 +1482,7 @@ fpe_branch_emulate(struct proc *p, struct trap_frame *tf, uint32_t insn, if (rc != 0) { #ifdef DEBUG printf("%s: uvm_fault_wire on %p failed: %d\n", - __func__, p->p_md.md_fppgva, rc); + __func__, (void *)p->p_md.md_fppgva, rc); #endif goto err2; } @@ -1488,7 +1491,7 @@ fpe_branch_emulate(struct proc *p, struct trap_frame *tf, uint32_t insn, if (rc != 0) { #ifdef DEBUG printf("%s: copyout %p failed %d\n", - __func__, p->p_md.md_fppgva, rc); + __func__, (void *)p->p_md.md_fppgva, rc); #endif goto err; } @@ -1497,7 +1500,7 @@ fpe_branch_emulate(struct proc *p, struct trap_frame *tf, uint32_t insn, if (rc != 0) { #ifdef DEBUG printf("%s: copyout %p failed %d\n", - __func__, p->p_md.md_fppgva + 4, rc); + __func__, (void *)(p->p_md.md_fppgva + 4), rc); #endif goto err; } diff --git a/sys/arch/mips64/mips64/vm_machdep.c b/sys/arch/mips64/mips64/vm_machdep.c index de3c0376cc7..88adc033d46 100644 --- a/sys/arch/mips64/mips64/vm_machdep.c +++ b/sys/arch/mips64/mips64/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.28 2013/01/16 19:04:43 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.29 2014/05/10 22:25:16 jasper Exp $ */ /* * Copyright (c) 1988 University of Utah. * Copyright (c) 1992, 1993 @@ -241,7 +241,7 @@ vmapbuf(bp, len) while (sz > 0) { if (pmap_extract(pmap, uva, &pa) == FALSE) - panic("vmapbuf: pmap_extract(%x, %x) failed!", + panic("vmapbuf: pmap_extract(%p, %lx) failed!", pmap, uva); pmap_enter(vm_map_pmap(phys_map), kva, trunc_page(pa), diff --git a/sys/arch/octeon/conf/Makefile.octeon b/sys/arch/octeon/conf/Makefile.octeon index f057e6ba4b6..da8644d793d 100644 --- a/sys/arch/octeon/conf/Makefile.octeon +++ b/sys/arch/octeon/conf/Makefile.octeon @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.octeon,v 1.15 2013/10/15 19:23:29 guenther Exp $ +# $OpenBSD: Makefile.octeon,v 1.16 2014/05/10 22:25:16 jasper Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -31,7 +31,7 @@ _archdir?= $S/arch/${_arch} INCLUDES= -nostdinc -I$S -I. -I$S/arch CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \ - -Wno-main -Wno-uninitialized -Wno-format \ + -Wno-main -Wno-uninitialized \ -Wstack-larger-than-2047 CMACHFLAGS= -mno-abicalls ${ABI} -msoft-float -G 0 diff --git a/sys/arch/octeon/dev/if_cnmac.c b/sys/arch/octeon/dev/if_cnmac.c index f26c0019d7f..385de3803d5 100644 --- a/sys/arch/octeon/dev/if_cnmac.c +++ b/sys/arch/octeon/dev/if_cnmac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cnmac.c,v 1.13 2014/03/10 09:41:27 jasper Exp $ */ +/* $OpenBSD: if_cnmac.c,v 1.14 2014/05/10 22:25:16 jasper Exp $ */ /* * Copyright (c) 2007 Internet Initiative Japan, Inc. @@ -928,7 +928,7 @@ if_cnmac_kvtophys(vaddr_t kva) else if (kva >= CKSEG1_BASE && kva < CKSEG1_BASE + CKSEG_SIZE) return CKSEG1_TO_PHYS(kva); - printf("kva %p is not be able to convert physical address\n", kva); + printf("kva %lx is not be able to convert physical address\n", kva); panic("if_cnmac_kvtophys"); } diff --git a/sys/arch/octeon/dev/octcf.c b/sys/arch/octeon/dev/octcf.c index 3227d5f2c65..02646c483fa 100644 --- a/sys/arch/octeon/dev/octcf.c +++ b/sys/arch/octeon/dev/octcf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: octcf.c,v 1.13 2013/11/01 01:06:03 dlg Exp $ */ +/* $OpenBSD: octcf.c,v 1.14 2014/05/10 22:25:16 jasper Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -198,8 +198,7 @@ octcfattach(struct device *parent, struct device *self, void *aux) if ((cfg & BOOT_CFG_BASE_MASK) == (OCTEON_CF_BASE >> BOOT_CFG_BASE_SHIFT)) { if ((cfg & BOOT_CFG_WIDTH_MASK) == 0) - printf(": Doesn't support 8bit card\n", - wd->sc_dev.dv_xname); + printf(": Doesn't support 8bit card\n"); break; } } @@ -208,7 +207,7 @@ octcfattach(struct device *parent, struct device *self, void *aux) i = 0; while ( (status = (OCTCF_REG_READ(wd, wdr_status)>>8)) & WDCS_BSY) { if ((i++) == NR_TRIES ) { - printf(": card not present\n", wd->sc_dev.dv_xname); + printf(": card not present\n"); return; } DELAY(OCTCFDELAY); @@ -216,7 +215,7 @@ octcfattach(struct device *parent, struct device *self, void *aux) /* read our drive info */ if (octcf_get_params(wd, &wd->sc_params) != 0) { - printf(": IDENTIFY failed\n", wd->sc_dev.dv_xname); + printf(": IDENTIFY failed\n"); return; } diff --git a/sys/arch/octeon/dev/octeon_iobus.c b/sys/arch/octeon/dev/octeon_iobus.c index 8c65d987b7d..223530c1878 100644 --- a/sys/arch/octeon/dev/octeon_iobus.c +++ b/sys/arch/octeon/dev/octeon_iobus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: octeon_iobus.c,v 1.5 2013/10/24 20:45:03 pirofti Exp $ */ +/* $OpenBSD: octeon_iobus.c,v 1.6 2014/05/10 22:25:16 jasper Exp $ */ /* * Copyright (c) 2000-2004 Opsycon AB (www.opsycon.se) @@ -183,7 +183,7 @@ iobusprint(void *aux, const char *iobus) printf("%s at %s", aa->aa_name, iobus); if (aa->aa_unit->addr != 0) - printf(" base 0x%llx", aa->aa_unit->addr); + printf(" base 0x%lx", aa->aa_unit->addr); if (aa->aa_unit->irq >= 0) printf(" irq %d", aa->aa_unit->irq); diff --git a/sys/arch/octeon/dev/octeon_pcibus.c b/sys/arch/octeon/dev/octeon_pcibus.c index e6121344f7b..509261a5db9 100644 --- a/sys/arch/octeon/dev/octeon_pcibus.c +++ b/sys/arch/octeon/dev/octeon_pcibus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: octeon_pcibus.c,v 1.12 2013/08/29 07:56:50 pirofti Exp $ */ +/* $OpenBSD: octeon_pcibus.c,v 1.13 2014/05/10 22:25:16 jasper Exp $ */ /* $NetBSD: bonito_mainbus.c,v 1.11 2008/04/28 20:23:10 martin Exp $ */ /* $NetBSD: bonito_pci.c,v 1.5 2008/04/28 20:23:28 martin Exp $ */ @@ -248,7 +248,7 @@ octeon_pcibus_attach(struct device *parent, struct device *self, void *aux) bus_addr_t octeon_pcibus_pa_to_device(paddr_t pa) { - printf("%s:%d: pa=%p\n", __func__, __LINE__, pa); + printf("%s:%d: pa=%p\n", __func__, __LINE__, (void *)pa); return pa & 0x1ffffffffffffUL; } @@ -256,7 +256,7 @@ octeon_pcibus_pa_to_device(paddr_t pa) paddr_t octeon_pcibus_device_to_pa(bus_addr_t addr) { - printf("%s:%d: addr=%p\n", __func__, __LINE__, addr); + printf("%s:%d: addr=%lx\n", __func__, __LINE__, addr); return PHYS_TO_XKPHYS(addr, CCA_NC); } @@ -406,7 +406,7 @@ octeon_pcibus_pci_intr_string(void *cookie, pci_intr_handle_t ih) { static char irqstr[sizeof("irq 0123456789")]; - snprintf(irqstr, sizeof irqstr, "irq %d", ih); + snprintf(irqstr, sizeof irqstr, "irq %ld", ih); return irqstr; } diff --git a/sys/arch/octeon/dev/octeon_uartbus.c b/sys/arch/octeon/dev/octeon_uartbus.c index c0e618c8162..dfca44bd391 100644 --- a/sys/arch/octeon/dev/octeon_uartbus.c +++ b/sys/arch/octeon/dev/octeon_uartbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: octeon_uartbus.c,v 1.3 2013/06/02 20:29:36 jasper Exp $ */ +/* $OpenBSD: octeon_uartbus.c,v 1.4 2014/05/10 22:25:16 jasper Exp $ */ /* * Copyright (c) 2000-2004 Opsycon AB (www.opsycon.se) @@ -151,7 +151,7 @@ uartbusprint(void *aux, const char *uartbus) printf("%s at %s", uba->uba_name, uartbus); if (uba->uba_baseaddr != 0) - printf(" base 0x%llx", uba->uba_baseaddr); + printf(" base 0x%lx", uba->uba_baseaddr); if (uba->uba_intr >= 0) printf(" irq %d", uba->uba_intr); diff --git a/sys/arch/octeon/octeon/bus_dma.c b/sys/arch/octeon/octeon/bus_dma.c index 9892b790f00..e23963319b1 100644 --- a/sys/arch/octeon/octeon/bus_dma.c +++ b/sys/arch/octeon/octeon/bus_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_dma.c,v 1.9 2014/03/21 21:49:45 miod Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.10 2014/05/10 22:25:16 jasper Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -564,7 +564,7 @@ _dmamap_load_buffer(bus_dma_tag_t t, bus_dmamap_t map, void *buf, * Get the physical address for this segment. */ if (pmap_extract(pmap, vaddr, &curaddr) == FALSE) - panic("_dmapmap_load_buffer: pmap_extract(%x, %x) failed!", + panic("_dmapmap_load_buffer: pmap_extract(%p, %lx) failed!", pmap, vaddr); /* diff --git a/sys/arch/octeon/octeon/machdep.c b/sys/arch/octeon/octeon/machdep.c index 1e50572e8cc..6ed1f344edd 100644 --- a/sys/arch/octeon/octeon/machdep.c +++ b/sys/arch/octeon/octeon/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.44 2014/04/03 08:07:16 mpi Exp $ */ +/* $OpenBSD: machdep.c,v 1.45 2014/05/10 22:25:16 jasper Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. @@ -233,7 +233,7 @@ octeon_memory_init(struct boot_info *boot_info) (long)phys_avail[i], (long)phys_avail[i + 1]); } for (i = 0; mem_layout[i].mem_last_page; i++) { - printf("mem_layout[%d] page 0x%016lX -> 0x%016lX\n", i, + printf("mem_layout[%d] page 0x%016llX -> 0x%016llX\n", i, mem_layout[i].mem_first_page, mem_layout[i].mem_last_page); } } @@ -402,9 +402,9 @@ mips_init(__register_t a0, __register_t a1, __register_t a2 __unused, DUMP_BOOT_DESC(desc_ver, %d); DUMP_BOOT_DESC(desc_size, %d); - DUMP_BOOT_DESC(stack_top, %d); - DUMP_BOOT_DESC(heap_start, %d); - DUMP_BOOT_DESC(heap_end, %d); + DUMP_BOOT_DESC(stack_top, %llu); + DUMP_BOOT_DESC(heap_start, %llu); + DUMP_BOOT_DESC(heap_end, %llu); DUMP_BOOT_DESC(argc, %d); DUMP_BOOT_DESC(flags, %x); DUMP_BOOT_DESC(core_mask, %x); @@ -412,14 +412,14 @@ mips_init(__register_t a0, __register_t a1, __register_t a2 __unused, DUMP_BOOT_DESC(phy_mem_desc_addr, %x); DUMP_BOOT_DESC(debugger_flag_addr, %x); DUMP_BOOT_DESC(eclock, %d); - DUMP_BOOT_DESC(boot_info_addr, %x); + DUMP_BOOT_DESC(boot_info_addr, %llx); DUMP_BOOT_INFO(ver_major, %d); DUMP_BOOT_INFO(ver_minor, %d); - DUMP_BOOT_INFO(stack_top, %x); - DUMP_BOOT_INFO(heap_start, %x); - DUMP_BOOT_INFO(heap_end, %x); - DUMP_BOOT_INFO(boot_desc_addr, %x); + DUMP_BOOT_INFO(stack_top, %llx); + DUMP_BOOT_INFO(heap_start, %llx); + DUMP_BOOT_INFO(heap_end, %llx); + DUMP_BOOT_INFO(boot_desc_addr, %llx); DUMP_BOOT_INFO(exception_base_addr, %x); DUMP_BOOT_INFO(stack_size, %d); DUMP_BOOT_INFO(flags, %x); @@ -433,9 +433,9 @@ mips_init(__register_t a0, __register_t a1, __register_t a2 __unused, DUMP_BOOT_INFO(board_rev_major, %d); DUMP_BOOT_INFO(board_rev_minor, %d); DUMP_BOOT_INFO(mac_addr_count, %d); - DUMP_BOOT_INFO(cf_common_addr, %x); - DUMP_BOOT_INFO(cf_attr_addr, %x); - DUMP_BOOT_INFO(led_display_addr, %x); + DUMP_BOOT_INFO(cf_common_addr, %llx); + DUMP_BOOT_INFO(cf_attr_addr, %llx); + DUMP_BOOT_INFO(led_display_addr, %llx); DUMP_BOOT_INFO(dfaclock, %d); DUMP_BOOT_INFO(config_flags, %x); #endif @@ -524,7 +524,7 @@ cpu_startup() * Good {morning,afternoon,evening,night}. */ printf(version); - printf("real mem = %u (%uMB)\n", ptoa((psize_t)physmem), + printf("real mem = %lu (%luMB)\n", ptoa((psize_t)physmem), ptoa((psize_t)physmem)/1024/1024); /* @@ -538,7 +538,7 @@ cpu_startup() phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr, VM_PHYS_SIZE, 0, FALSE, NULL); - printf("avail mem = %u (%uMB)\n", ptoa(uvmexp.free), + printf("avail mem = %lu (%luMB)\n", ptoa(uvmexp.free), ptoa(uvmexp.free)/1024/1024); /* @@ -601,7 +601,7 @@ process_bootargs(void) #ifdef DEBUG printf("boot_desc->argv[%d] = %s\n", - i, PHYS_TO_CKSEG0(octeon_boot_desc->argv[i])); + i, (const char *)PHYS_TO_CKSEG0(octeon_boot_desc->argv[i])); #endif /* -- 2.20.1