Format string fixes for alpha kernels, and remove -Wno-format
authormiod <miod@openbsd.org>
Thu, 8 May 2014 20:46:49 +0000 (20:46 +0000)
committermiod <miod@openbsd.org>
Thu, 8 May 2014 20:46:49 +0000 (20:46 +0000)
21 files changed:
sys/arch/alpha/alpha/api_up1000.c
sys/arch/alpha/alpha/cpu.c
sys/arch/alpha/alpha/dec_1000a.c
sys/arch/alpha/alpha/dec_2100_a50.c
sys/arch/alpha/alpha/dec_3000_300.c
sys/arch/alpha/alpha/dec_3000_500.c
sys/arch/alpha/alpha/dec_550.c
sys/arch/alpha/alpha/dec_6600.c
sys/arch/alpha/alpha/dec_alphabook1.c
sys/arch/alpha/alpha/dec_axppci_33.c
sys/arch/alpha/alpha/dec_eb164.c
sys/arch/alpha/alpha/dec_eb64plus.c
sys/arch/alpha/alpha/dec_kn20aa.c
sys/arch/alpha/alpha/dec_kn300.c
sys/arch/alpha/alpha/fp_complete.c
sys/arch/alpha/alpha/machdep.c
sys/arch/alpha/conf/Makefile.alpha
sys/arch/alpha/pci/pci_kn20aa.c
sys/arch/alpha/pci/pci_kn300.c
sys/arch/alpha/pci/tsp_bus_mem.c
sys/arch/alpha/pci/tsp_dma.c

index 49a3741..370390b 100644 (file)
@@ -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);
        }
 }
 
index efcb733..7a348cb 100644 (file)
@@ -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);
        }
 }
index 743108c..0e2f5d7 100644 (file)
@@ -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. */
index 48ab413..15d58a5 100644 (file)
@@ -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;
          }
        }
index 84607a6..f571f10 100644 (file)
@@ -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
index 93f6953..bbf5f4d 100644 (file)
@@ -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
index e5238a1..b4ea512 100644 (file)
@@ -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);
        }
 }
 
index 01d7fad..7775543 100644 (file)
@@ -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 */
                }
index 08dc496..3d477d0 100644 (file)
@@ -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);
        }
 }
 
index d2a10a0..81c92c7 100644 (file)
@@ -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);
        }
 }
 
index 10b0f33..978a492 100644 (file)
@@ -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);
        }
 }
 
index e072e66..3cf6e78 100644 (file)
@@ -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);
        }
 }
 
index 909f1d9..a22b72b 100644 (file)
@@ -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);
        }
 }
 
index edb0a10..fcce293 100644 (file)
@@ -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. */
index 20618ba..a2de603 100644 (file)
@@ -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
index 55c135e..04d27a5 100644 (file)
@@ -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",
index 0af5550..2f37beb 100644 (file)
@@ -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
index 4864d80..4d3149b 100644 (file)
@@ -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,
index 2af6cce..040097f 100644 (file)
@@ -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);
 }
index 97017b5..7caefea 100644 (file)
@@ -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));
index 403a2df..32f5d3f 100644 (file)
@@ -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)