summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-05-08 20:46:50 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-05-08 20:46:50 +0000
commit455da5aee242b188a5c369d8eed122ca7d794a99 (patch)
treea201172fb7ddc6cd0f8249b2266b1ff7727521e4
parent99aa65719601eb340e970ab268bc9c21d0e1d3eb (diff)
Format string fixes for alpha kernels, and remove -Wno-format
-rw-r--r--sys/arch/alpha/alpha/api_up1000.c12
-rw-r--r--sys/arch/alpha/alpha/cpu.c4
-rw-r--r--sys/arch/alpha/alpha/dec_1000a.c12
-rw-r--r--sys/arch/alpha/alpha/dec_2100_a50.c76
-rw-r--r--sys/arch/alpha/alpha/dec_3000_300.c10
-rw-r--r--sys/arch/alpha/alpha/dec_3000_500.c10
-rw-r--r--sys/arch/alpha/alpha/dec_550.c12
-rw-r--r--sys/arch/alpha/alpha/dec_6600.c53
-rw-r--r--sys/arch/alpha/alpha/dec_alphabook1.c10
-rw-r--r--sys/arch/alpha/alpha/dec_axppci_33.c12
-rw-r--r--sys/arch/alpha/alpha/dec_eb164.c12
-rw-r--r--sys/arch/alpha/alpha/dec_eb64plus.c12
-rw-r--r--sys/arch/alpha/alpha/dec_kn20aa.c12
-rw-r--r--sys/arch/alpha/alpha/dec_kn300.c12
-rw-r--r--sys/arch/alpha/alpha/fp_complete.c6
-rw-r--r--sys/arch/alpha/alpha/machdep.c19
-rw-r--r--sys/arch/alpha/conf/Makefile.alpha4
-rw-r--r--sys/arch/alpha/pci/pci_kn20aa.c6
-rw-r--r--sys/arch/alpha/pci/pci_kn300.c4
-rw-r--r--sys/arch/alpha/pci/tsp_bus_mem.c4
-rw-r--r--sys/arch/alpha/pci/tsp_dma.c6
21 files changed, 174 insertions, 134 deletions
diff --git a/sys/arch/alpha/alpha/api_up1000.c b/sys/arch/alpha/alpha/api_up1000.c
index 49a37417105..370390ba578 100644
--- a/sys/arch/alpha/alpha/api_up1000.c
+++ b/sys/arch/alpha/alpha/api_up1000.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: api_up1000.c,v 1.11 2010/11/23 04:07:55 shadchin Exp $ */
+/* $OpenBSD: api_up1000.c,v 1.12 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: api_up1000.c,v 1.4 2000/06/20 03:48:53 matt Exp $ */
/*
@@ -145,11 +145,13 @@ api_up1000_cons_init()
break;
default:
- printf("ctb->ctb_term_type = 0x%lx\n", ctb->ctb_term_type);
- printf("ctb->ctb_turboslot = 0x%lx\n", ctb->ctb_turboslot);
+ printf("ctb->ctb_term_type = 0x%lx\n",
+ (unsigned long)ctb->ctb_term_type);
+ printf("ctb->ctb_turboslot = 0x%lx\n",
+ (unsigned long)ctb->ctb_turboslot);
- panic("consinit: unknown console type %ld",
- ctb->ctb_term_type);
+ panic("consinit: unknown console type %lu",
+ (unsigned long)ctb->ctb_term_type);
}
}
diff --git a/sys/arch/alpha/alpha/cpu.c b/sys/arch/alpha/alpha/cpu.c
index efcb733e341..7a348cb8fb8 100644
--- a/sys/arch/alpha/alpha/cpu.c
+++ b/sys/arch/alpha/alpha/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.35 2014/03/29 18:09:28 guenther Exp $ */
+/* $OpenBSD: cpu.c,v 1.36 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: cpu.c,v 1.44 2000/05/23 05:12:53 thorpej Exp $ */
/*-
@@ -412,7 +412,7 @@ cpu_announce_extensions(struct cpu_info *ci)
}
if (amask) {
- printf("%s: architecture extensions: %b\n",
+ printf("%s: architecture extensions: %lb\n",
ci->ci_dev->dv_xname, amask, ALPHA_AMASK_BITS);
}
}
diff --git a/sys/arch/alpha/alpha/dec_1000a.c b/sys/arch/alpha/alpha/dec_1000a.c
index 743108cb8fa..0e2f5d76930 100644
--- a/sys/arch/alpha/alpha/dec_1000a.c
+++ b/sys/arch/alpha/alpha/dec_1000a.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dec_1000a.c,v 1.7 2010/11/23 04:07:55 shadchin Exp $ */
+/* $OpenBSD: dec_1000a.c,v 1.8 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: dec_1000a.c,v 1.14 2001/06/05 04:53:11 thorpej Exp $ */
/*
@@ -225,11 +225,13 @@ dec_1000a_cons_init()
break;
default:
- printf("ctb->ctb_term_type = 0x%lx\n", ctb->ctb_term_type);
- printf("ctb->ctb_turboslot = 0x%lx\n", ctb->ctb_turboslot);
+ printf("ctb->ctb_term_type = 0x%lx\n",
+ (unsigned long)ctb->ctb_term_type);
+ printf("ctb->ctb_turboslot = 0x%lx\n",
+ (unsigned long)ctb->ctb_turboslot);
- panic("consinit: unknown console type %ld",
- ctb->ctb_term_type);
+ panic("consinit: unknown console type %lu",
+ (unsigned long)ctb->ctb_term_type);
}
#ifdef KGDB
/* Attach the KGDB device. */
diff --git a/sys/arch/alpha/alpha/dec_2100_a50.c b/sys/arch/alpha/alpha/dec_2100_a50.c
index 48ab41345e6..15d58a503ae 100644
--- a/sys/arch/alpha/alpha/dec_2100_a50.c
+++ b/sys/arch/alpha/alpha/dec_2100_a50.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dec_2100_a50.c,v 1.21 2010/11/23 04:07:55 shadchin Exp $ */
+/* $OpenBSD: dec_2100_a50.c,v 1.22 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: dec_2100_a50.c,v 1.43 2000/05/22 20:13:31 thorpej Exp $ */
/*
@@ -165,11 +165,13 @@ dec_2100_a50_cons_init()
break;
default:
- printf("ctb->ctb_term_type = 0x%lx\n", ctb->ctb_term_type);
- printf("ctb->ctb_turboslot = 0x%lx\n", ctb->ctb_turboslot);
+ printf("ctb->ctb_term_type = 0x%lx\n",
+ (unsigned long)ctb->ctb_term_type);
+ printf("ctb->ctb_turboslot = 0x%lx\n",
+ (unsigned long)ctb->ctb_turboslot);
- panic("consinit: unknown console type %ld",
- ctb->ctb_term_type);
+ panic("consinit: unknown console type %lu",
+ (unsigned long)ctb->ctb_term_type);
}
}
@@ -300,7 +302,8 @@ dec_2100_a50_mcheck(mces, type, logout, framep)
/* Print PAL fields */
for (i = 0; i < 32; i += 2) {
printf("\tPAL temp[%d-%d]\t\t= 0x%16lx 0x%16lx\n", i, i+1,
- ptr->paltemp[i], ptr->paltemp[i+1]);
+ (unsigned long)ptr->paltemp[i],
+ (unsigned long)ptr->paltemp[i+1]);
}
printf(fmt1, "Excepting Instruction Addr", ptr->exc_addr);
printf(fmt1, "Summary of arithmetic traps", ptr->exc_sum);
@@ -374,30 +377,30 @@ dec_2100_a50_mcheck(mces, type, logout, framep)
switch(hdr->mcheck_code) {
case AVANTI_RETRY_TIMEOUT:
printf("\tRetry timeout error accessing 0x%08lx.\n",
- ptr->epic_pear & 0xffffffff);
+ (unsigned long)ptr->epic_pear & 0xffffffff);
break;
case AVANTI_DMA_DATA_PARITY:
printf("\tDMA data parity error accessing 0x%08lx.\n",
- ptr->epic_pear & 0xffffffff);
+ (unsigned long)ptr->epic_pear & 0xffffffff);
break;
case AVANTI_IO_PARITY:
printf("\tI/O parity error at 0x%08lx during PCI cycle 0x%0lx.\n",
- ptr->epic_pear & 0xffffffff,
- (ptr->epic_dcsr >> 18) & 0xf);
+ (unsigned long)ptr->epic_pear & 0xffffffff,
+ (unsigned long)(ptr->epic_dcsr >> 18) & 0xf);
break;
case AVANTI_TARGET_ABORT:
printf("\tPCI target abort at 0x%08lx during PCI cycle 0x%0lx.\n",
- ptr->epic_pear & 0xffffffff,
- (ptr->epic_dcsr >> 18) & 0xf);
+ (unsigned long)ptr->epic_pear & 0xffffffff,
+ (unsigned long)(ptr->epic_dcsr >> 18) & 0xf);
break;
case AVANTI_NO_DEVICE:
printf("\tNo device responded at 0x%08lx during PCI cycle 0x%0lx\n.",
- ptr->epic_pear & 0xffffffff,
- (ptr->epic_dcsr >> 18) & 0xf);
+ (unsigned long)ptr->epic_pear & 0xffffffff,
+ (unsigned long)(ptr->epic_dcsr >> 18) & 0xf);
break;
case AVANTI_CORRRECTABLE_MEMORY:
@@ -409,7 +412,7 @@ dec_2100_a50_mcheck(mces, type, logout, framep)
case AVANTI_UNCORRECTABLE_PCI_MEMORY:
printf("\tUncorrectable memory error at %016lx reported "
"during DMA read.\n",
- (ptr->epic_sear & 0xfffffff0) << 2);
+ (unsigned long)(ptr->epic_sear & 0xfffffff0) << 2);
break;
case AVANTI_INVALID_PT_LOOKUP:
@@ -418,13 +421,13 @@ dec_2100_a50_mcheck(mces, type, logout, framep)
printf("\tAddress lost.\n");
else
printf("\tBus address to 0x%08lx, PCI cycle 0x%0lx\n",
- ptr->epic_pear & 0xffffffff,
- (ptr->epic_dcsr >> 18) & 0xf);
+ (unsigned long)ptr->epic_pear & 0xffffffff,
+ (unsigned long)(ptr->epic_dcsr >> 18) & 0xf);
break;
case AVANTI_MEMORY:
printf("\tMemory error at %016lx, ",
- (ptr->epic_sear & 0xfffffff0) << 2);
+ (unsigned long)(ptr->epic_sear & 0xfffffff0) << 2);
sysaddr = (ptr->epic_sear & 0xffffffff) >> 21;
if (sysaddr >= ((ptr->coma_base0 >> 5) & 0x7ff) &&
sysaddr < (((ptr->coma_base0 >> 5) & 0x7ff) +
@@ -447,9 +450,11 @@ dec_2100_a50_mcheck(mces, type, logout, framep)
if (ptr->coma_edsr & 0x20)
printf("victim write\n");
else if (ptr->coma_edsr & 0x10)
- printf("DMA. ioCmd<2:0> = %0lx\n", (ptr->coma_edsr >> 6) & 7);
+ printf("DMA. ioCmd<2:0> = %0lx\n",
+ (unsigned long)(ptr->coma_edsr >> 6) & 7);
else
- printf("CPU. cpuCReq<2:0> = %0lx\n", (ptr->coma_edsr >> 6) & 7);
+ printf("CPU. cpuCReq<2:0> = %0lx\n",
+ (unsigned long)(ptr->coma_edsr >> 6) & 7);
break;
case AVANTI_BCACHE_TAG_CTRL_PARITY:
@@ -457,9 +462,11 @@ dec_2100_a50_mcheck(mces, type, logout, framep)
if (ptr->coma_edsr & 0x20)
printf("victim write\n");
else if (ptr->coma_edsr & 0x10)
- printf("DMA. ioCmd<2:0> = %0lx\n", (ptr->coma_edsr >> 6) & 7);
+ printf("DMA. ioCmd<2:0> = %0lx\n",
+ (unsigned long)(ptr->coma_edsr >> 6) & 7);
else
- printf("CPU. cpuCReq<2:0> = %0lx\n", (ptr->coma_edsr >> 6) & 7);
+ printf("CPU. cpuCReq<2:0> = %0lx\n",
+ (unsigned long)(ptr->coma_edsr >> 6) & 7);
break;
case AVANTI_NONEXISTENT_MEMORY:
@@ -467,28 +474,31 @@ dec_2100_a50_mcheck(mces, type, logout, framep)
if (ptr->coma_edsr & 0x20)
printf("victim write\n");
else if (ptr->coma_edsr & 0x10)
- printf("DMA. ioCmd<2:0> = %0lx\n", (ptr->coma_edsr >> 6) & 7);
+ printf("DMA. ioCmd<2:0> = %0lx\n",
+ (unsigned long)(ptr->coma_edsr >> 6) & 7);
else
- printf("CPU. cpuCReq<2:0> = %0lx\n", (ptr->coma_edsr >> 6) & 7);
+ printf("CPU. cpuCReq<2:0> = %0lx\n",
+ (unsigned long)(ptr->coma_edsr >> 6) & 7);
break;
case AVANTI_IO_BUS:
printf("\tI/O bus error at %08lx during PCI cycle %0lx\n",
- ptr->epic_pear & 0xffffffff, (ptr->epic_dcsr >> 18) & 0xf);
+ (unsigned long)ptr->epic_pear & 0xffffffff,
+ (unsigned long)(ptr->epic_dcsr >> 18) & 0xf);
break;
case AVANTI_BCACHE_TAG_PARITY:
printf("\tBcache tag address parity error.\n"
"\tcReg_h cycle %0lx, address<7:0> 0x%02lx\n",
- (ptr->biu_stat >> 4) & 7,
- ptr->biu_addr & 0xff);
+ (unsigned long)(ptr->biu_stat >> 4) & 7,
+ (unsigned long)ptr->biu_addr & 0xff);
break;
case AVANTI_BCACHE_TAG_CTRL_PARITY2:
printf("\tBcache tag control parity error.\n"
"\tcReg_h cycle %0lx, address<7:0> 0x%02lx\n",
- (ptr->biu_stat >> 4) & 7,
- ptr->biu_addr & 0xff);
+ (unsigned long)(ptr->biu_stat >> 4) & 7,
+ (unsigned long)ptr->biu_addr & 0xff);
break;
}
@@ -530,15 +540,15 @@ dec_2100_a50_mcheck(mces, type, logout, framep)
case AVANTI_DCACHE_FILL_PARITY:
printf("\tPrimary Dcache data fill parity error.\n"
"\tDcache Quadword %lx, address %08lx\n",
- (ptr->biu_stat >> 12) & 0x3,
- (ptr->fill_addr >> 8) & 0x7f);
+ (unsigned long)(ptr->biu_stat >> 12) & 0x3,
+ (unsigned long)(ptr->fill_addr >> 8) & 0x7f);
break;
case AVANTI_ICACHE_FILL_PARITY:
printf("\tPrimary Icache data fill parity error.\n"
"\tDcache Quadword %lx, address %08lx\n",
- (ptr->biu_stat >> 12) & 0x3,
- (ptr->fill_addr >> 8) & 0x7f);
+ (unsigned long)(ptr->biu_stat >> 12) & 0x3,
+ (unsigned long)(ptr->fill_addr >> 8) & 0x7f);
break;
}
}
diff --git a/sys/arch/alpha/alpha/dec_3000_300.c b/sys/arch/alpha/alpha/dec_3000_300.c
index 84607a6aa9d..f571f10535e 100644
--- a/sys/arch/alpha/alpha/dec_3000_300.c
+++ b/sys/arch/alpha/alpha/dec_3000_300.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dec_3000_300.c,v 1.12 2006/11/28 16:56:50 dlg Exp $ */
+/* $OpenBSD: dec_3000_300.c,v 1.13 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: dec_3000_300.c,v 1.30 2000/05/22 20:13:32 thorpej Exp $ */
/*
@@ -156,11 +156,13 @@ dec_3000_300_cons_init()
#endif
return;
badconsole:
- printf("ctb->ctb_term_type = 0x%lx\n", ctb->ctb_term_type);
- printf("ctb->ctb_turboslot = 0x%lx\n", ctb->ctb_turboslot);
+ printf("ctb->ctb_term_type = 0x%lx\n",
+ (unsigned long)ctb->ctb_term_type);
+ printf("ctb->ctb_turboslot = 0x%lx\n",
+ (unsigned long)ctb->ctb_turboslot);
panic("consinit: unknown console type %lu",
- ctb->ctb_term_type);
+ (unsigned long)ctb->ctb_term_type);
}
static void
diff --git a/sys/arch/alpha/alpha/dec_3000_500.c b/sys/arch/alpha/alpha/dec_3000_500.c
index 93f69538cfe..bbf5f4d2a7f 100644
--- a/sys/arch/alpha/alpha/dec_3000_500.c
+++ b/sys/arch/alpha/alpha/dec_3000_500.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dec_3000_500.c,v 1.12 2006/11/28 16:56:50 dlg Exp $ */
+/* $OpenBSD: dec_3000_500.c,v 1.13 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: dec_3000_500.c,v 1.29 2000/05/22 20:13:32 thorpej Exp $ */
/*
@@ -175,11 +175,13 @@ dec_3000_500_cons_init()
#endif
return;
badconsole:
- printf("ctb->ctb_term_type = 0x%lx\n", ctb->ctb_term_type);
- printf("ctb->ctb_turboslot = 0x%lx\n", ctb->ctb_turboslot);
+ printf("ctb->ctb_term_type = 0x%lx\n",
+ (unsigned long)ctb->ctb_term_type);
+ printf("ctb->ctb_turboslot = 0x%lx\n",
+ (unsigned long)ctb->ctb_turboslot);
panic("consinit: unknown console type %lu",
- ctb->ctb_term_type);
+ (unsigned long)ctb->ctb_term_type);
}
static void
diff --git a/sys/arch/alpha/alpha/dec_550.c b/sys/arch/alpha/alpha/dec_550.c
index e5238a1f3ff..b4ea512fe41 100644
--- a/sys/arch/alpha/alpha/dec_550.c
+++ b/sys/arch/alpha/alpha/dec_550.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dec_550.c,v 1.13 2010/11/23 04:07:55 shadchin Exp $ */
+/* $OpenBSD: dec_550.c,v 1.14 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: dec_550.c,v 1.10 2000/06/20 03:48:53 matt Exp $ */
/*
@@ -146,11 +146,13 @@ dec_550_cons_init()
break;
default:
- printf("ctb->ctb_term_type = 0x%lx\n", ctb->ctb_term_type);
- printf("ctb->ctb_turboslot = 0x%lx\n", ctb->ctb_turboslot);
+ printf("ctb->ctb_term_type = 0x%lx\n",
+ (unsigned long)ctb->ctb_term_type);
+ printf("ctb->ctb_turboslot = 0x%lx\n",
+ (unsigned long)ctb->ctb_turboslot);
- panic("consinit: unknown console type %ld",
- ctb->ctb_term_type);
+ panic("consinit: unknown console type %lu",
+ (unsigned long)ctb->ctb_term_type);
}
}
diff --git a/sys/arch/alpha/alpha/dec_6600.c b/sys/arch/alpha/alpha/dec_6600.c
index 01d7fad40d5..77755434ff4 100644
--- a/sys/arch/alpha/alpha/dec_6600.c
+++ b/sys/arch/alpha/alpha/dec_6600.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dec_6600.c,v 1.13 2010/11/23 04:07:55 shadchin Exp $ */
+/* $OpenBSD: dec_6600.c,v 1.14 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: dec_6600.c,v 1.7 2000/06/20 03:48:54 matt Exp $ */
/*
@@ -173,11 +173,13 @@ dec_6600_cons_init()
default:
printf("ctb_term_type = 0x%lx ctb_turboslot = 0x%lx"
- " hose = %ld\n", ctb->ctb_term_type, ctbslot,
- CTB_TURBOSLOT_HOSE(ctbslot));
+ " hose = %ld\n",
+ (unsigned long)ctb->ctb_term_type,
+ (unsigned long)ctbslot,
+ (unsigned long)CTB_TURBOSLOT_HOSE(ctbslot));
- panic("consinit: unknown console type %ld",
- ctb->ctb_term_type);
+ panic("consinit: unknown console type %lu",
+ (unsigned long)ctb->ctb_term_type);
}
}
@@ -380,16 +382,19 @@ dec_6600_environmental_mcheck(unsigned long mces, struct trapframe *framep,
printf(" Processor Environmental Machine Check, "
"Code 0x%x\n", hdr->mcheck_code);
- printf("Flags\t%016x\n", env->flags);
- printf("DIR\t%016x\n", env->c_dir);
- printf("SMIR\t%016x\n", env->smir);
- printf("CPUIR\t%016x\n", env->cpuir);
- printf("PSIR\t%016x\n", env->psir);
- printf("LM78_ISR\t%016x\n", env->lm78_isr);
- printf("Doors\t%016x\n", env->doors);
- printf("Temp Warning\t%016x\n", env->temp_warning);
- printf("Fan Control\t%016x\n", env->fan_control);
- printf("Fatal Power Down\t%016x\n", env->fatal_power_down);
+ printf("Flags\t%016lx\n", (unsigned long)env->flags);
+ printf("DIR\t%016lx\n", (unsigned long)env->c_dir);
+ printf("SMIR\t%016lx\n", (unsigned long)env->smir);
+ printf("CPUIR\t%016lx\n", (unsigned long)env->cpuir);
+ printf("PSIR\t%016lx\n", (unsigned long)env->psir);
+ printf("LM78_ISR\t%016lx\n", (unsigned long)env->lm78_isr);
+ printf("Doors\t%016lx\n", (unsigned long)env->doors);
+ printf("Temp Warning\t%016lx\n",
+ (unsigned long)env->temp_warning);
+ printf("Fan Control\t%016lx\n",
+ (unsigned long)env->fan_control);
+ printf("Fatal Power Down\t%016lx\n",
+ (unsigned long)env->fatal_power_down);
}
/*
@@ -427,7 +432,7 @@ dec_6600_print_syndrome(int sno, unsigned long syndrome)
unsigned int bitno;
syndrome &= 0xff;
- printf("Syndrome bits %d\t%02x ", sno, syndrome);
+ printf("Syndrome bits %d\t%02lx ", sno, syndrome);
for (bitno = 0; bitno < nitems(ev6_syndrome); bitno++)
if (syndrome == ev6_syndrome[bitno])
break;
@@ -468,8 +473,8 @@ dec_6600_mcheck(unsigned long mces, struct trapframe *framep,
mc_cpu_ev6 *cpu = (mc_cpu_ev6 *)(logout + hdr->la_cpu_offset);
size_t cpu_size = hdr->la_system_offset - hdr->la_cpu_offset;
- printf("Dcache status\t0x%05x\n",
- cpu->dc_stat & EV6_DC_STAT_MASK);
+ printf("Dcache status\t0x%05lx\n",
+ (unsigned long)cpu->dc_stat & EV6_DC_STAT_MASK);
dec_6600_print_syndrome(0, cpu->c_syndrome_0);
dec_6600_print_syndrome(1, cpu->c_syndrome_1);
/* C_STAT */
@@ -519,20 +524,22 @@ dec_6600_mcheck(unsigned long mces, struct trapframe *framep,
}
/* FALLTHROUGH */
default:
- printf("%02x\n", cpu->c_stat);
+ printf("%02lx\n", (unsigned long)cpu->c_stat);
break;
}
/* C_ADDR */
printf("Error address\t");
if ((cpu->c_stat & EV6_C_STAT_MASK) ==
EV6_C_STAT_SNGL_DSTREAM_DC_ECC_ERR)
- printf("0xXXXXXXXXXXX%05x\n", cpu->c_addr & 0xfffc0);
+ printf("0xXXXXXXXXXXX%05lx\n",
+ (unsigned long)cpu->c_addr & 0xfffc0);
else
- printf("0x%016x\n", cpu->c_addr & 0xffffffffffffffc0);
+ printf("0x%016lx\n",
+ (unsigned long)cpu->c_addr & 0xffffffffffffffc0);
if (cpu_size > offsetof(mc_cpu_ev6, exc_addr)) {
- printf("Exception address\t0x%016x%s\n",
- cpu->exc_addr & 0xfffffffffffffffc,
+ printf("Exception address\t0x%016lx%s\n",
+ (unsigned long)cpu->exc_addr & 0xfffffffffffffffc,
cpu->exc_addr & 1 ? " in PAL mode" : "");
/* other fields are not really informative */
}
diff --git a/sys/arch/alpha/alpha/dec_alphabook1.c b/sys/arch/alpha/alpha/dec_alphabook1.c
index 08dc496b098..3d477d0b82e 100644
--- a/sys/arch/alpha/alpha/dec_alphabook1.c
+++ b/sys/arch/alpha/alpha/dec_alphabook1.c
@@ -143,11 +143,13 @@ dec_alphabook1_cons_init(void)
break;
default:
- printf("ctb->ctb_term_type = 0x%lx\n", ctb->ctb_term_type);
- printf("ctb->ctb_turboslot = 0x%lx\n", ctb->ctb_turboslot);
+ printf("ctb->ctb_term_type = 0x%lx\n",
+ (unsigned long)ctb->ctb_term_type);
+ printf("ctb->ctb_turboslot = 0x%lx\n",
+ (unsigned long)ctb->ctb_turboslot);
- panic("consinit: unknown console type %ld",
- ctb->ctb_term_type);
+ panic("consinit: unknown console type %lu",
+ (unsigned long)ctb->ctb_term_type);
}
}
diff --git a/sys/arch/alpha/alpha/dec_axppci_33.c b/sys/arch/alpha/alpha/dec_axppci_33.c
index d2a10a03bd3..81c92c73431 100644
--- a/sys/arch/alpha/alpha/dec_axppci_33.c
+++ b/sys/arch/alpha/alpha/dec_axppci_33.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dec_axppci_33.c,v 1.22 2010/11/23 04:07:55 shadchin Exp $ */
+/* $OpenBSD: dec_axppci_33.c,v 1.23 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: dec_axppci_33.c,v 1.44 2000/05/22 20:13:32 thorpej Exp $ */
/*
@@ -188,11 +188,13 @@ dec_axppci_33_cons_init()
break;
default:
- printf("ctb->ctb_term_type = 0x%lx\n", ctb->ctb_term_type);
- printf("ctb->ctb_turboslot = 0x%lx\n", ctb->ctb_turboslot);
+ printf("ctb->ctb_term_type = 0x%lx\n",
+ (unsigned long)ctb->ctb_term_type);
+ printf("ctb->ctb_turboslot = 0x%lx\n",
+ (unsigned long)ctb->ctb_turboslot);
- panic("consinit: unknown console type %ld",
- ctb->ctb_term_type);
+ panic("consinit: unknown console type %lu",
+ (unsigned long)ctb->ctb_term_type);
}
}
diff --git a/sys/arch/alpha/alpha/dec_eb164.c b/sys/arch/alpha/alpha/dec_eb164.c
index 10b0f33488a..978a4921ac8 100644
--- a/sys/arch/alpha/alpha/dec_eb164.c
+++ b/sys/arch/alpha/alpha/dec_eb164.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dec_eb164.c,v 1.18 2010/11/23 04:07:55 shadchin Exp $ */
+/* $OpenBSD: dec_eb164.c,v 1.19 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: dec_eb164.c,v 1.33 2000/05/22 20:13:32 thorpej Exp $ */
/*
@@ -148,11 +148,13 @@ dec_eb164_cons_init()
break;
default:
- printf("ctb->ctb_term_type = 0x%lx\n", ctb->ctb_term_type);
- printf("ctb->ctb_turboslot = 0x%lx\n", ctb->ctb_turboslot);
+ printf("ctb->ctb_term_type = 0x%lx\n",
+ (unsigned long)ctb->ctb_term_type);
+ printf("ctb->ctb_turboslot = 0x%lx\n",
+ (unsigned long)ctb->ctb_turboslot);
- panic("consinit: unknown console type %ld",
- ctb->ctb_term_type);
+ panic("consinit: unknown console type %lu",
+ (unsigned long)ctb->ctb_term_type);
}
}
diff --git a/sys/arch/alpha/alpha/dec_eb64plus.c b/sys/arch/alpha/alpha/dec_eb64plus.c
index e072e661d09..3cf6e7831b2 100644
--- a/sys/arch/alpha/alpha/dec_eb64plus.c
+++ b/sys/arch/alpha/alpha/dec_eb64plus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dec_eb64plus.c,v 1.8 2010/11/23 04:07:55 shadchin Exp $ */
+/* $OpenBSD: dec_eb64plus.c,v 1.9 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: dec_eb64plus.c,v 1.25 2001/06/05 04:53:11 thorpej Exp $ */
/*
@@ -145,11 +145,13 @@ dec_eb64plus_cons_init()
break;
default:
- printf("ctb->ctb_term_type = 0x%lx\n", ctb->ctb_term_type);
- printf("ctb->ctb_turboslot = 0x%lx\n", ctb->ctb_turboslot);
+ printf("ctb->ctb_term_type = 0x%lx\n",
+ (unsigned long)ctb->ctb_term_type);
+ printf("ctb->ctb_turboslot = 0x%lx\n",
+ (unsigned long)ctb->ctb_turboslot);
- panic("consinit: unknown console type %ld",
- ctb->ctb_term_type);
+ panic("consinit: unknown console type %lu",
+ (unsigned long)ctb->ctb_term_type);
}
}
diff --git a/sys/arch/alpha/alpha/dec_kn20aa.c b/sys/arch/alpha/alpha/dec_kn20aa.c
index 909f1d9828e..a22b72b88e4 100644
--- a/sys/arch/alpha/alpha/dec_kn20aa.c
+++ b/sys/arch/alpha/alpha/dec_kn20aa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dec_kn20aa.c,v 1.19 2010/11/23 04:07:55 shadchin Exp $ */
+/* $OpenBSD: dec_kn20aa.c,v 1.20 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: dec_kn20aa.c,v 1.42 2000/05/22 20:13:32 thorpej Exp $ */
/*
@@ -145,11 +145,13 @@ dec_kn20aa_cons_init()
break;
default:
- printf("ctb->ctb_term_type = 0x%lx\n", ctb->ctb_term_type);
- printf("ctb->ctb_turboslot = 0x%lx\n", ctb->ctb_turboslot);
+ printf("ctb->ctb_term_type = 0x%lx\n",
+ (unsigned long)ctb->ctb_term_type);
+ printf("ctb->ctb_turboslot = 0x%lx\n",
+ (unsigned long)ctb->ctb_turboslot);
- panic("consinit: unknown console type %ld",
- ctb->ctb_term_type);
+ panic("consinit: unknown console type %lu",
+ (unsigned long)ctb->ctb_term_type);
}
}
diff --git a/sys/arch/alpha/alpha/dec_kn300.c b/sys/arch/alpha/alpha/dec_kn300.c
index edb0a1031bf..fcce293235d 100644
--- a/sys/arch/alpha/alpha/dec_kn300.c
+++ b/sys/arch/alpha/alpha/dec_kn300.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dec_kn300.c,v 1.7 2012/12/05 23:20:09 deraadt Exp $ */
+/* $OpenBSD: dec_kn300.c,v 1.8 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: dec_kn300.c,v 1.34 2007/03/04 15:18:10 yamt Exp $ */
/*
@@ -194,11 +194,13 @@ dec_kn300_cons_init()
break;
default:
- printf("ctb->ctb_term_type = 0x%lx\n", ctb->ctb_term_type);
- printf("ctb->ctb_turboslot = 0x%lx\n", ctb->ctb_turboslot);
+ printf("ctb->ctb_term_type = 0x%lx\n",
+ (unsigned long)ctb->ctb_term_type);
+ printf("ctb->ctb_turboslot = 0x%lx\n",
+ (unsigned long)ctb->ctb_turboslot);
- panic("consinit: unknown console type %ld",
- ctb->ctb_term_type);
+ panic("consinit: unknown console type %lu",
+ (unsigned long)ctb->ctb_term_type);
}
#ifdef KGDB
/* Attach the KGDB device. */
diff --git a/sys/arch/alpha/alpha/fp_complete.c b/sys/arch/alpha/alpha/fp_complete.c
index 20618bac338..a2de603ee56 100644
--- a/sys/arch/alpha/alpha/fp_complete.c
+++ b/sys/arch/alpha/alpha/fp_complete.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fp_complete.c,v 1.9 2014/02/06 05:14:12 miod Exp $ */
+/* $OpenBSD: fp_complete.c,v 1.10 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: fp_complete.c,v 1.5 2002/01/18 22:15:56 ross Exp $ */
/*-
@@ -155,8 +155,8 @@ this_cannot_happen(int what_cannot_happen, int64_t bits)
++total;
if (bits)
printf("FP instruction %x\n", (unsigned int)bits);
- printf("FP event %d/%lx/%lx\n", what_cannot_happen, reported,
- alpha_shadow.uop);
+ printf("FP event %d/%lx/%lx\n", what_cannot_happen,
+ (unsigned long)reported, (unsigned long)alpha_shadow.uop);
}
static __inline void
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c
index 55c135ee2d1..04d27a59d59 100644
--- a/sys/arch/alpha/alpha/machdep.c
+++ b/sys/arch/alpha/alpha/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.152 2014/03/26 05:23:42 guenther Exp $ */
+/* $OpenBSD: machdep.c,v 1.153 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */
/*-
@@ -462,7 +462,7 @@ nobootinfo:
if (mddtp->mddt_cluster_cnt < 2) {
mddtweird = 1;
printf("WARNING: weird number of mem clusters: %lu\n",
- mddtp->mddt_cluster_cnt);
+ (unsigned long)mddtp->mddt_cluster_cnt);
}
#if 0
@@ -495,7 +495,7 @@ nobootinfo:
if (memc->mddt_usage & MDDT_mbz) {
mddtweird = 1;
printf("WARNING: mem cluster %d has weird "
- "usage 0x%lx\n", i, memc->mddt_usage);
+ "usage 0x%lx\n", i, (long)memc->mddt_usage);
unknownmem += memc->mddt_pg_cnt;
continue;
}
@@ -784,8 +784,8 @@ nobootinfo:
hz = hwrpb->rpb_intr_freq >> 12;
if (!(60 <= hz && hz <= 10240)) {
#ifdef DIAGNOSTIC
- printf("WARNING: unbelievable rpb_intr_freq: %ld (%d hz)\n",
- hwrpb->rpb_intr_freq, hz);
+ printf("WARNING: unbelievable rpb_intr_freq: %lu (%d hz)\n",
+ (unsigned long)hwrpb->rpb_intr_freq, hz);
#endif
hz = 1024;
}
@@ -933,7 +933,7 @@ alpha_unknown_sysname()
static char s[128]; /* safe size */
snprintf(s, sizeof s, "%s family, unknown model variation 0x%lx",
- platform.family, hwrpb->rpb_variation & SV_ST_MASK);
+ platform.family, (unsigned long)hwrpb->rpb_variation & SV_ST_MASK);
return ((const char *)s);
}
@@ -950,7 +950,7 @@ identifycpu()
for(s = cpu_model; *s; ++s)
if(strncasecmp(s, "MHz", 3) == 0)
goto skipMHz;
- printf(", %ldMHz", hwrpb->rpb_cc_freq / 1000000);
+ printf(", %luMHz", (unsigned long)hwrpb->rpb_cc_freq / 1000000);
skipMHz:
/* fill in hw_serial if a serial number is known */
slen = strlen(hwrpb->rpb_ssn) + 1;
@@ -961,8 +961,9 @@ skipMHz:
}
printf("\n");
- printf("%ld byte page size, %d processor%s.\n",
- hwrpb->rpb_page_size, ncpusfound, ncpusfound == 1 ? "" : "s");
+ printf("%lu byte page size, %d processor%s.\n",
+ (unsigned long)hwrpb->rpb_page_size, ncpusfound,
+ ncpusfound == 1 ? "" : "s");
#if 0
/* this is not particularly useful! */
printf("variation: 0x%lx, revision 0x%lx\n",
diff --git a/sys/arch/alpha/conf/Makefile.alpha b/sys/arch/alpha/conf/Makefile.alpha
index 0af5550c3e3..2f37bebe8d3 100644
--- a/sys/arch/alpha/conf/Makefile.alpha
+++ b/sys/arch/alpha/conf/Makefile.alpha
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.alpha,v 1.82 2013/10/15 19:23:25 guenther Exp $
+# $OpenBSD: Makefile.alpha,v 1.83 2014/05/08 20:46:49 miod Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -24,7 +24,7 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I$S -I. -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -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-fp-regs -Wa,-mev56
diff --git a/sys/arch/alpha/pci/pci_kn20aa.c b/sys/arch/alpha/pci/pci_kn20aa.c
index 4864d800901..4d3149b9c6d 100644
--- a/sys/arch/alpha/pci/pci_kn20aa.c
+++ b/sys/arch/alpha/pci/pci_kn20aa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_kn20aa.c,v 1.26 2009/09/30 20:18:06 miod Exp $ */
+/* $OpenBSD: pci_kn20aa.c,v 1.27 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: pci_kn20aa.c,v 1.21 1996/11/17 02:05:27 cgd Exp $ */
/*
@@ -175,7 +175,7 @@ dec_kn20aa_intr_string(ccv, ih)
static char irqstr[15]; /* 11 + 2 + NULL + sanity */
if (ih > KN20AA_MAX_IRQ)
- panic("dec_kn20aa_intr_string: bogus kn20aa IRQ 0x%x", ih);
+ panic("dec_kn20aa_intr_string: bogus kn20aa IRQ 0x%lx", ih);
snprintf(irqstr, sizeof irqstr, "kn20aa irq %ld", ih);
return (irqstr);
@@ -200,7 +200,7 @@ dec_kn20aa_intr_establish(ccv, ih, level, func, arg, name)
void *cookie;
if (ih > KN20AA_MAX_IRQ)
- panic("dec_kn20aa_intr_establish: bogus kn20aa IRQ 0x%x",
+ panic("dec_kn20aa_intr_establish: bogus kn20aa IRQ 0x%lx",
ih);
cookie = alpha_shared_intr_establish(kn20aa_pci_intr, ih, IST_LEVEL,
diff --git a/sys/arch/alpha/pci/pci_kn300.c b/sys/arch/alpha/pci/pci_kn300.c
index 2af6cceeb4e..040097f4127 100644
--- a/sys/arch/alpha/pci/pci_kn300.c
+++ b/sys/arch/alpha/pci/pci_kn300.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_kn300.c,v 1.5 2012/12/05 23:20:10 deraadt Exp $ */
+/* $OpenBSD: pci_kn300.c,v 1.6 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: pci_kn300.c,v 1.28 2005/12/11 12:16:17 christos Exp $ */
/*
@@ -182,7 +182,7 @@ dec_kn300_intr_string(ccv, ih)
if (irq >= NIRQ)
panic("dec_kn300_intr_string: bogus kn300 IRQ 0x%x", irq);
- snprintf(irqstr, sizeof irqstr, "kn300 irq %ld", irq);
+ snprintf(irqstr, sizeof irqstr, "kn300 irq %d", irq);
return (irqstr);
}
diff --git a/sys/arch/alpha/pci/tsp_bus_mem.c b/sys/arch/alpha/pci/tsp_bus_mem.c
index 97017b5b0fb..7caefea4962 100644
--- a/sys/arch/alpha/pci/tsp_bus_mem.c
+++ b/sys/arch/alpha/pci/tsp_bus_mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tsp_bus_mem.c,v 1.4 2003/09/02 17:25:21 miod Exp $ */
+/* $OpenBSD: tsp_bus_mem.c,v 1.5 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: tsp_bus_mem.c,v 1.4 2000/06/26 19:46:25 thorpej Exp $ */
/*-
@@ -90,7 +90,7 @@ tsp_bus_mem_init2(void *v)
EX_NOWAIT | (CHIP_EX_MALLOC_SAFE(v) ? EX_MALLOCOK : 0));
if (error) {
printf("WARNING: unable to reserve DMA window "
- "0x%lx - 0x%lx\n",
+ "0x%llx - 0x%llx\n",
WSBA_ADDR(pccsr->tsp_wsba[i].tsg_r),
WSBA_ADDR(pccsr->tsp_wsba[i].tsg_r) +
(WSM_LEN(pccsr->tsp_wsm[i].tsg_r) - 1));
diff --git a/sys/arch/alpha/pci/tsp_dma.c b/sys/arch/alpha/pci/tsp_dma.c
index 403a2dfcfb7..32f5d3fb695 100644
--- a/sys/arch/alpha/pci/tsp_dma.c
+++ b/sys/arch/alpha/pci/tsp_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tsp_dma.c,v 1.9 2014/01/06 20:11:40 miod Exp $ */
+/* $OpenBSD: tsp_dma.c,v 1.10 2014/05/08 20:46:49 miod Exp $ */
/* $NetBSD: tsp_dma.c,v 1.1 1999/06/29 06:46:47 ross Exp $ */
/*-
@@ -207,8 +207,8 @@ tsp_dma_init(struct device *tsp, struct tsp_config *pcp)
*/
if ((sgwbase <= dwbase && dwbase < sgwbase + sgwlen) ||
(dwbase <= sgwbase && sgwbase < dwbase + dwlen))
- panic("tsp_dma_init: overlap sg %p len %p d %p len %p",
- sgwbase, sgwlen, dwbase, dwlen);
+ panic("%s: overlap sg 0x%lx len 0x%lx d 0x%lx len 0x%lx",
+ __func__, sgwbase, sgwlen, dwbase, dwlen);
tbase = pcp->pc_sgmap.aps_ptpa;
if (tbase & ~0x7fffffc00UL)