summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-07-12 18:44:40 +0000
committertedu <tedu@openbsd.org>2014-07-12 18:44:40 +0000
commitf8e6c4256e251ce0386dacd7e411f1d0894ef80e (patch)
treee99d396f8ace311dec0eee609c0d3271ca1bf876
parentadd a size argument to free. will be used soon, but for now default to 0. (diff)
downloadwireguard-openbsd-f8e6c4256e251ce0386dacd7e411f1d0894ef80e.tar.xz
wireguard-openbsd-f8e6c4256e251ce0386dacd7e411f1d0894ef80e.zip
add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.
-rw-r--r--sys/arch/alpha/alpha/interrupt.c4
-rw-r--r--sys/arch/alpha/dev/bus_dma.c4
-rw-r--r--sys/arch/alpha/dev/sgmap_common.c4
-rw-r--r--sys/arch/alpha/dev/shared_intr.c4
-rw-r--r--sys/arch/alpha/eisa/eisa_machdep.c6
-rw-r--r--sys/arch/alpha/isa/isadma_bounce.c6
-rw-r--r--sys/arch/alpha/stand/boot/disk.c6
-rw-r--r--sys/arch/alpha/stand/installboot.c4
-rw-r--r--sys/arch/alpha/stand/setnetbootinfo/setnetbootinfo.c6
-rw-r--r--sys/arch/amd64/amd64/aesni.c16
-rw-r--r--sys/arch/amd64/amd64/bus_dma.c4
-rw-r--r--sys/arch/amd64/amd64/est.c16
-rw-r--r--sys/arch/amd64/amd64/intr.c12
-rw-r--r--sys/arch/amd64/amd64/k1x-pstate.c4
-rw-r--r--sys/arch/amd64/amd64/mem.c6
-rw-r--r--sys/arch/amd64/amd64/powernow-k8.c6
-rw-r--r--sys/arch/amd64/amd64/softintr.c4
-rw-r--r--sys/arch/amd64/amd64/via.c14
-rw-r--r--sys/arch/amd64/isa/isa_machdep.c6
-rw-r--r--sys/arch/amd64/pci/agp_machdep.c6
-rw-r--r--sys/arch/amd64/pci/vga_post.c6
-rw-r--r--sys/arch/amd64/stand/libsa/diskprobe.c8
-rw-r--r--sys/arch/amd64/stand/libsa/softraid.c12
-rw-r--r--sys/arch/arm/arm/bus_dma.c4
-rw-r--r--sys/arch/arm/arm/pmap7.c4
-rw-r--r--sys/arch/arm/arm/softintr.c4
-rw-r--r--sys/arch/arm/arm/undefined.c4
-rw-r--r--sys/arch/arm/cortex/ampintc.c4
-rw-r--r--sys/arch/arm/xscale/pxa2x0_gpio.c4
-rw-r--r--sys/arch/arm/xscale/pxa2x0_i2s.c6
-rw-r--r--sys/arch/arm/xscale/pxa2x0_intr.c4
-rw-r--r--sys/arch/arm/xscale/pxa2x0_lcd.c6
-rw-r--r--sys/arch/armv7/omap/intc.c4
-rw-r--r--sys/arch/armv7/omap/omdisplay.c6
-rw-r--r--sys/arch/armv7/omap/omgpio.c4
-rw-r--r--sys/arch/armv7/sunxi/a1xintc.c4
-rw-r--r--sys/arch/aviion/aviion/bus_dma.c4
-rw-r--r--sys/arch/aviion/aviion/disksubr.c4
-rw-r--r--sys/arch/aviion/dev/dma.c4
-rw-r--r--sys/arch/aviion/dev/vme.c4
-rw-r--r--sys/arch/aviion/stand/a2coff/a2coff.c4
-rw-r--r--sys/arch/aviion/stand/boot/oaic.c4
-rw-r--r--sys/arch/aviion/stand/boot/oosiop.c6
-rw-r--r--sys/arch/aviion/stand/boot/scsi.c4
-rw-r--r--sys/arch/aviion/stand/boot/sd.c4
-rw-r--r--sys/arch/aviion/stand/vdmtool/vdmtool.c8
-rw-r--r--sys/arch/hppa/dev/apic.c6
-rw-r--r--sys/arch/hppa/dev/astro.c4
-rw-r--r--sys/arch/hppa/gsc/harmony.c6
-rw-r--r--sys/arch/hppa/hppa/intr.c12
-rw-r--r--sys/arch/hppa/hppa/mainbus.c4
-rw-r--r--sys/arch/hppa/stand/libsa/lf.c4
-rw-r--r--sys/arch/hppa64/dev/apic.c6
-rw-r--r--sys/arch/hppa64/dev/astro.c4
-rw-r--r--sys/arch/hppa64/hppa64/autoconf.c6
-rw-r--r--sys/arch/hppa64/hppa64/intr.c8
-rw-r--r--sys/arch/hppa64/hppa64/mainbus.c4
-rw-r--r--sys/arch/hppa64/stand/libsa/lf.c4
-rw-r--r--sys/arch/i386/i386/bus_dma.c4
-rw-r--r--sys/arch/i386/i386/esm.c10
-rw-r--r--sys/arch/i386/i386/est.c16
-rw-r--r--sys/arch/i386/i386/ioapic.c6
-rw-r--r--sys/arch/i386/i386/k1x-pstate.c4
-rw-r--r--sys/arch/i386/i386/mem.c6
-rw-r--r--sys/arch/i386/i386/powernow-k7.c4
-rw-r--r--sys/arch/i386/i386/powernow-k8.c4
-rw-r--r--sys/arch/i386/i386/softintr.c4
-rw-r--r--sys/arch/i386/i386/sys_machdep.c8
-rw-r--r--sys/arch/i386/i386/via.c14
-rw-r--r--sys/arch/i386/isa/isa_machdep.c12
-rw-r--r--sys/arch/i386/pci/agp_machdep.c4
-rw-r--r--sys/arch/i386/pci/glxsb.c14
-rw-r--r--sys/arch/i386/pci/pci_machdep.c4
-rw-r--r--sys/arch/i386/pci/pcibios.c4
-rw-r--r--sys/arch/i386/pci/piix.c4
-rw-r--r--sys/arch/i386/pci/rccosb4.c6
-rw-r--r--sys/arch/i386/pci/vga_post.c6
-rw-r--r--sys/arch/i386/stand/libsa/diskprobe.c8
-rw-r--r--sys/arch/i386/stand/libsa/softraid.c12
-rw-r--r--sys/arch/landisk/landisk/bus_dma.c4
-rw-r--r--sys/arch/landisk/landisk/intr.c4
-rw-r--r--sys/arch/loongson/dev/bonito.c6
-rw-r--r--sys/arch/loongson/loongson/bus_dma.c4
-rw-r--r--sys/arch/loongson/stand/boot/dev.c4
-rw-r--r--sys/arch/luna88k/stand/boot/sd.c4
-rw-r--r--sys/arch/m88k/m88k/softintr.c4
-rw-r--r--sys/arch/macppc/dev/awacs.c10
-rw-r--r--sys/arch/macppc/dev/dbdma.c4
-rw-r--r--sys/arch/macppc/dev/i2s.c10
-rw-r--r--sys/arch/macppc/dev/macintr.c4
-rw-r--r--sys/arch/macppc/dev/openpic.c4
-rw-r--r--sys/arch/macppc/macppc/dma.c4
-rw-r--r--sys/arch/macppc/macppc/mainbus.c4
-rw-r--r--sys/arch/macppc/macppc/mem.c4
-rw-r--r--sys/arch/macppc/macppc/openprom.c6
-rw-r--r--sys/arch/mips64/mips64/softintr.c4
-rw-r--r--sys/arch/octeon/dev/octcf.c10
-rw-r--r--sys/arch/octeon/dev/octeon_pcibus.c4
-rw-r--r--sys/arch/octeon/octeon/bus_dma.c4
-rw-r--r--sys/arch/powerpc/powerpc/softintr.c4
-rw-r--r--sys/arch/sgi/dev/impact.c4
-rw-r--r--sys/arch/sgi/dev/spdmem_mainbus.c6
-rw-r--r--sys/arch/sgi/gio/grtwo.c6
-rw-r--r--sys/arch/sgi/gio/newport.c4
-rw-r--r--sys/arch/sgi/sgi/bus_dma.c4
-rw-r--r--sys/arch/sgi/sgi/eisa_machdep.c4
-rw-r--r--sys/arch/sgi/sgi/ip27_machdep.c4
-rw-r--r--sys/arch/sgi/sgi/l1.c8
-rw-r--r--sys/arch/sgi/stand/boot/diskio.c4
-rw-r--r--sys/arch/sgi/stand/sgivol/sgivol.c4
-rw-r--r--sys/arch/sgi/xbow/xbridge.c16
-rw-r--r--sys/arch/sgi/xbow/xheart.c4
-rw-r--r--sys/arch/sh/sh/interrupt.c4
-rw-r--r--sys/arch/socppc/dev/if_tsec.c8
-rw-r--r--sys/arch/socppc/socppc/dma.c4
-rw-r--r--sys/arch/solbourne/solbourne/machdep.c4
-rw-r--r--sys/arch/sparc/dev/cs4231.c6
-rw-r--r--sys/arch/sparc/dev/fd.c6
-rw-r--r--sys/arch/sparc/dev/magma.c4
-rw-r--r--sys/arch/sparc/sparc/autoconf.c4
-rw-r--r--sys/arch/sparc/sparc/clock.c4
-rw-r--r--sys/arch/sparc/sparc/intr.c4
-rw-r--r--sys/arch/sparc/sparc/machdep.c8
-rw-r--r--sys/arch/sparc/sparc/openprom.c6
-rw-r--r--sys/arch/sparc/sparc/pmap.c26
-rw-r--r--sys/arch/sparc/sparc/vm_machdep.c8
-rw-r--r--sys/arch/sparc/stand/common/dvma.c6
-rw-r--r--sys/arch/sparc/stand/installboot/installboot.c10
-rw-r--r--sys/arch/sparc/stand/installboot/nlist.c4
-rw-r--r--sys/arch/sparc64/dev/ce4231.c6
-rw-r--r--sys/arch/sparc64/dev/central.c4
-rw-r--r--sys/arch/sparc64/dev/creator.c6
-rw-r--r--sys/arch/sparc64/dev/ebus.c10
-rw-r--r--sys/arch/sparc64/dev/fd.c6
-rw-r--r--sys/arch/sparc64/dev/fhc.c10
-rw-r--r--sys/arch/sparc64/dev/iommu.c4
-rw-r--r--sys/arch/sparc64/dev/ldc.c6
-rw-r--r--sys/arch/sparc64/dev/msi.c4
-rw-r--r--sys/arch/sparc64/dev/psycho.c4
-rw-r--r--sys/arch/sparc64/dev/pyro.c6
-rw-r--r--sys/arch/sparc64/dev/sbus.c12
-rw-r--r--sys/arch/sparc64/dev/schizo.c8
-rw-r--r--sys/arch/sparc64/dev/ssm.c4
-rw-r--r--sys/arch/sparc64/dev/vbus.c4
-rw-r--r--sys/arch/sparc64/dev/vdsk.c4
-rw-r--r--sys/arch/sparc64/dev/vdsp.c24
-rw-r--r--sys/arch/sparc64/dev/vldcp.c12
-rw-r--r--sys/arch/sparc64/dev/vnet.c4
-rw-r--r--sys/arch/sparc64/dev/vpci.c6
-rw-r--r--sys/arch/sparc64/sparc64/autoconf.c14
-rw-r--r--sys/arch/sparc64/sparc64/clock.c6
-rw-r--r--sys/arch/sparc64/sparc64/intr.c4
-rw-r--r--sys/arch/sparc64/sparc64/machdep.c10
-rw-r--r--sys/arch/sparc64/sparc64/openprom.c6
-rw-r--r--sys/arch/sparc64/sparc64/vm_machdep.c4
-rw-r--r--sys/arch/sparc64/stand/ofwboot/elf64_exec.c4
-rw-r--r--sys/arch/vax/if/if_qe.c4
-rw-r--r--sys/arch/vax/if/if_uba.c4
-rw-r--r--sys/arch/vax/mbus/legss.c4
-rw-r--r--sys/arch/vax/mscp/mscp.c4
-rw-r--r--sys/arch/vax/qbus/uda.c4
-rw-r--r--sys/arch/vax/vax/bus_dma.c4
-rw-r--r--sys/arch/vax/vax/softintr.c4
-rw-r--r--sys/arch/vax/vsa/gpx.c4
-rw-r--r--sys/arch/vax/vsa/lcg.c4
-rw-r--r--sys/arch/vax/vsa/lcspx.c4
-rw-r--r--sys/arch/vax/vsa/smg.c8
-rw-r--r--sys/arch/zaurus/dev/zaurus_flash.c22
-rw-r--r--sys/arch/zaurus/stand/zboot/diskprobe.c4
169 files changed, 523 insertions, 523 deletions
diff --git a/sys/arch/alpha/alpha/interrupt.c b/sys/arch/alpha/alpha/interrupt.c
index 9507cfe3ffb..d38ad4e22ae 100644
--- a/sys/arch/alpha/alpha/interrupt.c
+++ b/sys/arch/alpha/alpha/interrupt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interrupt.c,v 1.32 2014/01/26 17:40:09 miod Exp $ */
+/* $OpenBSD: interrupt.c,v 1.33 2014/07/12 18:44:40 tedu Exp $ */
/* $NetBSD: interrupt.c,v 1.46 2000/06/03 20:47:36 thorpej Exp $ */
/*-
@@ -586,7 +586,7 @@ softintr_disestablish(void *arg)
}
mtx_leave(&asi->softintr_mtx);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/alpha/dev/bus_dma.c b/sys/arch/alpha/dev/bus_dma.c
index 3d4f2ad546d..0c9d0c0ff08 100644
--- a/sys/arch/alpha/dev/bus_dma.c
+++ b/sys/arch/alpha/dev/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.32 2014/07/11 09:36:25 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.33 2014/07/12 18:44:40 tedu Exp $ */
/* $NetBSD: bus_dma.c,v 1.40 2000/07/17 04:47:56 thorpej Exp $ */
/*-
@@ -112,7 +112,7 @@ _bus_dmamap_destroy(t, map)
bus_dmamap_t map;
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/alpha/dev/sgmap_common.c b/sys/arch/alpha/dev/sgmap_common.c
index 11d26b8b48b..af751a93b10 100644
--- a/sys/arch/alpha/dev/sgmap_common.c
+++ b/sys/arch/alpha/dev/sgmap_common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sgmap_common.c,v 1.12 2014/06/14 23:11:20 jmatthew Exp $ */
+/* $OpenBSD: sgmap_common.c,v 1.13 2014/07/12 18:44:40 tedu Exp $ */
/* $NetBSD: sgmap_common.c,v 1.13 2000/06/29 09:02:57 mrg Exp $ */
/*-
@@ -187,7 +187,7 @@ void
alpha_sgmap_dmamap_teardown(map)
bus_dmamap_t map;
{
- free(map->_dm_cookie, M_DEVBUF);
+ free(map->_dm_cookie, M_DEVBUF, 0);
}
void
diff --git a/sys/arch/alpha/dev/shared_intr.c b/sys/arch/alpha/dev/shared_intr.c
index 847541c8a9a..c8ef5c2256c 100644
--- a/sys/arch/alpha/dev/shared_intr.c
+++ b/sys/arch/alpha/dev/shared_intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: shared_intr.c,v 1.18 2011/04/15 20:40:05 deraadt Exp $ */
+/* $OpenBSD: shared_intr.c,v 1.19 2014/07/12 18:44:40 tedu Exp $ */
/* $NetBSD: shared_intr.c,v 1.13 2000/03/19 01:46:18 thorpej Exp $ */
/*
@@ -196,7 +196,7 @@ alpha_shared_intr_disestablish(intr, cookie)
*/
evcount_detach(&ih->ih_count);
TAILQ_REMOVE(&intr[num].intr_q, ih, ih_q);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
}
int
diff --git a/sys/arch/alpha/eisa/eisa_machdep.c b/sys/arch/alpha/eisa/eisa_machdep.c
index 40058e7738b..8da7288638d 100644
--- a/sys/arch/alpha/eisa/eisa_machdep.c
+++ b/sys/arch/alpha/eisa/eisa_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eisa_machdep.c,v 1.4 2013/07/17 13:57:24 martin Exp $ */
+/* $OpenBSD: eisa_machdep.c,v 1.5 2014/07/12 18:44:40 tedu Exp $ */
/* $NetBSD: eisa_machdep.c,v 1.1 2000/07/29 23:18:47 thorpej Exp $ */
/*-
@@ -572,8 +572,8 @@ eisa_init(eisa_chipset_tag_t ec)
}
}
- free(cdata, M_TEMP);
- free(data, M_TEMP);
+ free(cdata, M_TEMP, 0);
+ free(data, M_TEMP, 0);
}
/*
diff --git a/sys/arch/alpha/isa/isadma_bounce.c b/sys/arch/alpha/isa/isadma_bounce.c
index bb05340dc01..e4cb07fdd71 100644
--- a/sys/arch/alpha/isa/isadma_bounce.c
+++ b/sys/arch/alpha/isa/isadma_bounce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isadma_bounce.c,v 1.10 2010/11/20 20:58:49 miod Exp $ */
+/* $OpenBSD: isadma_bounce.c,v 1.11 2014/07/12 18:44:40 tedu Exp $ */
/* $NetBSD: isadma_bounce.c,v 1.3 2000/06/29 09:02:57 mrg Exp $ */
/*-
@@ -171,7 +171,7 @@ isadma_bounce_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,
out:
if (error) {
if (map->_dm_cookie != NULL)
- free(map->_dm_cookie, M_DEVBUF);
+ free(map->_dm_cookie, M_DEVBUF, 0);
_bus_dmamap_destroy(t, map);
}
return (error);
@@ -191,7 +191,7 @@ isadma_bounce_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
if (cookie->id_flags & ID_HAS_BOUNCE)
isadma_bounce_free_bouncebuf(t, map);
- free(cookie, M_DEVBUF);
+ free(cookie, M_DEVBUF, 0);
_bus_dmamap_destroy(t, map);
}
diff --git a/sys/arch/alpha/stand/boot/disk.c b/sys/arch/alpha/stand/boot/disk.c
index 1683e75160a..2ad6b590749 100644
--- a/sys/arch/alpha/stand/boot/disk.c
+++ b/sys/arch/alpha/stand/boot/disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disk.c,v 1.13 2013/11/12 01:37:40 krw Exp $ */
+/* $OpenBSD: disk.c,v 1.14 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: disk.c,v 1.6 1997/04/06 08:40:33 cgd Exp $ */
/*
@@ -156,7 +156,7 @@ diskopen(f, ctlr, unit, part)
if (part >= lp->d_npartitions ||
DL_GETPSIZE(&lp->d_partitions[part]) == 0) {
-bad: free(sc, sizeof(struct disk_softc));
+bad: free(sc, sizeof(struct disk_softc), 0);
return (ENXIO);
}
return (0);
@@ -170,7 +170,7 @@ diskclose(f)
sc = f->f_devdata;
(void)prom_close(sc->sc_fd);
- free(sc, sizeof(struct disk_softc));
+ free(sc, sizeof(struct disk_softc), 0);
f->f_devdata = NULL;
return (0);
}
diff --git a/sys/arch/alpha/stand/installboot.c b/sys/arch/alpha/stand/installboot.c
index 57e039a55b1..9becc1ce7a8 100644
--- a/sys/arch/alpha/stand/installboot.c
+++ b/sys/arch/alpha/stand/installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: installboot.c,v 1.17 2013/06/11 16:42:06 deraadt Exp $ */
+/* $OpenBSD: installboot.c,v 1.18 2014/07/12 18:44:40 tedu Exp $ */
/* $NetBSD: installboot.c,v 1.2 1997/04/06 08:41:12 cgd Exp $ */
/*
@@ -258,7 +258,7 @@ loadprotoblocks(char *fname, long *size)
}
if (read(fd, bp, statbuf.st_size) != statbuf.st_size) {
warn("read: %s", fname);
- free(bp);
+ free(bp, 0);
close(fd);
return NULL;
}
diff --git a/sys/arch/alpha/stand/setnetbootinfo/setnetbootinfo.c b/sys/arch/alpha/stand/setnetbootinfo/setnetbootinfo.c
index 02381d36ff0..30e71e88c5a 100644
--- a/sys/arch/alpha/stand/setnetbootinfo/setnetbootinfo.c
+++ b/sys/arch/alpha/stand/setnetbootinfo/setnetbootinfo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: setnetbootinfo.c,v 1.2 2003/05/11 19:41:09 deraadt Exp $ */
+/* $OpenBSD: setnetbootinfo.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: setnetbootinfo.c,v 1.5 1997/04/06 08:41:37 cgd Exp $ */
/*
@@ -244,9 +244,9 @@ main(argc, argv)
printf("closing %s...\n", outfilename);
close(fd);
- free(netbb);
+ free(netbb, 0);
if (outfile == NULL)
- free(outfilename);
+ free(outfilename, 0);
exit (0);
}
diff --git a/sys/arch/amd64/amd64/aesni.c b/sys/arch/amd64/amd64/aesni.c
index 5ef36080817..a107ef602a5 100644
--- a/sys/arch/amd64/amd64/aesni.c
+++ b/sys/arch/amd64/amd64/aesni.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aesni.c,v 1.26 2014/01/18 23:17:24 mikeb Exp $ */
+/* $OpenBSD: aesni.c,v 1.27 2014/07/12 18:44:41 tedu Exp $ */
/*-
* Copyright (c) 2003 Jason Wright
* Copyright (c) 2003, 2004 Theo de Raadt
@@ -162,7 +162,7 @@ aesni_setup(void)
aesni_sc->sc_cid = crypto_get_driverid(0);
if (aesni_sc->sc_cid < 0) {
- free(aesni_sc, M_DEVBUF);
+ free(aesni_sc, M_DEVBUF, 0);
return;
}
@@ -352,12 +352,12 @@ aesni_freesession(u_int64_t tid)
if (ses->ses_ghash) {
explicit_bzero(ses->ses_ghash, sizeof(GHASH_CTX));
- free(ses->ses_ghash, M_CRYPTO_DATA);
+ free(ses->ses_ghash, M_CRYPTO_DATA, 0);
}
if (ses->ses_xts) {
explicit_bzero(ses->ses_xts, sizeof(struct aesni_xts_ctx));
- free(ses->ses_xts, M_CRYPTO_DATA);
+ free(ses->ses_xts, M_CRYPTO_DATA, 0);
}
if (ses->ses_swd) {
@@ -366,13 +366,13 @@ aesni_freesession(u_int64_t tid)
if (swd->sw_ictx) {
explicit_bzero(swd->sw_ictx, axf->ctxsize);
- free(swd->sw_ictx, M_CRYPTO_DATA);
+ free(swd->sw_ictx, M_CRYPTO_DATA, 0);
}
if (swd->sw_octx) {
explicit_bzero(swd->sw_octx, axf->ctxsize);
- free(swd->sw_octx, M_CRYPTO_DATA);
+ free(swd->sw_octx, M_CRYPTO_DATA, 0);
}
- free(swd, M_CRYPTO_DATA);
+ free(swd, M_CRYPTO_DATA, 0);
}
explicit_bzero(ses, sizeof (*ses));
@@ -411,7 +411,7 @@ aesni_encdec(struct cryptop *crp, struct cryptodesc *crd,
if (crd->crd_len > aesni_sc->sc_buflen) {
if (buf != NULL) {
explicit_bzero(buf, aesni_sc->sc_buflen);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
}
aesni_sc->sc_buflen = 0;
diff --git a/sys/arch/amd64/amd64/bus_dma.c b/sys/arch/amd64/amd64/bus_dma.c
index 61a1c7cf82c..053a0305eeb 100644
--- a/sys/arch/amd64/amd64/bus_dma.c
+++ b/sys/arch/amd64/amd64/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.44 2014/07/11 09:36:25 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.45 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: bus_dma.c,v 1.3 2003/05/07 21:33:58 fvdl Exp $ */
/*-
@@ -164,7 +164,7 @@ void
_bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/amd64/amd64/est.c b/sys/arch/amd64/amd64/est.c
index c5b6d822669..86b465cc4d7 100644
--- a/sys/arch/amd64/amd64/est.c
+++ b/sys/arch/amd64/amd64/est.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: est.c,v 1.32 2014/05/23 03:30:41 guenther Exp $ */
+/* $OpenBSD: est.c,v 1.33 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2003 Michael Eriksson.
* All rights reserved.
@@ -255,7 +255,7 @@ est_acpi_init()
return acpilist;
notable:
- free(acpilist, M_DEVBUF);
+ free(acpilist, M_DEVBUF, 0);
acpilist = NULL;
nolist:
return NULL;
@@ -283,7 +283,7 @@ est_acpi_pss_changed(struct acpicpu_pss *pss, int npss)
M_DEVBUF, M_NOWAIT)) == NULL) {
printf("est_acpi_pss_changed: cannot allocate memory for new "
"operating points");
- free(acpilist, M_DEVBUF);
+ free(acpilist, M_DEVBUF, 0);
return;
}
@@ -294,8 +294,8 @@ est_acpi_pss_changed(struct acpicpu_pss *pss, int npss)
needtran = 0;
}
- free(est_fqlist->table, M_DEVBUF);
- free(est_fqlist, M_DEVBUF);
+ free(est_fqlist->table, M_DEVBUF, 0);
+ free(est_fqlist, M_DEVBUF, 0);
est_fqlist = acpilist;
if (needtran) {
@@ -383,7 +383,7 @@ est_init(struct cpu_info *ci)
if ((fake_table = malloc(sizeof(struct est_op) * 3, M_DEVBUF,
M_NOWAIT)) == NULL) {
- free(fake_fqlist, M_DEVBUF);
+ free(fake_fqlist, M_DEVBUF, 0);
printf("%s: EST: cannot allocate memory for fake "
"table\n", cpu_device);
return;
@@ -443,8 +443,8 @@ est_init(struct cpu_info *ci)
return;
nospeedstep:
- free(est_fqlist->table, M_DEVBUF);
- free(est_fqlist, M_DEVBUF);
+ free(est_fqlist->table, M_DEVBUF, 0);
+ free(est_fqlist, M_DEVBUF, 0);
}
void
diff --git a/sys/arch/amd64/amd64/intr.c b/sys/arch/amd64/amd64/intr.c
index d66170e8bd2..e68ea50262a 100644
--- a/sys/arch/amd64/amd64/intr.c
+++ b/sys/arch/amd64/amd64/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.36 2014/03/29 18:09:28 guenther Exp $ */
+/* $OpenBSD: intr.c,v 1.37 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: intr.c,v 1.3 2003/03/03 22:16:20 fvdl Exp $ */
/*
@@ -316,7 +316,7 @@ found:
idtvec = idt_vec_alloc(APIC_LEVEL(level), IDT_INTR_HIGH);
if (idtvec == 0) {
simple_lock(&ci->ci_slock);
- free(ci->ci_isources[slot], M_DEVBUF);
+ free(ci->ci_isources[slot], M_DEVBUF, 0);
ci->ci_isources[slot] = NULL;
simple_unlock(&ci->ci_slock);
return EBUSY;
@@ -377,7 +377,7 @@ intr_establish(int legacy_irq, struct pic *pic, int pin, int type, int level,
if (source->is_handlers != NULL &&
source->is_pic->pic_type != pic->pic_type) {
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
printf("intr_establish: can't share intr source between "
"different PIC types (legacy_irq %d pin %d slot %d)\n",
legacy_irq, pin, slot);
@@ -405,7 +405,7 @@ intr_establish(int legacy_irq, struct pic *pic, int pin, int type, int level,
printf("intr_establish: pic %s pin %d: can't share "
"type %d with %d\n", pic->pic_name, pin,
source->is_type, type);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
return NULL;
}
break;
@@ -518,14 +518,14 @@ intr_disestablish(struct intrhand *ih)
#endif
if (source->is_handlers == NULL) {
- free(source, M_DEVBUF);
+ free(source, M_DEVBUF, 0);
ci->ci_isources[ih->ih_slot] = NULL;
if (pic != &i8259_pic)
idt_vec_free(idtvec);
}
evcount_detach(&ih->ih_count);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
simple_unlock(&ci->ci_slock);
}
diff --git a/sys/arch/amd64/amd64/k1x-pstate.c b/sys/arch/amd64/amd64/k1x-pstate.c
index ff43fc6a919..5dc66b1adcb 100644
--- a/sys/arch/amd64/amd64/k1x-pstate.c
+++ b/sys/arch/amd64/amd64/k1x-pstate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: k1x-pstate.c,v 1.5 2013/10/05 18:47:05 brynet Exp $ */
+/* $OpenBSD: k1x-pstate.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2011 Bryan Steele <brynet@gmail.com>
*
@@ -200,5 +200,5 @@ k1x_init(struct cpu_info *ci)
setperf_prio = 1;
return;
}
- free(cstate, M_DEVBUF);
+ free(cstate, M_DEVBUF, 0);
}
diff --git a/sys/arch/amd64/amd64/mem.c b/sys/arch/amd64/amd64/mem.c
index 3961bdef896..80994991b5f 100644
--- a/sys/arch/amd64/amd64/mem.c
+++ b/sys/arch/amd64/amd64/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.16 2013/12/19 21:30:02 deraadt Exp $ */
+/* $OpenBSD: mem.c,v 1.17 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1982, 1986, 1990, 1993
@@ -295,7 +295,7 @@ mem_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
if (!error)
error = copyout(md, mo->mo_desc,
nd * sizeof(struct mem_range_desc));
- free(md, M_MEMDESC);
+ free(md, M_MEMDESC, 0);
} else {
nd = mem_range_softc.mr_ndesc;
}
@@ -309,7 +309,7 @@ mem_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
md->mr_owner[sizeof(md->mr_owner) - 1] = 0;
if (error == 0)
error = mem_range_attr_set(md, &mo->mo_arg[0]);
- free(md, M_MEMDESC);
+ free(md, M_MEMDESC, 0);
break;
}
return (error);
diff --git a/sys/arch/amd64/amd64/powernow-k8.c b/sys/arch/amd64/amd64/powernow-k8.c
index 1e0875c9d05..a725e7a804a 100644
--- a/sys/arch/amd64/amd64/powernow-k8.c
+++ b/sys/arch/amd64/amd64/powernow-k8.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: powernow-k8.c,v 1.22 2010/04/20 22:05:41 tedu Exp $ */
+/* $OpenBSD: powernow-k8.c,v 1.23 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2004 Martin Végiard.
* Copyright (c) 2004-2005 Bruno Ducrot
@@ -383,7 +383,7 @@ k8pnow_acpi_pss_changed(struct acpicpu_pss * pss, int npss)
if (needtran)
k8pnow_transition(nstate, curs);
- free(cstate, M_DEVBUF);
+ free(cstate, M_DEVBUF, 0);
k8pnow_current_state = nstate;
}
@@ -513,5 +513,5 @@ k8_powernow_init(struct cpu_info *ci)
setperf_prio = 1;
return;
}
- free(cstate, M_DEVBUF);
+ free(cstate, M_DEVBUF, 0);
}
diff --git a/sys/arch/amd64/amd64/softintr.c b/sys/arch/amd64/amd64/softintr.c
index b0d22813c76..3b50c59b556 100644
--- a/sys/arch/amd64/amd64/softintr.c
+++ b/sys/arch/amd64/amd64/softintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softintr.c,v 1.5 2009/04/19 19:13:57 oga Exp $ */
+/* $OpenBSD: softintr.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: softintr.c,v 1.1 2003/02/26 21:26:12 fvdl Exp $ */
/*-
@@ -157,5 +157,5 @@ softintr_disestablish(void *arg)
}
mtx_leave(&si->softintr_lock);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
diff --git a/sys/arch/amd64/amd64/via.c b/sys/arch/amd64/amd64/via.c
index 31bb1c0837e..543f2b643df 100644
--- a/sys/arch/amd64/amd64/via.c
+++ b/sys/arch/amd64/amd64/via.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: via.c,v 1.15 2014/03/29 18:09:28 guenther Exp $ */
+/* $OpenBSD: via.c,v 1.16 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -118,7 +118,7 @@ viac3_crypto_setup(void)
vc3_sc->sc_cid = crypto_get_driverid(0);
if (vc3_sc->sc_cid < 0) {
- free(vc3_sc, M_DEVBUF);
+ free(vc3_sc, M_DEVBUF, 0);
return; /* YYY bitch? */
}
@@ -162,7 +162,7 @@ viac3_crypto_newsession(u_int32_t *sidp, struct cryptoini *cri)
return (ENOMEM);
bcopy(sc->sc_sessions, ses, sesn * sizeof(*ses));
explicit_bzero(sc->sc_sessions, sesn * sizeof(*ses));
- free(sc->sc_sessions, M_DEVBUF);
+ free(sc->sc_sessions, M_DEVBUF, 0);
sc->sc_sessions = ses;
ses = &sc->sc_sessions[sesn];
sc->sc_nsessions++;
@@ -302,13 +302,13 @@ viac3_crypto_freesession(u_int64_t tid)
if (swd->sw_ictx) {
explicit_bzero(swd->sw_ictx, axf->ctxsize);
- free(swd->sw_ictx, M_CRYPTO_DATA);
+ free(swd->sw_ictx, M_CRYPTO_DATA, 0);
}
if (swd->sw_octx) {
explicit_bzero(swd->sw_octx, axf->ctxsize);
- free(swd->sw_octx, M_CRYPTO_DATA);
+ free(swd->sw_octx, M_CRYPTO_DATA, 0);
}
- free(swd, M_CRYPTO_DATA);
+ free(swd, M_CRYPTO_DATA, 0);
}
explicit_bzero(&sc->sc_sessions[sesn], sizeof(sc->sc_sessions[sesn]));
@@ -429,7 +429,7 @@ viac3_crypto_encdec(struct cryptop *crp, struct cryptodesc *crd,
if (sc->op_buf != NULL) {
explicit_bzero(sc->op_buf, crd->crd_len);
- free(sc->op_buf, M_DEVBUF);
+ free(sc->op_buf, M_DEVBUF, 0);
sc->op_buf = NULL;
}
diff --git a/sys/arch/amd64/isa/isa_machdep.c b/sys/arch/amd64/isa/isa_machdep.c
index 07b1d891d87..eb5f22629f4 100644
--- a/sys/arch/amd64/isa/isa_machdep.c
+++ b/sys/arch/amd64/isa/isa_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isa_machdep.c,v 1.22 2010/11/20 20:58:51 miod Exp $ */
+/* $OpenBSD: isa_machdep.c,v 1.23 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: isa_machdep.c,v 1.22 1997/06/12 23:57:32 thorpej Exp $ */
#define ISA_DMA_STATS
@@ -452,7 +452,7 @@ _isa_bus_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,
out:
if (error) {
if (map->_dm_cookie != NULL)
- free(map->_dm_cookie, M_DEVBUF);
+ free(map->_dm_cookie, M_DEVBUF, 0);
_bus_dmamap_destroy(t, map);
}
return (error);
@@ -472,7 +472,7 @@ _isa_bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
if (cookie->id_flags & ID_HAS_BOUNCE)
_isa_dma_free_bouncebuf(t, map);
- free(cookie, M_DEVBUF);
+ free(cookie, M_DEVBUF, 0);
_bus_dmamap_destroy(t, map);
}
diff --git a/sys/arch/amd64/pci/agp_machdep.c b/sys/arch/amd64/pci/agp_machdep.c
index 0634fa7e4e3..669b56d15f8 100644
--- a/sys/arch/amd64/pci/agp_machdep.c
+++ b/sys/arch/amd64/pci/agp_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: agp_machdep.c,v 1.11 2014/04/01 09:05:03 mpi Exp $ */
+/* $OpenBSD: agp_machdep.c,v 1.12 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2008 - 2009 Owain G. Ainsworth <oga@openbsd.org>
@@ -90,7 +90,7 @@ agp_init_map(bus_space_tag_t tag, bus_addr_t address, bus_size_t size,
map->size = size;
if ((err = bus_space_map(tag, address, size, flags, &map->bsh)) != 0) {
- free(map, M_AGP);
+ free(map, M_AGP, 0);
return (err);
}
*mapp = map;
@@ -101,7 +101,7 @@ void
agp_destroy_map(struct agp_map *map)
{
bus_space_unmap(map->bst, map->bsh, map->size);
- free(map, M_AGP);
+ free(map, M_AGP, 0);
}
diff --git a/sys/arch/amd64/pci/vga_post.c b/sys/arch/amd64/pci/vga_post.c
index 821bc1e3d62..ccef775ea7d 100644
--- a/sys/arch/amd64/pci/vga_post.c
+++ b/sys/arch/amd64/pci/vga_post.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vga_post.c,v 1.6 2014/04/08 09:02:51 mpi Exp $ */
+/* $OpenBSD: vga_post.c,v 1.7 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: vga_post.c,v 1.12 2009/03/15 21:32:36 cegger Exp $ */
/*-
@@ -142,7 +142,7 @@ vga_post_init(int bus, int device, int function)
&sc->ram_backing, BASE_MEMORY/PAGE_SIZE, UVM_PLA_WAITOK);
if (err) {
uvm_km_free(kernel_map, sc->sys_image, 1024 * 1024);
- free(sc, M_DEVBUF);
+ free(sc, M_DEVBUF, 0);
return NULL;
}
@@ -212,7 +212,7 @@ vga_post_free(struct vga_post *sc)
pmap_kremove(sc->sys_image, 1024 * 1024);
uvm_km_free(kernel_map, sc->sys_image, 1024 * 1024);
pmap_update(pmap_kernel());
- free(sc, M_DEVBUF);
+ free(sc, M_DEVBUF, 0);
}
#ifdef DDB
diff --git a/sys/arch/amd64/stand/libsa/diskprobe.c b/sys/arch/amd64/stand/libsa/diskprobe.c
index 50062579d5d..7a64b298ca6 100644
--- a/sys/arch/amd64/stand/libsa/diskprobe.c
+++ b/sys/arch/amd64/stand/libsa/diskprobe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diskprobe.c,v 1.13 2013/11/05 00:51:58 krw Exp $ */
+/* $OpenBSD: diskprobe.c,v 1.14 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -79,7 +79,7 @@ floppyprobe(void)
if (debug)
printf(" <!fd%u>", i);
#endif
- free(dip, 0);
+ free(dip, 0, 0);
break;
}
@@ -122,7 +122,7 @@ hardprobe(void)
if (debug)
printf(" <!hd%u>", i&0x7f);
#endif
- free(dip, 0);
+ free(dip, 0, 0);
break;
}
@@ -234,7 +234,7 @@ cdprobe(void)
#if 0
if (bios_getdiskinfo(cddev, &dip->bios_info)) {
printf(" <!cd0>"); /* XXX */
- free(dip, 0);
+ free(dip, 0, 0);
return;
}
#endif
diff --git a/sys/arch/amd64/stand/libsa/softraid.c b/sys/arch/amd64/stand/libsa/softraid.c
index 5c7f9b3104e..15679a72b35 100644
--- a/sys/arch/amd64/stand/libsa/softraid.c
+++ b/sys/arch/amd64/stand/libsa/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.6 2013/12/28 02:40:41 jsing Exp $ */
+/* $OpenBSD: softraid.c,v 1.7 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2012 Joel Sing <jsing@openbsd.org>
@@ -315,7 +315,7 @@ srprobe(void)
}
explicit_bzero(md, SR_META_SIZE * 512);
- free(md, 0);
+ free(md, 0, 0);
}
int
@@ -477,18 +477,18 @@ sr_clear_keys(void)
continue;
if (bv->sbv_keys != NULL) {
explicit_bzero(bv->sbv_keys, SR_CRYPTO_KEYBLOCK_BYTES);
- free(bv->sbv_keys, 0);
+ free(bv->sbv_keys, 0, 0);
bv->sbv_keys = NULL;
}
if (bv->sbv_maskkey != NULL) {
explicit_bzero(bv->sbv_maskkey, SR_CRYPTO_MAXKEYBYTES);
- free(bv->sbv_maskkey, 0);
+ free(bv->sbv_maskkey, 0, 0);
bv->sbv_maskkey = NULL;
}
}
SLIST_FOREACH(kd, &sr_keydisks, kd_link) {
explicit_bzero(kd, sizeof(*kd));
- free(kd, 0);
+ free(kd, 0, 0);
}
}
@@ -618,7 +618,7 @@ done:
if (keys != NULL && rv != 0) {
explicit_bzero(keys, SR_CRYPTO_KEYBLOCK_BYTES);
- free(keys, 0);
+ free(keys, 0, 0);
}
return (rv);
diff --git a/sys/arch/arm/arm/bus_dma.c b/sys/arch/arm/arm/bus_dma.c
index 1ef6d858ed3..164dbc642d7 100644
--- a/sys/arch/arm/arm/bus_dma.c
+++ b/sys/arch/arm/arm/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.25 2014/07/11 09:36:25 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.26 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: bus_dma.c,v 1.38 2003/10/30 08:44:13 scw Exp $ */
/*-
@@ -173,7 +173,7 @@ _bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
map->_dm_buftype = ARM32_BUFTYPE_INVALID;
map->_dm_proc = NULL;
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/arm/arm/pmap7.c b/sys/arch/arm/arm/pmap7.c
index bd973160779..f7be94c520b 100644
--- a/sys/arch/arm/arm/pmap7.c
+++ b/sys/arch/arm/arm/pmap7.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap7.c,v 1.14 2014/05/08 21:17:00 miod Exp $ */
+/* $OpenBSD: pmap7.c,v 1.15 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: pmap.c,v 1.147 2004/01/18 13:03:50 scw Exp $ */
/*
@@ -758,7 +758,7 @@ pmap_free_l1(pmap_t pm)
/* free backing va */
uvm_km_free(kernel_map, (vaddr_t)l1->l1_kva, L1_TABLE_SIZE);
- free(l1, M_VMPMAP);
+ free(l1, M_VMPMAP, 0);
}
/*
diff --git a/sys/arch/arm/arm/softintr.c b/sys/arch/arm/arm/softintr.c
index b7b003687e6..ba10f2b49f0 100644
--- a/sys/arch/arm/arm/softintr.c
+++ b/sys/arch/arm/arm/softintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softintr.c,v 1.7 2010/12/21 14:56:23 claudio Exp $ */
+/* $OpenBSD: softintr.c,v 1.8 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */
/*
@@ -157,5 +157,5 @@ softintr_disestablish(void *arg)
}
mtx_leave(&siq->siq_mtx);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
diff --git a/sys/arch/arm/arm/undefined.c b/sys/arch/arm/arm/undefined.c
index 66fb3266a76..23ef6539c0c 100644
--- a/sys/arch/arm/arm/undefined.c
+++ b/sys/arch/arm/arm/undefined.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: undefined.c,v 1.5 2011/09/20 22:02:11 miod Exp $ */
+/* $OpenBSD: undefined.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: undefined.c,v 1.22 2003/11/29 22:21:29 bjh21 Exp $ */
/*
@@ -98,7 +98,7 @@ remove_coproc_handler(void *cookie)
struct undefined_handler *uh = cookie;
LIST_REMOVE(uh, uh_link);
- free(uh, M_TEMP);
+ free(uh, M_TEMP, 0);
}
diff --git a/sys/arch/arm/cortex/ampintc.c b/sys/arch/arm/cortex/ampintc.c
index 538728eb1ef..747c9455158 100644
--- a/sys/arch/arm/cortex/ampintc.c
+++ b/sys/arch/arm/cortex/ampintc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ampintc.c,v 1.2 2013/09/06 21:40:28 patrick Exp $ */
+/* $OpenBSD: ampintc.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2007,2009,2011 Dale Rahn <drahn@openbsd.org>
*
@@ -561,7 +561,7 @@ ampintc_intr_disestablish(void *cookie)
TAILQ_REMOVE(&sc->sc_ampintc_handler[irqno].iq_list, ih, ih_list);
if (ih->ih_name != NULL)
evcount_detach(&ih->ih_count);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
restore_interrupts(psw);
#endif
}
diff --git a/sys/arch/arm/xscale/pxa2x0_gpio.c b/sys/arch/arm/xscale/pxa2x0_gpio.c
index 23b77322da4..2cc410a10f4 100644
--- a/sys/arch/arm/xscale/pxa2x0_gpio.c
+++ b/sys/arch/arm/xscale/pxa2x0_gpio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_gpio.c,v 1.23 2014/05/08 21:17:00 miod Exp $ */
+/* $OpenBSD: pxa2x0_gpio.c,v 1.24 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: pxa2x0_gpio.c,v 1.2 2003/07/15 00:24:55 lukem Exp $ */
/*
@@ -330,7 +330,7 @@ pxa2x0_gpio_intr_disestablish(void *cookie)
#endif /* PXAGPIO_HAS_GPION_INTRS */
}
- free(gh, M_DEVBUF);
+ free(gh, M_DEVBUF, 0);
}
#ifdef PXAGPIO_HAS_GPION_INTRS
diff --git a/sys/arch/arm/xscale/pxa2x0_i2s.c b/sys/arch/arm/xscale/pxa2x0_i2s.c
index e4baef152fb..ccefc84081b 100644
--- a/sys/arch/arm/xscale/pxa2x0_i2s.c
+++ b/sys/arch/arm/xscale/pxa2x0_i2s.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_i2s.c,v 1.7 2006/04/04 11:45:40 pascoe Exp $ */
+/* $OpenBSD: pxa2x0_i2s.c,v 1.8 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2005 Christopher Pascoe <pascoe@openbsd.org>
@@ -225,7 +225,7 @@ fail_create:
fail_map:
bus_dmamem_free(sc->sc_dmat, &p->seg, 1);
fail_alloc:
- free(p, type);
+ free(p, type, 0);
return 0;
}
@@ -244,7 +244,7 @@ pxa2x0_i2s_freem(void *hdl, void *ptr, int type)
bus_dmamem_free(sc->sc_dmat, &p->seg, 1);
*pp = p->next;
- free(p, type);
+ free(p, type, 0);
return;
}
diff --git a/sys/arch/arm/xscale/pxa2x0_intr.c b/sys/arch/arm/xscale/pxa2x0_intr.c
index 633436b4c36..72d41a3f2b5 100644
--- a/sys/arch/arm/xscale/pxa2x0_intr.c
+++ b/sys/arch/arm/xscale/pxa2x0_intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_intr.c,v 1.25 2014/05/08 21:17:00 miod Exp $ */
+/* $OpenBSD: pxa2x0_intr.c,v 1.26 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: pxa2x0_intr.c,v 1.5 2003/07/15 00:24:55 lukem Exp $ */
/*
@@ -590,7 +590,7 @@ pxa2x0_intr_disestablish(void *cookie)
psw = disable_interrupts(I32_bit);
TAILQ_REMOVE(&handler[irqno].list, ih, ih_list);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
pxa2x0_update_intr_masks();
diff --git a/sys/arch/arm/xscale/pxa2x0_lcd.c b/sys/arch/arm/xscale/pxa2x0_lcd.c
index ab17e2b69f9..119782c61d3 100644
--- a/sys/arch/arm/xscale/pxa2x0_lcd.c
+++ b/sys/arch/arm/xscale/pxa2x0_lcd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_lcd.c,v 1.25 2013/10/21 10:36:09 miod Exp $ */
+/* $OpenBSD: pxa2x0_lcd.c,v 1.26 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: pxa2x0_lcd.c,v 1.8 2003/10/03 07:24:05 bsh Exp $ */
/*
@@ -703,7 +703,7 @@ pxa2x0_lcd_alloc_screen(void *v, const struct wsscreen_descr *_type,
error = pxa2x0_lcd_new_screen(sc, scr, type->depth);
if (error != 0) {
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
return (error);
}
@@ -751,7 +751,7 @@ pxa2x0_lcd_free_screen(void *v, void *cookie)
if (scr->nsegs > 0)
bus_dmamem_free(sc->dma_tag, scr->segs, scr->nsegs);
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
}
int
diff --git a/sys/arch/armv7/omap/intc.c b/sys/arch/armv7/omap/intc.c
index 82971096c82..8c662a70f05 100644
--- a/sys/arch/armv7/omap/intc.c
+++ b/sys/arch/armv7/omap/intc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intc.c,v 1.2 2013/11/06 19:03:07 syl Exp $ */
+/* $OpenBSD: intc.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
*
@@ -380,7 +380,7 @@ intc_intr_disestablish(void *cookie)
TAILQ_REMOVE(&intc_handler[irqno].iq_list, ih, ih_list);
if (ih->ih_name != NULL)
evcount_detach(&ih->ih_count);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
restore_interrupts(psw);
}
diff --git a/sys/arch/armv7/omap/omdisplay.c b/sys/arch/armv7/omap/omdisplay.c
index 1a6a31ed852..7fe18c08881 100644
--- a/sys/arch/armv7/omap/omdisplay.c
+++ b/sys/arch/armv7/omap/omdisplay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: omdisplay.c,v 1.4 2013/12/11 12:51:51 naddy Exp $ */
+/* $OpenBSD: omdisplay.c,v 1.5 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2007 Dale Rahn <drahn@openbsd.org>
*
@@ -1157,7 +1157,7 @@ omdisplay_alloc_screen(void *v, const struct wsscreen_descr *_type,
error = omdisplay_new_screen(sc, scr, type->depth);
if (error != 0) {
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
return (error);
}
@@ -1337,7 +1337,7 @@ omdisplay_free_screen(void *v, void *cookie)
if (scr->nsegs > 0)
bus_dmamem_free(sc->sc_dma_tag, scr->segs, scr->nsegs);
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
}
int
diff --git a/sys/arch/armv7/omap/omgpio.c b/sys/arch/armv7/omap/omgpio.c
index 54138a8d601..66c9f39fa36 100644
--- a/sys/arch/armv7/omap/omgpio.c
+++ b/sys/arch/armv7/omap/omgpio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: omgpio.c,v 1.3 2013/11/20 13:32:40 rapha Exp $ */
+/* $OpenBSD: omgpio.c,v 1.4 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
*
@@ -662,7 +662,7 @@ omgpio_intr_disestablish(struct omgpio_softc *sc, void *cookie)
evcount_detach(&ih->ih_count);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
omgpio_intr_level(gpio, IST_NONE);
omgpio_intr_mask(gpio);
diff --git a/sys/arch/armv7/sunxi/a1xintc.c b/sys/arch/armv7/sunxi/a1xintc.c
index 68176bd0e48..f46c42ad3f7 100644
--- a/sys/arch/armv7/sunxi/a1xintc.c
+++ b/sys/arch/armv7/sunxi/a1xintc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: a1xintc.c,v 1.3 2013/11/06 19:03:07 syl Exp $ */
+/* $OpenBSD: a1xintc.c,v 1.4 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
* Copyright (c) 2013 Artturi Alm
@@ -417,7 +417,7 @@ intc_intr_disestablish(void *cookie)
if (ih->ih_name != NULL)
evcount_detach(&ih->ih_count);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
er = bus_space_read_4(intc_iot, intc_ioh,
INTC_ENABLE_REG(IRQ2REG32(irq)));
diff --git a/sys/arch/aviion/aviion/bus_dma.c b/sys/arch/aviion/aviion/bus_dma.c
index 0c34ad25df4..baba8f82370 100644
--- a/sys/arch/aviion/aviion/bus_dma.c
+++ b/sys/arch/aviion/aviion/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.6 2014/07/11 09:36:26 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.7 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: bus_dma.c,v 1.2 2001/06/10 02:31:25 briggs Exp $ */
/*-
@@ -113,7 +113,7 @@ bus_dmamap_destroy(t, map)
bus_dmamap_t map;
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/aviion/aviion/disksubr.c b/sys/arch/aviion/aviion/disksubr.c
index bae953460af..d5f95c0b8b1 100644
--- a/sys/arch/aviion/aviion/disksubr.c
+++ b/sys/arch/aviion/aviion/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.58 2013/10/19 09:32:13 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.59 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
@@ -450,7 +450,7 @@ readvditlabel(struct buf *bp, void (*strat)(struct buf *), struct disklabel *lp,
}
done:
- free(vdit_storage, M_DEVBUF);
+ free(vdit_storage, M_DEVBUF, 0);
if (sbp != NULL) {
sbp->b_flags |= B_INVAL;
brelse(sbp);
diff --git a/sys/arch/aviion/dev/dma.c b/sys/arch/aviion/dev/dma.c
index eedb46875f1..0555d99c1d6 100644
--- a/sys/arch/aviion/dev/dma.c
+++ b/sys/arch/aviion/dev/dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dma.c,v 1.1 2013/10/23 10:07:14 miod Exp $ */
+/* $OpenBSD: dma.c,v 1.2 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
@@ -139,7 +139,7 @@ dma_intr(void *v)
if (req->cbdone != NULL)
(*req->cbdone)(req->cbarg);
- free(req, M_DEVBUF);
+ free(req, M_DEVBUF, 0);
} else {
req->mem += req->lastcnt;
}
diff --git a/sys/arch/aviion/dev/vme.c b/sys/arch/aviion/dev/vme.c
index a5ba2f1e9ba..51af775adbc 100644
--- a/sys/arch/aviion/dev/vme.c
+++ b/sys/arch/aviion/dev/vme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vme.c,v 1.13 2014/05/08 22:17:33 miod Exp $ */
+/* $OpenBSD: vme.c,v 1.14 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2006, 2007, 2010 Miodrag Vallat.
*
@@ -836,7 +836,7 @@ vmebus_get_bst(struct device *vsc, u_int aspace, u_int dspace,
void
vmebus_release_bst(struct device *vsc, bus_space_tag_t b)
{
- free((void *)b, M_DEVBUF);
+ free((void *)b, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/aviion/stand/a2coff/a2coff.c b/sys/arch/aviion/stand/a2coff/a2coff.c
index c1d8737a7ac..6a2a3095d05 100644
--- a/sys/arch/aviion/stand/a2coff/a2coff.c
+++ b/sys/arch/aviion/stand/a2coff/a2coff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: a2coff.c,v 1.11 2014/05/31 21:04:34 miod Exp $ */
+/* $OpenBSD: a2coff.c,v 1.12 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2006, 2013, Miodrag Vallat
*
@@ -324,7 +324,7 @@ convert_elf(const char *infile, int infd, int outfd, Elf_Ehdr *ehdr)
last = n;
}
- free(phdr);
+ free(phdr, 0);
/*
* Fill ``data'' section.
diff --git a/sys/arch/aviion/stand/boot/oaic.c b/sys/arch/aviion/stand/boot/oaic.c
index d3e50f42a14..e166c12e1df 100644
--- a/sys/arch/aviion/stand/boot/oaic.c
+++ b/sys/arch/aviion/stand/boot/oaic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: oaic.c,v 1.1 2013/10/16 16:59:34 miod Exp $ */
+/* $OpenBSD: oaic.c,v 1.2 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2010, 2013 Miodrag Vallat.
@@ -225,7 +225,7 @@ oaic_attach(uint32_t addr, int id, int lun)
void
oaic_detach(void *cookie)
{
- free(cookie, sizeof(struct aic6250_softc));
+ free(cookie, sizeof(struct aic6250_softc), 0);
}
/*
diff --git a/sys/arch/aviion/stand/boot/oosiop.c b/sys/arch/aviion/stand/boot/oosiop.c
index 415f773a7ca..0757704e068 100644
--- a/sys/arch/aviion/stand/boot/oosiop.c
+++ b/sys/arch/aviion/stand/boot/oosiop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: oosiop.c,v 1.4 2013/10/16 16:59:34 miod Exp $ */
+/* $OpenBSD: oosiop.c,v 1.5 2014/07/12 18:44:41 tedu Exp $ */
/* OpenBSD: oosiop.c,v 1.20 2013/10/09 18:22:06 miod Exp */
/* OpenBSD: oosiopvar.h,v 1.5 2011/04/03 12:42:36 krw Exp */
/* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */
@@ -214,8 +214,8 @@ oosiop_detach(void *cookie)
{
struct oosiop_softc *sc = cookie;
- free(sc->sc_scr, sizeof(oosiop_script));
- free(sc, sizeof *sc);
+ free(sc->sc_scr, sizeof(oosiop_script), 0);
+ free(sc, sizeof *sc, 0);
}
static __inline void
diff --git a/sys/arch/aviion/stand/boot/scsi.c b/sys/arch/aviion/stand/boot/scsi.c
index 72f8cd4bb52..bd00afef27e 100644
--- a/sys/arch/aviion/stand/boot/scsi.c
+++ b/sys/arch/aviion/stand/boot/scsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi.c,v 1.2 2013/10/16 16:59:34 miod Exp $ */
+/* $OpenBSD: scsi.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
@@ -93,7 +93,7 @@ scsi_initialize(const char *ctrlname, int ctrl, int unit, int lun, int part)
done:
if (priv->scsicookie == NULL) {
- free(priv, sizeof(struct scsi_private));
+ free(priv, sizeof(struct scsi_private), 0);
priv = NULL;
}
diff --git a/sys/arch/aviion/stand/boot/sd.c b/sys/arch/aviion/stand/boot/sd.c
index 4fe51f22513..2e01fae35d2 100644
--- a/sys/arch/aviion/stand/boot/sd.c
+++ b/sys/arch/aviion/stand/boot/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.5 2013/10/16 16:59:34 miod Exp $ */
+/* $OpenBSD: sd.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
@@ -92,7 +92,7 @@ sdclose(struct open_file *f)
priv = (struct scsi_private *)f->f_devdata;
if (priv->scsicookie != NULL)
(*priv->scsidetach)(priv->scsicookie);
- free(priv, sizeof(struct scsi_private));
+ free(priv, sizeof(struct scsi_private), 0);
f->f_devdata = NULL;
}
diff --git a/sys/arch/aviion/stand/vdmtool/vdmtool.c b/sys/arch/aviion/stand/vdmtool/vdmtool.c
index fb0c42ea2db..9a22b6136f8 100644
--- a/sys/arch/aviion/stand/vdmtool/vdmtool.c
+++ b/sys/arch/aviion/stand/vdmtool/vdmtool.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vdmtool.c,v 1.2 2013/10/01 22:24:53 jmc Exp $ */
+/* $OpenBSD: vdmtool.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
@@ -534,7 +534,7 @@ read_vdit(int fd, uint32_t secno, size_t *vditsize)
curbuf = append_vdit_portion(fd, secno, curbuf, sector,
first ? VDIT_BLOCK_HEAD_BE : VDIT_PORTION_HEADER_BLOCK);
if (curbuf == NULL) {
- free(buf);
+ free(buf, 0);
return NULL;
}
first = 0;
@@ -606,10 +606,10 @@ report(int fd)
}
if (memcmp(vdit, vdit2, vditsize) != 0)
printf("VDIT and backup VDIT differ!\n");
- free(vdit2);
+ free(vdit2, 0);
}
- free(vdit);
+ free(vdit, 0);
}
}
diff --git a/sys/arch/hppa/dev/apic.c b/sys/arch/hppa/dev/apic.c
index 0b88d7740f9..475517a2145 100644
--- a/sys/arch/hppa/dev/apic.c
+++ b/sys/arch/hppa/dev/apic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apic.c,v 1.14 2011/05/01 21:59:39 kettenis Exp $ */
+/* $OpenBSD: apic.c,v 1.15 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -171,13 +171,13 @@ apic_intr_establish(void *v, pci_intr_handle_t ih,
aiv = malloc(sizeof(struct apic_iv), M_DEVBUF, M_NOWAIT);
if (aiv == NULL) {
- free(cnt, M_DEVBUF);
+ free(cnt, M_DEVBUF, 0);
return NULL;
}
cnt = malloc(sizeof(struct evcount), M_DEVBUF, M_NOWAIT);
if (!cnt) {
- free(aiv, M_DEVBUF);
+ free(aiv, M_DEVBUF, 0);
return (NULL);
}
diff --git a/sys/arch/hppa/dev/astro.c b/sys/arch/hppa/dev/astro.c
index 802c7ae64b5..8628971f10a 100644
--- a/sys/arch/hppa/dev/astro.c
+++ b/sys/arch/hppa/dev/astro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: astro.c,v 1.14 2014/02/08 20:41:48 kettenis Exp $ */
+/* $OpenBSD: astro.c,v 1.15 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2007 Mark Kettenis
@@ -620,7 +620,7 @@ iommu_iomap_destroy(struct iommu_map_state *ims)
ims->ims_map.ipm_pagecnt);
#endif
- free(ims, M_DEVBUF);
+ free(ims, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/hppa/gsc/harmony.c b/sys/arch/hppa/gsc/harmony.c
index 30991f0a9ad..2146781d858 100644
--- a/sys/arch/hppa/gsc/harmony.c
+++ b/sys/arch/hppa/gsc/harmony.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: harmony.c,v 1.28 2013/05/15 08:29:23 ratchov Exp $ */
+/* $OpenBSD: harmony.c,v 1.29 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2003 Jason L. Wright (jason@thought.net)
@@ -996,7 +996,7 @@ fail3:
fail2:
bus_dmamap_destroy(sc->sc_dmat, d->d_map);
fail1:
- free(d, pool);
+ free(d, pool, 0);
fail:
return (NULL);
}
@@ -1014,7 +1014,7 @@ harmony_freem(void *vsc, void *ptr, int pool)
bus_dmamem_unmap(sc->sc_dmat, d->d_kva, d->d_size);
bus_dmamem_free(sc->sc_dmat, &d->d_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, d->d_map);
- free(d, pool);
+ free(d, pool, 0);
return;
}
printf("%s: free rogue pointer\n", sc->sc_dv.dv_xname);
diff --git a/sys/arch/hppa/hppa/intr.c b/sys/arch/hppa/hppa/intr.c
index e51588a7854..69724de7419 100644
--- a/sys/arch/hppa/hppa/intr.c
+++ b/sys/arch/hppa/hppa/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.43 2014/07/08 17:19:24 deraadt Exp $ */
+/* $OpenBSD: intr.c,v 1.44 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2002-2004 Michael Shalayeff
@@ -163,7 +163,7 @@ cpu_intr_map(void *v, int pri, int irq, int (*handler)(void *), void *arg,
iv = &ivb[irq];
if (iv->handler) {
if (!pv->share) {
- free(cnt, M_DEVBUF);
+ free(cnt, M_DEVBUF, 0);
return (NULL);
} else {
iv = pv->share;
@@ -224,10 +224,10 @@ cpu_intr_establish(int pri, int irq, int (*handler)(void *), void *arg,
intr_more += 2 * CPU_NINTS;
for (ev = iv->next + CPU_NINTS; ev < intr_more; ev++)
ev->share = iv->share, iv->share = ev;
- free(cnt, M_DEVBUF);
+ free(cnt, M_DEVBUF, 0);
iv->cnt = NULL;
} else if (name == NULL) {
- free(cnt, M_DEVBUF);
+ free(cnt, M_DEVBUF, 0);
iv->cnt = NULL;
} else
evcount_attach(cnt, name, NULL);
@@ -360,7 +360,7 @@ softintr_disestablish(void *cookie)
iv->handler = nv->handler;
iv->arg = nv->arg;
iv->next = nv->next;
- free(nv, M_DEVBUF);
+ free(nv, M_DEVBUF, 0);
return;
} else {
iv->handler = NULL;
@@ -372,7 +372,7 @@ softintr_disestablish(void *cookie)
for (iv = &intr_table[irq]; iv; iv = iv->next) {
if (iv->next == cookie) {
iv->next = iv->next->next;
- free(cookie, M_DEVBUF);
+ free(cookie, M_DEVBUF, 0);
return;
}
}
diff --git a/sys/arch/hppa/hppa/mainbus.c b/sys/arch/hppa/hppa/mainbus.c
index 1b56adf65c1..3fa43c00216 100644
--- a/sys/arch/hppa/hppa/mainbus.c
+++ b/sys/arch/hppa/hppa/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.84 2014/05/08 21:32:45 miod Exp $ */
+/* $OpenBSD: mainbus.c,v 1.85 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -760,7 +760,7 @@ mbus_dmamap_destroy(void *v, bus_dmamap_t map)
if (map->dm_mapsize != 0)
mbus_dmamap_unload(v, map);
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/hppa/stand/libsa/lf.c b/sys/arch/hppa/stand/libsa/lf.c
index fd70310c339..e70b005d80d 100644
--- a/sys/arch/hppa/stand/libsa/lf.c
+++ b/sys/arch/hppa/stand/libsa/lf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lf.c,v 1.8 2013/03/24 19:20:35 deraadt Exp $ */
+/* $OpenBSD: lf.c,v 1.9 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -47,7 +47,7 @@ lfopen(struct open_file *f, ...)
int
lfclose(struct open_file *f)
{
- free(f->f_devdata, sizeof(struct hppa_dev));
+ free(f->f_devdata, sizeof(struct hppa_dev), 0);
f->f_devdata = NULL;
return 0;
}
diff --git a/sys/arch/hppa64/dev/apic.c b/sys/arch/hppa64/dev/apic.c
index 5b37a2c9ec9..ea6ec4727cd 100644
--- a/sys/arch/hppa64/dev/apic.c
+++ b/sys/arch/hppa64/dev/apic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apic.c,v 1.6 2011/04/07 14:22:26 jsing Exp $ */
+/* $OpenBSD: apic.c,v 1.7 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -173,7 +173,7 @@ apic_intr_establish(void *v, pci_intr_handle_t ih,
aiv = malloc(sizeof(struct apic_iv), M_DEVBUF, M_NOWAIT);
if (aiv == NULL) {
- free(cnt, M_DEVBUF);
+ free(cnt, M_DEVBUF, 0);
return NULL;
}
@@ -186,7 +186,7 @@ apic_intr_establish(void *v, pci_intr_handle_t ih,
if (apic_intr_list[irq]) {
cnt = malloc(sizeof(struct evcount), M_DEVBUF, M_NOWAIT);
if (!cnt) {
- free(aiv, M_DEVBUF);
+ free(aiv, M_DEVBUF, 0);
return (NULL);
}
diff --git a/sys/arch/hppa64/dev/astro.c b/sys/arch/hppa64/dev/astro.c
index d6a5b4572c7..31eb75de2a9 100644
--- a/sys/arch/hppa64/dev/astro.c
+++ b/sys/arch/hppa64/dev/astro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: astro.c,v 1.5 2011/04/07 15:30:15 miod Exp $ */
+/* $OpenBSD: astro.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2007 Mark Kettenis
@@ -614,7 +614,7 @@ iommu_iomap_destroy(struct iommu_map_state *ims)
ims->ims_map.ipm_pagecnt);
#endif
- free(ims, M_DEVBUF);
+ free(ims, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/hppa64/hppa64/autoconf.c b/sys/arch/hppa64/hppa64/autoconf.c
index c48261783b5..57cb571e8ac 100644
--- a/sys/arch/hppa64/hppa64/autoconf.c
+++ b/sys/arch/hppa64/hppa64/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.17 2013/10/04 18:46:07 kettenis Exp $ */
+/* $OpenBSD: autoconf.c,v 1.18 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 1998-2005 Michael Shalayeff
@@ -387,13 +387,13 @@ printf("num %ld ", pdc_pat_io_num.num);
if ((err = pdc_call((iodcio_t)pdc, 0, PDC_PAT_IO,
PDC_PAT_IO_GET_PCI_RT, rt, cell))) {
printf("irt fetch error %d\n", err);
- free(rt, M_DEVBUF);
+ free(rt, M_DEVBUF, 0);
return (NULL);
}
} else if ((err = pdc_call((iodcio_t)pdc, 0, PDC_PCI_INDEX,
PDC_PCI_GET_INT_TBL, &pdc_pat_io_num, cpu_gethpa(0), pdc_rt))) {
printf("irt fetch error %d\n", err);
- free(rt, M_DEVBUF);
+ free(rt, M_DEVBUF, 0);
return (NULL);
}
bcopy(pdc_rt, rt, num * sizeof(*rt));
diff --git a/sys/arch/hppa64/hppa64/intr.c b/sys/arch/hppa64/hppa64/intr.c
index 75601ac783e..6d318983c43 100644
--- a/sys/arch/hppa64/hppa64/intr.c
+++ b/sys/arch/hppa64/hppa64/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.9 2014/07/08 17:19:24 deraadt Exp $ */
+/* $OpenBSD: intr.c,v 1.10 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2002-2004 Michael Shalayeff
@@ -132,7 +132,7 @@ cpu_intr_map(void *v, int pri, int irq, int (*handler)(void *), void *arg,
iv = &ivb[irq];
if (iv->handler) {
if (!pv->share) {
- free(cnt, M_DEVBUF);
+ free(cnt, M_DEVBUF, 0);
return (NULL);
} else {
iv = pv->share;
@@ -308,7 +308,7 @@ softintr_disestablish(void *cookie)
iv->handler = nv->handler;
iv->arg = nv->arg;
iv->next = nv->next;
- free(nv, M_DEVBUF);
+ free(nv, M_DEVBUF, 0);
return;
} else {
iv->handler = NULL;
@@ -320,7 +320,7 @@ softintr_disestablish(void *cookie)
for (iv = &intr_table[irq]; iv; iv = iv->next) {
if (iv->next == cookie) {
iv->next = iv->next->next;
- free(cookie, M_DEVBUF);
+ free(cookie, M_DEVBUF, 0);
return;
}
}
diff --git a/sys/arch/hppa64/hppa64/mainbus.c b/sys/arch/hppa64/hppa64/mainbus.c
index c2261ad8a4a..e0995ff262c 100644
--- a/sys/arch/hppa64/hppa64/mainbus.c
+++ b/sys/arch/hppa64/hppa64/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.14 2014/04/08 09:34:23 mpi Exp $ */
+/* $OpenBSD: mainbus.c,v 1.15 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -334,7 +334,7 @@ mbus_dmamap_destroy(void *v, bus_dmamap_t map)
if (map->dm_mapsize != 0)
mbus_dmamap_unload(v, map);
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/hppa64/stand/libsa/lf.c b/sys/arch/hppa64/stand/libsa/lf.c
index 514adcd89aa..39050d9d1bf 100644
--- a/sys/arch/hppa64/stand/libsa/lf.c
+++ b/sys/arch/hppa64/stand/libsa/lf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lf.c,v 1.2 2013/03/24 19:20:35 deraadt Exp $ */
+/* $OpenBSD: lf.c,v 1.3 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -38,7 +38,7 @@ lfopen(struct open_file *f, ...)
int
lfclose(struct open_file *f)
{
- free(f->f_devdata, sizeof(struct hppa_dev));
+ free(f->f_devdata, sizeof(struct hppa_dev), 0);
f->f_devdata = NULL;
return 0;
}
diff --git a/sys/arch/i386/i386/bus_dma.c b/sys/arch/i386/i386/bus_dma.c
index dcd22886699..1358197cd6b 100644
--- a/sys/arch/i386/i386/bus_dma.c
+++ b/sys/arch/i386/i386/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.31 2014/07/11 14:41:00 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.32 2014/07/12 18:44:41 tedu Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -132,7 +132,7 @@ void
_bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/i386/i386/esm.c b/sys/arch/i386/i386/esm.c
index bd34976ff04..5ca135acd25 100644
--- a/sys/arch/i386/i386/esm.c
+++ b/sys/arch/i386/i386/esm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: esm.c,v 1.54 2013/07/04 16:55:18 sf Exp $ */
+/* $OpenBSD: esm.c,v 1.55 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -875,7 +875,7 @@ esm_make_sensors(struct esm_softc *sc, struct esm_devmap *devmap,
s = malloc(sizeof(struct ksensor) * nsensors, M_DEVBUF,
M_NOWAIT|M_ZERO);
if (s == NULL) {
- free(es, M_DEVBUF);
+ free(es, M_DEVBUF, 0);
return;
}
@@ -893,7 +893,7 @@ esm_make_sensors(struct esm_softc *sc, struct esm_devmap *devmap,
s = malloc(sizeof(struct ksensor) * nsensors, M_DEVBUF,
M_NOWAIT|M_ZERO);
if (s == NULL) {
- free(es, M_DEVBUF);
+ free(es, M_DEVBUF, 0);
return;
}
@@ -909,7 +909,7 @@ esm_make_sensors(struct esm_softc *sc, struct esm_devmap *devmap,
case ESM_S_VOLTS:
case ESM_S_VOLTSx10:
if (esm_thresholds(sc, devmap, es) != 0) {
- free(es, M_DEVBUF);
+ free(es, M_DEVBUF, 0);
continue;
}
/* FALLTHROUGH */
@@ -919,7 +919,7 @@ esm_make_sensors(struct esm_softc *sc, struct esm_devmap *devmap,
s = malloc(sizeof(struct ksensor), M_DEVBUF,
M_NOWAIT|M_ZERO);
if (s == NULL) {
- free(es, M_DEVBUF);
+ free(es, M_DEVBUF, 0);
return;
}
diff --git a/sys/arch/i386/i386/est.c b/sys/arch/i386/i386/est.c
index 8321bdafce3..3e738556bfa 100644
--- a/sys/arch/i386/i386/est.c
+++ b/sys/arch/i386/i386/est.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: est.c,v 1.42 2014/05/23 03:30:41 guenther Exp $ */
+/* $OpenBSD: est.c,v 1.43 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2003 Michael Eriksson.
* All rights reserved.
@@ -998,7 +998,7 @@ est_acpi_init()
return acpilist;
notable:
- free(acpilist, M_DEVBUF);
+ free(acpilist, M_DEVBUF, 0);
acpilist = NULL;
nolist:
return NULL;
@@ -1026,7 +1026,7 @@ est_acpi_pss_changed(struct acpicpu_pss *pss, int npss)
M_DEVBUF, M_NOWAIT)) == NULL) {
printf("est_acpi_pss_changed: cannot allocate memory for new "
"operating points");
- free(acpilist, M_DEVBUF);
+ free(acpilist, M_DEVBUF, 0);
return;
}
@@ -1037,8 +1037,8 @@ est_acpi_pss_changed(struct acpicpu_pss *pss, int npss)
needtran = 0;
}
- free(est_fqlist->table, M_DEVBUF);
- free(est_fqlist, M_DEVBUF);
+ free(est_fqlist->table, M_DEVBUF, 0);
+ free(est_fqlist, M_DEVBUF, 0);
est_fqlist = acpilist;
if (needtran) {
@@ -1142,7 +1142,7 @@ est_init(struct cpu_info *ci, int vendor)
if ((fake_table = malloc(sizeof(struct est_op) * 3, M_DEVBUF,
M_NOWAIT)) == NULL) {
- free(fake_fqlist, M_DEVBUF);
+ free(fake_fqlist, M_DEVBUF, 0);
printf("%s: EST: cannot allocate memory for fake "
"table\n", cpu_device);
return;
@@ -1206,8 +1206,8 @@ nospeedstep:
* While est_fqlist can point into the static est_cpus[],
* it can't fail in that case and therefore can't reach here.
*/
- free(est_fqlist->table, M_DEVBUF);
- free(est_fqlist, M_DEVBUF);
+ free(est_fqlist->table, M_DEVBUF, 0);
+ free(est_fqlist, M_DEVBUF, 0);
}
void
diff --git a/sys/arch/i386/i386/ioapic.c b/sys/arch/i386/i386/ioapic.c
index 415668023e3..ab58bbf2319 100644
--- a/sys/arch/i386/i386/ioapic.c
+++ b/sys/arch/i386/i386/ioapic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ioapic.c,v 1.30 2013/10/01 20:22:11 sf Exp $ */
+/* $OpenBSD: ioapic.c,v 1.31 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: ioapic.c,v 1.7 2003/07/14 22:32:40 lukem Exp $ */
/*-
@@ -709,7 +709,7 @@ apic_intr_establish(int irq, int type, int level, int (*ih_fun)(void *),
/*printf("%s: intr_establish: can't share %s with %s, irq %d\n",
ih_what, isa_intr_typename(pin->ip_type),
isa_intr_typename(type), intr);*/
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
return (NULL);
}
break;
@@ -823,7 +823,7 @@ apic_intr_disestablish(void *arg)
apic_vectorset(sc, intr, minlevel, maxlevel);
evcount_detach(&ih->ih_count);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
}
void
diff --git a/sys/arch/i386/i386/k1x-pstate.c b/sys/arch/i386/i386/k1x-pstate.c
index 25d88d57866..15761d62f32 100644
--- a/sys/arch/i386/i386/k1x-pstate.c
+++ b/sys/arch/i386/i386/k1x-pstate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: k1x-pstate.c,v 1.5 2013/10/05 18:47:05 brynet Exp $ */
+/* $OpenBSD: k1x-pstate.c,v 1.6 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2011 Bryan Steele <brynet@gmail.com>
*
@@ -200,5 +200,5 @@ k1x_init(struct cpu_info *ci)
setperf_prio = 1;
return;
}
- free(cstate, M_DEVBUF);
+ free(cstate, M_DEVBUF, 0);
}
diff --git a/sys/arch/i386/i386/mem.c b/sys/arch/i386/i386/mem.c
index 50071b9a624..92acaf355bb 100644
--- a/sys/arch/i386/i386/mem.c
+++ b/sys/arch/i386/i386/mem.c
@@ -1,5 +1,5 @@
/* $NetBSD: mem.c,v 1.31 1996/05/03 19:42:19 christos Exp $ */
-/* $OpenBSD: mem.c,v 1.38 2013/12/19 21:30:02 deraadt Exp $ */
+/* $OpenBSD: mem.c,v 1.39 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1982, 1986, 1990, 1993
@@ -296,7 +296,7 @@ mem_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
if (!error)
error = copyout(md, mo->mo_desc,
nd * sizeof(struct mem_range_desc));
- free(md, M_MEMDESC);
+ free(md, M_MEMDESC, 0);
} else {
nd = mem_range_softc.mr_ndesc;
}
@@ -310,7 +310,7 @@ mem_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
md->mr_owner[sizeof(md->mr_owner) - 1] = 0;
if (error == 0)
error = mem_range_attr_set(md, &mo->mo_arg[0]);
- free(md, M_MEMDESC);
+ free(md, M_MEMDESC, 0);
break;
}
return (error);
diff --git a/sys/arch/i386/i386/powernow-k7.c b/sys/arch/i386/i386/powernow-k7.c
index 27553f75516..3a5fac5b7f7 100644
--- a/sys/arch/i386/i386/powernow-k7.c
+++ b/sys/arch/i386/i386/powernow-k7.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: powernow-k7.c,v 1.34 2010/04/20 22:05:41 tedu Exp $ */
+/* $OpenBSD: powernow-k7.c,v 1.35 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2004 Martin Végiard.
@@ -448,5 +448,5 @@ k7_powernow_init(void)
setperf_prio = 1;
return;
}
- free(cstate, M_DEVBUF);
+ free(cstate, M_DEVBUF, 0);
}
diff --git a/sys/arch/i386/i386/powernow-k8.c b/sys/arch/i386/i386/powernow-k8.c
index 7e74d013cfe..80f6061a5e4 100644
--- a/sys/arch/i386/i386/powernow-k8.c
+++ b/sys/arch/i386/i386/powernow-k8.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: powernow-k8.c,v 1.26 2010/04/20 22:05:41 tedu Exp $ */
+/* $OpenBSD: powernow-k8.c,v 1.27 2014/07/12 18:44:41 tedu Exp $ */
/*
* Copyright (c) 2004 Martin Végiard.
@@ -512,5 +512,5 @@ k8_powernow_init(void)
setperf_prio = 1;
return;
}
- free(cstate, M_DEVBUF);
+ free(cstate, M_DEVBUF, 0);
}
diff --git a/sys/arch/i386/i386/softintr.c b/sys/arch/i386/i386/softintr.c
index 1c2f9dde53d..778af9ca918 100644
--- a/sys/arch/i386/i386/softintr.c
+++ b/sys/arch/i386/i386/softintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softintr.c,v 1.4 2009/04/19 19:13:57 oga Exp $ */
+/* $OpenBSD: softintr.c,v 1.5 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: softintr.c,v 1.1 2003/02/26 21:26:12 fvdl Exp $ */
/*-
@@ -157,5 +157,5 @@ softintr_disestablish(void *arg)
}
mtx_leave(&si->softintr_lock);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
diff --git a/sys/arch/i386/i386/sys_machdep.c b/sys/arch/i386/i386/sys_machdep.c
index eae9c71c6c6..ef4f33dd64e 100644
--- a/sys/arch/i386/i386/sys_machdep.c
+++ b/sys/arch/i386/i386/sys_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sys_machdep.c,v 1.31 2011/11/07 15:41:33 guenther Exp $ */
+/* $OpenBSD: sys_machdep.c,v 1.32 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: sys_machdep.c,v 1.28 1996/05/03 19:42:29 christos Exp $ */
/*-
@@ -126,7 +126,7 @@ i386_get_ldt(struct proc *p, void *args, register_t *retval)
if (ua.start > nldt) {
simple_unlock(&pmap->pm_lock);
- free(cp, M_TEMP);
+ free(cp, M_TEMP, 0);
return (EINVAL);
}
@@ -147,7 +147,7 @@ i386_get_ldt(struct proc *p, void *args, register_t *retval)
if (error == 0)
*retval = num;
- free(cp, M_TEMP);
+ free(cp, M_TEMP, 0);
return (error);
}
@@ -319,7 +319,7 @@ copy:
*retval = ua.start;
out:
- free(descv, M_TEMP);
+ free(descv, M_TEMP, 0);
return (error);
}
#endif /* USER_LDT */
diff --git a/sys/arch/i386/i386/via.c b/sys/arch/i386/i386/via.c
index 86e9bce1019..82d44216281 100644
--- a/sys/arch/i386/i386/via.c
+++ b/sys/arch/i386/i386/via.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: via.c,v 1.31 2014/03/29 18:09:29 guenther Exp $ */
+/* $OpenBSD: via.c,v 1.32 2014/07/12 18:44:41 tedu Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -120,7 +120,7 @@ viac3_crypto_setup(void)
vc3_sc->sc_cid = crypto_get_driverid(0);
if (vc3_sc->sc_cid < 0) {
- free(vc3_sc, M_DEVBUF);
+ free(vc3_sc, M_DEVBUF, 0);
return; /* YYY bitch? */
}
@@ -164,7 +164,7 @@ viac3_crypto_newsession(u_int32_t *sidp, struct cryptoini *cri)
return (ENOMEM);
bcopy(sc->sc_sessions, ses, sesn * sizeof(*ses));
explicit_bzero(sc->sc_sessions, sesn * sizeof(*ses));
- free(sc->sc_sessions, M_DEVBUF);
+ free(sc->sc_sessions, M_DEVBUF, 0);
sc->sc_sessions = ses;
ses = &sc->sc_sessions[sesn];
sc->sc_nsessions++;
@@ -304,13 +304,13 @@ viac3_crypto_freesession(u_int64_t tid)
if (swd->sw_ictx) {
explicit_bzero(swd->sw_ictx, axf->ctxsize);
- free(swd->sw_ictx, M_CRYPTO_DATA);
+ free(swd->sw_ictx, M_CRYPTO_DATA, 0);
}
if (swd->sw_octx) {
explicit_bzero(swd->sw_octx, axf->ctxsize);
- free(swd->sw_octx, M_CRYPTO_DATA);
+ free(swd->sw_octx, M_CRYPTO_DATA, 0);
}
- free(swd, M_CRYPTO_DATA);
+ free(swd, M_CRYPTO_DATA, 0);
}
explicit_bzero(&sc->sc_sessions[sesn], sizeof(sc->sc_sessions[sesn]));
@@ -431,7 +431,7 @@ viac3_crypto_encdec(struct cryptop *crp, struct cryptodesc *crd,
if (sc->op_buf != NULL) {
explicit_bzero(sc->op_buf, crd->crd_len);
- free(sc->op_buf, M_DEVBUF);
+ free(sc->op_buf, M_DEVBUF, 0);
sc->op_buf = NULL;
}
diff --git a/sys/arch/i386/isa/isa_machdep.c b/sys/arch/i386/isa/isa_machdep.c
index 7bf26bb9daa..debed933940 100644
--- a/sys/arch/i386/isa/isa_machdep.c
+++ b/sys/arch/i386/isa/isa_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isa_machdep.c,v 1.75 2013/07/14 18:22:08 kettenis Exp $ */
+/* $OpenBSD: isa_machdep.c,v 1.76 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: isa_machdep.c,v 1.22 1997/06/12 23:57:32 thorpej Exp $ */
/*-
@@ -513,7 +513,7 @@ isa_intr_establish(isa_chipset_tag_t ic, int irq, int type, int level,
if (!LEGAL_IRQ(irq) || type == IST_NONE) {
printf("%s: isa_intr_establish: bogus irq or type\n", ih_what);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
return (NULL);
}
switch (intrtype[irq]) {
@@ -531,7 +531,7 @@ isa_intr_establish(isa_chipset_tag_t ic, int irq, int type, int level,
/*printf("%s: intr_establish: can't share %s with %s, irq %d\n",
ih_what, isa_intr_typename(intrtype[irq]),
isa_intr_typename(type), irq);*/
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
return (NULL);
}
break;
@@ -601,7 +601,7 @@ isa_intr_disestablish(isa_chipset_tag_t ic, void *arg)
else
panic("intr_disestablish: handler not registered");
evcount_detach(&ih->ih_count);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
intr_calculatemasks();
@@ -725,7 +725,7 @@ _isa_bus_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,
out:
if (error) {
if (map->_dm_cookie != NULL)
- free(map->_dm_cookie, M_DEVBUF);
+ free(map->_dm_cookie, M_DEVBUF, 0);
_bus_dmamap_destroy(t, map);
}
return (error);
@@ -745,7 +745,7 @@ _isa_bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
if (cookie->id_flags & ID_HAS_BOUNCE)
_isa_dma_free_bouncebuf(t, map);
- free(cookie, M_DEVBUF);
+ free(cookie, M_DEVBUF, 0);
_bus_dmamap_destroy(t, map);
}
diff --git a/sys/arch/i386/pci/agp_machdep.c b/sys/arch/i386/pci/agp_machdep.c
index 64bb3b1a95c..5af66c3131a 100644
--- a/sys/arch/i386/pci/agp_machdep.c
+++ b/sys/arch/i386/pci/agp_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: agp_machdep.c,v 1.17 2014/04/01 09:05:03 mpi Exp $ */
+/* $OpenBSD: agp_machdep.c,v 1.18 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2008 - 2009 Owain G. Ainsworth <oga@openbsd.org>
@@ -144,7 +144,7 @@ agp_destroy_map(struct agp_map *map)
if (extent_free(ex, map->addr, map->size,
EX_NOWAIT | EX_MALLOCOK ))
printf("agp_destroy_map: can't free region\n");
- free(map, M_AGP);
+ free(map, M_AGP, 0);
}
diff --git a/sys/arch/i386/pci/glxsb.c b/sys/arch/i386/pci/glxsb.c
index 2f4225f06a8..d7cf94a622d 100644
--- a/sys/arch/i386/pci/glxsb.c
+++ b/sys/arch/i386/pci/glxsb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: glxsb.c,v 1.27 2013/10/29 21:44:50 mikeb Exp $ */
+/* $OpenBSD: glxsb.c,v 1.28 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2006 Tom Cosgrove <tom@openbsd.org>
@@ -383,7 +383,7 @@ glxsb_crypto_newsession(uint32_t *sidp, struct cryptoini *cri)
if (sesn != 0) {
bcopy(sc->sc_sessions, ses, sesn * sizeof(*ses));
explicit_bzero(sc->sc_sessions, sesn * sizeof(*ses));
- free(sc->sc_sessions, M_DEVBUF);
+ free(sc->sc_sessions, M_DEVBUF, 0);
}
sc->sc_sessions = ses;
ses = &sc->sc_sessions[sesn];
@@ -525,22 +525,22 @@ glxsb_crypto_freesession(uint64_t tid)
if (swd->sw_kschedule) {
explicit_bzero(swd->sw_kschedule, txf->ctxsize);
- free(swd->sw_kschedule, M_CRYPTO_DATA);
+ free(swd->sw_kschedule, M_CRYPTO_DATA, 0);
}
- free(swd, M_CRYPTO_DATA);
+ free(swd, M_CRYPTO_DATA, 0);
}
if ((swd = sc->sc_sessions[sesn].ses_swd_auth)) {
axf = swd->sw_axf;
if (swd->sw_ictx) {
explicit_bzero(swd->sw_ictx, axf->ctxsize);
- free(swd->sw_ictx, M_CRYPTO_DATA);
+ free(swd->sw_ictx, M_CRYPTO_DATA, 0);
}
if (swd->sw_octx) {
explicit_bzero(swd->sw_octx, axf->ctxsize);
- free(swd->sw_octx, M_CRYPTO_DATA);
+ free(swd->sw_octx, M_CRYPTO_DATA, 0);
}
- free(swd, M_CRYPTO_DATA);
+ free(swd, M_CRYPTO_DATA, 0);
}
explicit_bzero(&sc->sc_sessions[sesn], sizeof(sc->sc_sessions[sesn]));
return (0);
diff --git a/sys/arch/i386/pci/pci_machdep.c b/sys/arch/i386/pci/pci_machdep.c
index cc3a24f1000..cf0a5f607ea 100644
--- a/sys/arch/i386/pci/pci_machdep.c
+++ b/sys/arch/i386/pci/pci_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_machdep.c,v 1.78 2014/04/19 11:53:42 kettenis Exp $ */
+/* $OpenBSD: pci_machdep.c,v 1.79 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: pci_machdep.c,v 1.28 1997/06/06 23:29:17 thorpej Exp $ */
/*-
@@ -867,7 +867,7 @@ pci_intr_disestablish(pci_chipset_tag_t pc, void *cookie)
idt_vec_free(ih->ih_vec);
evcount_detach(&ih->ih_count);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
return;
}
diff --git a/sys/arch/i386/pci/pcibios.c b/sys/arch/i386/pci/pcibios.c
index d76416427fe..ddf28cd2b4d 100644
--- a/sys/arch/i386/pci/pcibios.c
+++ b/sys/arch/i386/pci/pcibios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcibios.c,v 1.44 2014/03/29 18:09:29 guenther Exp $ */
+/* $OpenBSD: pcibios.c,v 1.45 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: pcibios.c,v 1.5 2000/08/01 05:23:59 uch Exp $ */
/*
@@ -319,7 +319,7 @@ pcibios_pir_init(struct pcibios_softc *sc)
&pcibios_pir_header.exclusive_irq) != PCIBIOS_SUCCESS) {
printf("%s: PCI IRQ Routing information unavailable.\n",
sc->sc_dev.dv_xname);
- free(pcibios_pir_table, M_DEVBUF);
+ free(pcibios_pir_table, M_DEVBUF, 0);
pcibios_pir_table = NULL;
pcibios_pir_table_nentries = 0;
return NULL;
diff --git a/sys/arch/i386/pci/piix.c b/sys/arch/i386/pci/piix.c
index f9cde0e2312..206e3891b96 100644
--- a/sys/arch/i386/pci/piix.c
+++ b/sys/arch/i386/pci/piix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: piix.c,v 1.9 2008/06/26 05:42:11 ray Exp $ */
+/* $OpenBSD: piix.c,v 1.10 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: piix.c,v 1.1 1999/11/17 01:21:20 thorpej Exp $ */
/*-
@@ -113,7 +113,7 @@ piix_init(pci_chipset_tag_t pc, bus_space_tag_t iot, pcitag_t tag,
if (bus_space_map(iot, PIIX_REG_ELCR, PIIX_REG_ELCR_SIZE, 0,
&ph->ph_elcr_ioh) != 0) {
- free(ph, M_DEVBUF);
+ free(ph, M_DEVBUF, 0);
return (1);
}
diff --git a/sys/arch/i386/pci/rccosb4.c b/sys/arch/i386/pci/rccosb4.c
index 160b4772a2a..dc1f0446372 100644
--- a/sys/arch/i386/pci/rccosb4.c
+++ b/sys/arch/i386/pci/rccosb4.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rccosb4.c,v 1.4 2005/11/23 09:24:57 mickey Exp $ */
+/* $OpenBSD: rccosb4.c,v 1.5 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2004,2005 Michael Shalayeff
@@ -79,12 +79,12 @@ osb4_init(pci_chipset_tag_t pc, bus_space_tag_t iot, pcitag_t tag,
ph->piix.ph_tag = tag;
if (bus_space_map(iot, OSB4_PIAIR, 2, 0, &ph->osb4_ioh)) {
- free(ph, M_DEVBUF);
+ free(ph, M_DEVBUF, 0);
return (1);
}
if (bus_space_map(iot, OSB4_REG_ELCR, 2, 0, &ph->piix.ph_elcr_ioh)) {
- free(ph, M_DEVBUF);
+ free(ph, M_DEVBUF, 0);
return (1);
}
diff --git a/sys/arch/i386/pci/vga_post.c b/sys/arch/i386/pci/vga_post.c
index e3d69139328..223de1f7f30 100644
--- a/sys/arch/i386/pci/vga_post.c
+++ b/sys/arch/i386/pci/vga_post.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vga_post.c,v 1.6 2014/04/08 09:02:51 mpi Exp $ */
+/* $OpenBSD: vga_post.c,v 1.7 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: vga_post.c,v 1.12 2009/03/15 21:32:36 cegger Exp $ */
/*-
@@ -142,7 +142,7 @@ vga_post_init(int bus, int device, int function)
&sc->ram_backing, BASE_MEMORY/PAGE_SIZE, UVM_PLA_WAITOK);
if (err) {
uvm_km_free(kernel_map, sc->sys_image, 1024 * 1024);
- free(sc, M_DEVBUF);
+ free(sc, M_DEVBUF, 0);
return NULL;
}
@@ -213,7 +213,7 @@ vga_post_free(struct vga_post *sc)
uvm_km_free(kernel_map, sc->sys_image, 1024 * 1024);
pmap_update(pmap_kernel());
- free(sc, M_DEVBUF);
+ free(sc, M_DEVBUF, 0);
}
#ifdef DDB
diff --git a/sys/arch/i386/stand/libsa/diskprobe.c b/sys/arch/i386/stand/libsa/diskprobe.c
index 6a50c9298d8..08760fba81f 100644
--- a/sys/arch/i386/stand/libsa/diskprobe.c
+++ b/sys/arch/i386/stand/libsa/diskprobe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diskprobe.c,v 1.37 2013/11/05 15:17:56 krw Exp $ */
+/* $OpenBSD: diskprobe.c,v 1.38 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -79,7 +79,7 @@ floppyprobe(void)
if (debug)
printf(" <!fd%u>", i);
#endif
- free(dip, 0);
+ free(dip, 0, 0);
break;
}
@@ -122,7 +122,7 @@ hardprobe(void)
if (debug)
printf(" <!hd%u>", i&0x7f);
#endif
- free(dip, 0);
+ free(dip, 0, 0);
break;
}
@@ -234,7 +234,7 @@ cdprobe(void)
#if 0
if (bios_getdiskinfo(cddev, &dip->bios_info)) {
printf(" <!cd0>"); /* XXX */
- free(dip, 0);
+ free(dip, 0, 0);
return;
}
#endif
diff --git a/sys/arch/i386/stand/libsa/softraid.c b/sys/arch/i386/stand/libsa/softraid.c
index 5c7f9b3104e..f887187bf01 100644
--- a/sys/arch/i386/stand/libsa/softraid.c
+++ b/sys/arch/i386/stand/libsa/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.6 2013/12/28 02:40:41 jsing Exp $ */
+/* $OpenBSD: softraid.c,v 1.7 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2012 Joel Sing <jsing@openbsd.org>
@@ -315,7 +315,7 @@ srprobe(void)
}
explicit_bzero(md, SR_META_SIZE * 512);
- free(md, 0);
+ free(md, 0, 0);
}
int
@@ -477,18 +477,18 @@ sr_clear_keys(void)
continue;
if (bv->sbv_keys != NULL) {
explicit_bzero(bv->sbv_keys, SR_CRYPTO_KEYBLOCK_BYTES);
- free(bv->sbv_keys, 0);
+ free(bv->sbv_keys, 0, 0);
bv->sbv_keys = NULL;
}
if (bv->sbv_maskkey != NULL) {
explicit_bzero(bv->sbv_maskkey, SR_CRYPTO_MAXKEYBYTES);
- free(bv->sbv_maskkey, 0);
+ free(bv->sbv_maskkey, 0, 0);
bv->sbv_maskkey = NULL;
}
}
SLIST_FOREACH(kd, &sr_keydisks, kd_link) {
explicit_bzero(kd, sizeof(*kd));
- free(kd, 0);
+ free(kd, 0, 0);
}
}
@@ -618,7 +618,7 @@ done:
if (keys != NULL && rv != 0) {
explicit_bzero(keys, SR_CRYPTO_KEYBLOCK_BYTES);
- free(keys, 0);
+ free(keys, 0, 0);
}
return (rv);
diff --git a/sys/arch/landisk/landisk/bus_dma.c b/sys/arch/landisk/landisk/bus_dma.c
index fe4c516a500..172a2fc40b2 100644
--- a/sys/arch/landisk/landisk/bus_dma.c
+++ b/sys/arch/landisk/landisk/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.10 2014/07/11 09:36:26 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.11 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: bus_dma.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/*
@@ -126,7 +126,7 @@ _bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
DPRINTF(("bus_dmamap_destroy: t = %p, map = %p\n", t, map));
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
static inline int
diff --git a/sys/arch/landisk/landisk/intr.c b/sys/arch/landisk/landisk/intr.c
index 7e73e7c3c2f..5c2d34e46c5 100644
--- a/sys/arch/landisk/landisk/intr.c
+++ b/sys/arch/landisk/landisk/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.8 2014/03/29 18:09:29 guenther Exp $ */
+/* $OpenBSD: intr.c,v 1.9 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: intr.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/*-
@@ -237,7 +237,7 @@ extintr_disestablish(void *aux)
evcount_detach(&ih->ih_count);
#endif
- free((void *)ih, M_DEVBUF);
+ free((void *)ih, M_DEVBUF, 0);
if (--eih->eih_nih == 0) {
intc_intr_disestablish(eih->eih_func);
diff --git a/sys/arch/loongson/dev/bonito.c b/sys/arch/loongson/dev/bonito.c
index 08793435314..b4b390b33dd 100644
--- a/sys/arch/loongson/dev/bonito.c
+++ b/sys/arch/loongson/dev/bonito.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bonito.c,v 1.26 2014/05/24 21:11:01 miod Exp $ */
+/* $OpenBSD: bonito.c,v 1.27 2014/07/12 18:44:42 tedu 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 $ */
@@ -468,7 +468,7 @@ bonito_intr_disestablish(void *vih)
splx(s);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
}
/*
@@ -1204,7 +1204,7 @@ bonito_get_resource_extent(pci_chipset_tag_t pc, int io)
out:
if (exname != NULL)
- free(exname, M_DEVBUF);
+ free(exname, M_DEVBUF, 0);
return ex;
}
diff --git a/sys/arch/loongson/loongson/bus_dma.c b/sys/arch/loongson/loongson/bus_dma.c
index f547becd9c3..e497a9d7dd6 100644
--- a/sys/arch/loongson/loongson/bus_dma.c
+++ b/sys/arch/loongson/loongson/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.14 2014/07/11 09:36:26 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.15 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -117,7 +117,7 @@ _dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,
void
_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/loongson/stand/boot/dev.c b/sys/arch/loongson/stand/boot/dev.c
index d112228de84..1d92808e753 100644
--- a/sys/arch/loongson/stand/boot/dev.c
+++ b/sys/arch/loongson/stand/boot/dev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev.c,v 1.5 2013/06/11 16:42:09 deraadt Exp $ */
+/* $OpenBSD: dev.c,v 1.6 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
@@ -160,7 +160,7 @@ pmon_ioclose(struct open_file *f)
if (f->f_devdata != NULL) {
pi = (struct pmon_iodata *)f->f_devdata;
rc = pmon_close(pi->fd);
- free(pi, sizeof *pi);
+ free(pi, sizeof *pi, 0);
f->f_devdata = NULL;
} else
rc = 0;
diff --git a/sys/arch/luna88k/stand/boot/sd.c b/sys/arch/luna88k/stand/boot/sd.c
index 1656638ae66..097188e7306 100644
--- a/sys/arch/luna88k/stand/boot/sd.c
+++ b/sys/arch/luna88k/stand/boot/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.3 2013/10/29 21:49:07 miod Exp $ */
+/* $OpenBSD: sd.c,v 1.4 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: sd.c,v 1.5 2013/01/22 15:48:40 tsutsui Exp $ */
/*
@@ -281,7 +281,7 @@ sdclose(struct open_file *f)
{
struct sd_softc *sc = f->f_devdata;
- free(sc, sizeof *sc);
+ free(sc, sizeof *sc, 0);
f->f_devdata = NULL;
return 0;
diff --git a/sys/arch/m88k/m88k/softintr.c b/sys/arch/m88k/m88k/softintr.c
index 0ba6e61916f..c8e6ba3abb1 100644
--- a/sys/arch/m88k/m88k/softintr.c
+++ b/sys/arch/m88k/m88k/softintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softintr.c,v 1.3 2014/07/08 17:42:50 miod Exp $ */
+/* $OpenBSD: softintr.c,v 1.4 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */
/*
@@ -147,7 +147,7 @@ softintr_disestablish(void *arg)
}
mtx_leave(&siq->siq_mtx);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/macppc/dev/awacs.c b/sys/arch/macppc/dev/awacs.c
index cb8e625033c..17b63e6e691 100644
--- a/sys/arch/macppc/dev/awacs.c
+++ b/sys/arch/macppc/dev/awacs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: awacs.c,v 1.28 2013/05/15 08:29:23 ratchov Exp $ */
+/* $OpenBSD: awacs.c,v 1.29 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: awacs.c,v 1.4 2001/02/26 21:07:51 wiz Exp $ */
/*-
@@ -975,7 +975,7 @@ awacs_allocm(void *h, int dir, size_t size, int type, int flags)
1, &p->nsegs, flags)) != 0) {
printf("%s: unable to allocate dma, error = %d\n",
sc->sc_dev.dv_xname, error);
- free(p, type);
+ free(p, type, 0);
return NULL;
}
@@ -984,7 +984,7 @@ awacs_allocm(void *h, int dir, size_t size, int type, int flags)
printf("%s: unable to map dma, error = %d\n",
sc->sc_dev.dv_xname, error);
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
- free(p, type);
+ free(p, type, 0);
return NULL;
}
@@ -994,7 +994,7 @@ awacs_allocm(void *h, int dir, size_t size, int type, int flags)
sc->sc_dev.dv_xname, error);
bus_dmamem_unmap(sc->sc_dmat, p->addr, size);
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
- free(p, type);
+ free(p, type, 0);
return NULL;
}
@@ -1005,7 +1005,7 @@ awacs_allocm(void *h, int dir, size_t size, int type, int flags)
bus_dmamap_destroy(sc->sc_dmat, p->map);
bus_dmamem_unmap(sc->sc_dmat, p->addr, size);
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
- free(p, type);
+ free(p, type, 0);
return NULL;
}
diff --git a/sys/arch/macppc/dev/dbdma.c b/sys/arch/macppc/dev/dbdma.c
index 904d4049a58..e47b2d0bbb7 100644
--- a/sys/arch/macppc/dev/dbdma.c
+++ b/sys/arch/macppc/dev/dbdma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dbdma.c,v 1.9 2007/09/17 01:33:33 krw Exp $ */
+/* $OpenBSD: dbdma.c,v 1.10 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: dbdma.c,v 1.2 1998/08/21 16:13:28 tsubai Exp $ */
/*
@@ -153,5 +153,5 @@ dbdma_free(dbdma_t dt)
bus_dmamem_unmap(dt->d_dmat, (caddr_t)dt->d_addr, dt->d_size);
if (dt->d_nsegs)
bus_dmamem_free(dt->d_dmat, dt->d_segs, dt->d_nsegs);
- free(dt, M_DEVBUF);
+ free(dt, M_DEVBUF, 0);
}
diff --git a/sys/arch/macppc/dev/i2s.c b/sys/arch/macppc/dev/i2s.c
index 5f21a986a1c..59442042879 100644
--- a/sys/arch/macppc/dev/i2s.c
+++ b/sys/arch/macppc/dev/i2s.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i2s.c,v 1.23 2013/05/15 08:29:23 ratchov Exp $ */
+/* $OpenBSD: i2s.c,v 1.24 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: i2s.c,v 1.1 2003/12/27 02:19:34 grant Exp $ */
/*-
@@ -1177,7 +1177,7 @@ i2s_allocm(void *h, int dir, size_t size, int type, int flags)
1, &p->nsegs, flags)) != 0) {
printf("%s: unable to allocate dma, error = %d\n",
sc->sc_dev.dv_xname, error);
- free(p, type);
+ free(p, type, 0);
return NULL;
}
@@ -1186,7 +1186,7 @@ i2s_allocm(void *h, int dir, size_t size, int type, int flags)
printf("%s: unable to map dma, error = %d\n",
sc->sc_dev.dv_xname, error);
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
- free(p, type);
+ free(p, type, 0);
return NULL;
}
@@ -1196,7 +1196,7 @@ i2s_allocm(void *h, int dir, size_t size, int type, int flags)
sc->sc_dev.dv_xname, error);
bus_dmamem_unmap(sc->sc_dmat, p->addr, size);
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
- free(p, type);
+ free(p, type, 0);
return NULL;
}
@@ -1207,7 +1207,7 @@ i2s_allocm(void *h, int dir, size_t size, int type, int flags)
bus_dmamap_destroy(sc->sc_dmat, p->map);
bus_dmamem_unmap(sc->sc_dmat, p->addr, size);
bus_dmamem_free(sc->sc_dmat, p->segs, p->nsegs);
- free(p, type);
+ free(p, type, 0);
return NULL;
}
diff --git a/sys/arch/macppc/dev/macintr.c b/sys/arch/macppc/dev/macintr.c
index 1e8b3048aa9..8e716c235c3 100644
--- a/sys/arch/macppc/dev/macintr.c
+++ b/sys/arch/macppc/dev/macintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macintr.c,v 1.46 2014/04/01 20:27:14 mpi Exp $ */
+/* $OpenBSD: macintr.c,v 1.47 2014/07/12 18:44:42 tedu Exp $ */
/*-
* Copyright (c) 2008 Dale Rahn <drahn@openbsd.org>
@@ -361,7 +361,7 @@ macintr_disestablish(void *lcp, void *arg)
ppc_intr_enable(s);
evcount_detach(&ih->ih_count);
- free((void *)ih, M_DEVBUF);
+ free((void *)ih, M_DEVBUF, 0);
if (TAILQ_EMPTY(&iq->iq_list))
iq->iq_ist = IST_NONE;
diff --git a/sys/arch/macppc/dev/openpic.c b/sys/arch/macppc/dev/openpic.c
index e2a4b01ae92..7167c801a53 100644
--- a/sys/arch/macppc/dev/openpic.c
+++ b/sys/arch/macppc/dev/openpic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openpic.c,v 1.71 2014/04/01 20:27:14 mpi Exp $ */
+/* $OpenBSD: openpic.c,v 1.72 2014/07/12 18:44:42 tedu Exp $ */
/*-
* Copyright (c) 2008 Dale Rahn <drahn@openbsd.org>
@@ -379,7 +379,7 @@ openpic_intr_disestablish(void *lcp, void *arg)
ppc_intr_enable(s);
evcount_detach(&ih->ih_count);
- free((void *)ih, M_DEVBUF);
+ free((void *)ih, M_DEVBUF, 0);
if (TAILQ_EMPTY(&iq->iq_list))
iq->iq_ist = IST_NONE;
diff --git a/sys/arch/macppc/macppc/dma.c b/sys/arch/macppc/macppc/dma.c
index 07860292f2b..0c61b43fcec 100644
--- a/sys/arch/macppc/macppc/dma.c
+++ b/sys/arch/macppc/macppc/dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dma.c,v 1.39 2014/07/11 09:36:26 mpi Exp $ */
+/* $OpenBSD: dma.c,v 1.40 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -103,7 +103,7 @@ void
_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
diff --git a/sys/arch/macppc/macppc/mainbus.c b/sys/arch/macppc/macppc/mainbus.c
index f6441e8ad3e..1494ae0f062 100644
--- a/sys/arch/macppc/macppc/mainbus.c
+++ b/sys/arch/macppc/macppc/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.22 2014/07/02 15:34:43 tobiasu Exp $ */
+/* $OpenBSD: mainbus.c,v 1.23 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -90,7 +90,7 @@ mbattach(struct device *parent, struct device *self, void *aux)
slen = strlen(t) + strlen(name) - 3;
if ((hw_prod = malloc(slen, M_DEVBUF, M_NOWAIT)) != NULL) {
snprintf(hw_prod, slen, "%s %s", t, name + 5);
- free(t, M_DEVBUF);
+ free(t, M_DEVBUF, 0);
}
} else {
/* New World Macintosh or Unknown */
diff --git a/sys/arch/macppc/macppc/mem.c b/sys/arch/macppc/macppc/mem.c
index 6d1d68a0784..f9a80edba21 100644
--- a/sys/arch/macppc/macppc/mem.c
+++ b/sys/arch/macppc/macppc/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.17 2011/11/10 17:30:32 krw Exp $ */
+/* $OpenBSD: mem.c,v 1.18 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: mem.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */
/*
@@ -152,7 +152,7 @@ mem_attach(struct device *parent, struct device *self, void *aux)
}
/* No need to keep the "dimm-info" contents around. */
- free(sc->sc_buf, M_DEVBUF);
+ free(sc->sc_buf, M_DEVBUF, 0);
sc->sc_len = -1;
}
}
diff --git a/sys/arch/macppc/macppc/openprom.c b/sys/arch/macppc/macppc/openprom.c
index 01918683e85..e661733e39c 100644
--- a/sys/arch/macppc/macppc/openprom.c
+++ b/sys/arch/macppc/macppc/openprom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openprom.c,v 1.2 2011/06/17 07:06:46 mk Exp $ */
+/* $OpenBSD: openprom.c,v 1.3 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: openprom.c,v 1.4 2002/01/10 06:21:53 briggs Exp $ */
/*
@@ -256,9 +256,9 @@ openpromioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
}
if (name)
- free(name, M_TEMP);
+ free(name, M_TEMP, 0);
if (value)
- free(value, M_TEMP);
+ free(value, M_TEMP, 0);
return (error);
}
diff --git a/sys/arch/mips64/mips64/softintr.c b/sys/arch/mips64/mips64/softintr.c
index 414b95d6a71..fc0e9ec97e7 100644
--- a/sys/arch/mips64/mips64/softintr.c
+++ b/sys/arch/mips64/mips64/softintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softintr.c,v 1.16 2014/07/08 17:19:25 deraadt Exp $ */
+/* $OpenBSD: softintr.c,v 1.17 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */
/*
@@ -153,7 +153,7 @@ softintr_disestablish(void *arg)
}
mtx_leave(&siq->siq_mtx);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/octeon/dev/octcf.c b/sys/arch/octeon/dev/octcf.c
index 02646c483fa..4f7b75ed621 100644
--- a/sys/arch/octeon/dev/octcf.c
+++ b/sys/arch/octeon/dev/octcf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: octcf.c,v 1.14 2014/05/10 22:25:16 jasper Exp $ */
+/* $OpenBSD: octcf.c,v 1.15 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */
/*
@@ -599,7 +599,7 @@ octcfioctl(dev_t dev, u_long xfer, caddr_t addr, int flag, struct proc *p)
lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
octcfgetdisklabel(dev, wd, lp, 0);
bcopy(lp, wd->sc_dk.dk_label, sizeof(*lp));
- free(lp, M_TEMP);
+ free(lp, M_TEMP, 0);
goto exit;
case DIOCGPDINFO:
@@ -851,7 +851,7 @@ octcf_get_params(struct octcf_softc *wd, struct ataparams *prms)
if (error != 0) {
printf("%s: identify failed: %d\n", __func__, error);
- free(tb, M_DEVBUF);
+ free(tb, M_DEVBUF, 0);
return CMD_ERR;
} else {
#if BYTE_ORDER == BIG_ENDIAN
@@ -882,7 +882,7 @@ octcf_get_params(struct octcf_softc *wd, struct ataparams *prms)
prms->atap_model[1] == 'E') ||
(prms->atap_model[0] == 'F' &&
prms->atap_model[1] == 'X'))) {
- free(tb, M_DEVBUF);
+ free(tb, M_DEVBUF, 0);
return CMD_OK;
}
for (i = 0; i < sizeof(prms->atap_model); i += 2) {
@@ -898,7 +898,7 @@ octcf_get_params(struct octcf_softc *wd, struct ataparams *prms)
*p = swap16(*p);
}
- free(tb, M_DEVBUF);
+ free(tb, M_DEVBUF, 0);
return CMD_OK;
}
}
diff --git a/sys/arch/octeon/dev/octeon_pcibus.c b/sys/arch/octeon/dev/octeon_pcibus.c
index 1fe8f1051b8..1ca37cb1651 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.14 2014/05/11 09:23:49 jasper Exp $ */
+/* $OpenBSD: octeon_pcibus.c,v 1.15 2014/07/12 18:44:42 tedu 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 $ */
@@ -504,7 +504,7 @@ octeon_pcibus_get_resource_extent(pci_chipset_tag_t pc, int io)
out:
if (exname != NULL)
- free(exname, M_DEVBUF);
+ free(exname, M_DEVBUF, 0);
return ex;
}
diff --git a/sys/arch/octeon/octeon/bus_dma.c b/sys/arch/octeon/octeon/bus_dma.c
index d8fdd75c82b..c5de3063c8b 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.11 2014/07/11 09:36:26 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.12 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -117,7 +117,7 @@ _dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,
void
_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/powerpc/powerpc/softintr.c b/sys/arch/powerpc/powerpc/softintr.c
index 1880d4672a6..f018a1b120a 100644
--- a/sys/arch/powerpc/powerpc/softintr.c
+++ b/sys/arch/powerpc/powerpc/softintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softintr.c,v 1.5 2014/07/03 07:02:10 matthieu Exp $ */
+/* $OpenBSD: softintr.c,v 1.6 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */
/*
@@ -154,7 +154,7 @@ softintr_disestablish(void *arg)
}
mtx_leave(&siq->siq_mtx);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/sgi/dev/impact.c b/sys/arch/sgi/dev/impact.c
index 58b0ffb73bf..633f85888d8 100644
--- a/sys/arch/sgi/dev/impact.c
+++ b/sys/arch/sgi/dev/impact.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: impact.c,v 1.5 2013/10/21 10:36:16 miod Exp $ */
+/* $OpenBSD: impact.c,v 1.6 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2010, 2012 Miodrag Vallat.
@@ -168,7 +168,7 @@ impact_attach_common(struct impact_softc *sc, bus_space_tag_t iot,
impact_setup(scr, has_hq4);
if (impact_init_screen(scr) != 0) {
printf("failed to allocate memory\n");
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
return ENOMEM;
}
}
diff --git a/sys/arch/sgi/dev/spdmem_mainbus.c b/sys/arch/sgi/dev/spdmem_mainbus.c
index 079e24a3cfb..8b6de372241 100644
--- a/sys/arch/sgi/dev/spdmem_mainbus.c
+++ b/sys/arch/sgi/dev/spdmem_mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spdmem_mainbus.c,v 1.1 2010/03/22 21:22:08 miod Exp $ */
+/* $OpenBSD: spdmem_mainbus.c,v 1.2 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
@@ -66,7 +66,7 @@ spdmem_mainbus_match(struct device *parent, void *vcf, void *aux)
rc = l1_get_brick_spd_record(saa->maa.maa_nasid, saa->dimm,
&spd, &spdlen);
if (rc == 0) {
- free(spd, M_DEVBUF);
+ free(spd, M_DEVBUF, 0);
return 1;
} else
return 0;
@@ -92,7 +92,7 @@ spdmem_mainbus_attach(struct device *parent, struct device *self, void *aux)
spdmem_attach_common(&sc->sc_base);
/* free record, as it won't be accessed anymore */
sc->sc_spdlen = 0;
- free(sc->sc_spd, M_DEVBUF);
+ free(sc->sc_spd, M_DEVBUF, 0);
}
uint8_t
diff --git a/sys/arch/sgi/gio/grtwo.c b/sys/arch/sgi/gio/grtwo.c
index a11c58c0730..4727dd1f6af 100644
--- a/sys/arch/sgi/gio/grtwo.c
+++ b/sys/arch/sgi/gio/grtwo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grtwo.c,v 1.9 2014/03/29 13:01:31 miod Exp $ */
+/* $OpenBSD: grtwo.c,v 1.10 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: grtwo.c,v 1.11 2009/11/22 19:09:15 mbalmer Exp $ */
/*
@@ -411,11 +411,11 @@ grtwo_attach(struct device *parent, struct device *self, void *aux)
goto out;
if (grtwo_attach_common(dc, ga) != 0) {
printf("\n%s: not responding\n", self->dv_xname);
- free(dc, M_DEVBUF);
+ free(dc, M_DEVBUF, 0);
return;
}
if (grtwo_init_screen(dc, M_WAITOK | M_CANFAIL) != 0) {
- free(dc, M_DEVBUF);
+ free(dc, M_DEVBUF, 0);
goto out;
}
#endif
diff --git a/sys/arch/sgi/gio/newport.c b/sys/arch/sgi/gio/newport.c
index ec39ce09223..4e9b5504f3a 100644
--- a/sys/arch/sgi/gio/newport.c
+++ b/sys/arch/sgi/gio/newport.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newport.c,v 1.8 2013/10/21 10:36:17 miod Exp $ */
+/* $OpenBSD: newport.c,v 1.9 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: newport.c,v 1.15 2009/05/12 23:51:25 macallan Exp $ */
/*
@@ -554,7 +554,7 @@ newport_attach(struct device *parent, struct device *self, void *aux)
if (fail) {
printf("%s: failed to initialize screen\n", self->dv_xname);
- free(dc, M_DEVBUF);
+ free(dc, M_DEVBUF, 0);
return;
}
diff --git a/sys/arch/sgi/sgi/bus_dma.c b/sys/arch/sgi/sgi/bus_dma.c
index 915d529ddf7..a6cf5ed7c62 100644
--- a/sys/arch/sgi/sgi/bus_dma.c
+++ b/sys/arch/sgi/sgi/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.35 2014/07/11 09:36:26 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.36 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -120,7 +120,7 @@ _dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,
void
_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/sgi/sgi/eisa_machdep.c b/sys/arch/sgi/sgi/eisa_machdep.c
index 4da23e87680..01ede04030d 100644
--- a/sys/arch/sgi/sgi/eisa_machdep.c
+++ b/sys/arch/sgi/sgi/eisa_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eisa_machdep.c,v 1.2 2012/04/15 20:44:52 miod Exp $ */
+/* $OpenBSD: eisa_machdep.c,v 1.3 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2012 Miodrag Vallat.
@@ -183,7 +183,7 @@ eisa_intr_disestablish(eisa_chipset_tag_t ec, void *cookie)
}
evcount_detach(&eih->ei_evcnt);
- free(eih, M_DEVBUF);
+ free(eih, M_DEVBUF, 0);
}
int
diff --git a/sys/arch/sgi/sgi/ip27_machdep.c b/sys/arch/sgi/sgi/ip27_machdep.c
index a35ded7e2ff..4e4a5da76d2 100644
--- a/sys/arch/sgi/sgi/ip27_machdep.c
+++ b/sys/arch/sgi/sgi/ip27_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip27_machdep.c,v 1.60 2014/07/12 14:12:44 uebayasi Exp $ */
+/* $OpenBSD: ip27_machdep.c,v 1.61 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2008, 2009 Miodrag Vallat.
@@ -784,7 +784,7 @@ ip27_hub_intr_disestablish(int intrbit)
splx(s);
if (ISSET(ih->ih_flags, IH_ALLOCATED))
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
}
void
diff --git a/sys/arch/sgi/sgi/l1.c b/sys/arch/sgi/sgi/l1.c
index 71bd0ac5937..79749bebf89 100644
--- a/sys/arch/sgi/sgi/l1.c
+++ b/sys/arch/sgi/sgi/l1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: l1.c,v 1.7 2011/03/12 23:43:19 miod Exp $ */
+/* $OpenBSD: l1.c,v 1.8 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
@@ -771,7 +771,7 @@ l1_read_board_ia(int16_t nasid, int type, u_char **ria, size_t *rialen)
fail:
if (ia != NULL)
- free(ia, M_DEVBUF);
+ free(ia, M_DEVBUF, 0);
return rc;
}
@@ -914,7 +914,7 @@ l1_get_brick_ethernet_address(int16_t nasid, uint8_t *enaddr)
enaddr_aton(hexaddr, enaddr);
out:
- free(ia, M_DEVBUF);
+ free(ia, M_DEVBUF, 0);
return rc;
}
@@ -1188,6 +1188,6 @@ l1_get_brick_spd_record(int16_t nasid, int dimm, u_char **rspd, size_t *rspdlen)
fail:
if (spd != NULL)
- free(spd, M_DEVBUF);
+ free(spd, M_DEVBUF, 0);
return rc;
}
diff --git a/sys/arch/sgi/stand/boot/diskio.c b/sys/arch/sgi/stand/boot/diskio.c
index 5768439a799..63b76cc35ea 100644
--- a/sys/arch/sgi/stand/boot/diskio.c
+++ b/sys/arch/sgi/stand/boot/diskio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diskio.c,v 1.7 2012/03/19 17:38:31 miod Exp $ */
+/* $OpenBSD: diskio.c,v 1.8 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2000 Opsycon AB (www.opsycon.se)
@@ -125,7 +125,7 @@ int
dioclose(struct open_file *f)
{
Bios_Close(((struct dio_softc *)f->f_devdata)->sc_fd);
- free(f->f_devdata, sizeof(struct dio_softc));
+ free(f->f_devdata, sizeof(struct dio_softc), 0);
f->f_devdata = NULL;
return (0);
}
diff --git a/sys/arch/sgi/stand/sgivol/sgivol.c b/sys/arch/sgi/stand/sgivol/sgivol.c
index 5fa2e18b401..fa054a3c324 100644
--- a/sys/arch/sgi/stand/sgivol/sgivol.c
+++ b/sys/arch/sgi/stand/sgivol/sgivol.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sgivol.c,v 1.21 2013/11/13 07:16:18 deraadt Exp $ */
+/* $OpenBSD: sgivol.c,v 1.22 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: sgivol.c,v 1.8 2003/11/08 04:59:00 sekiya Exp $ */
/*-
@@ -432,7 +432,7 @@ write_file(void)
i -= fsize;
}
fclose(fp);
- free(fbuf);
+ free(fbuf, 0);
}
void
diff --git a/sys/arch/sgi/xbow/xbridge.c b/sys/arch/sgi/xbow/xbridge.c
index a662b600e56..b55e28daffa 100644
--- a/sys/arch/sgi/xbow/xbridge.c
+++ b/sys/arch/sgi/xbow/xbridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xbridge.c,v 1.89 2014/05/19 21:18:42 miod Exp $ */
+/* $OpenBSD: xbridge.c,v 1.90 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2008, 2009, 2011 Miodrag Vallat.
@@ -641,16 +641,16 @@ xbpci_attach(struct device *parent, struct device *self, void *aux)
return;
fail2:
- free(xb->xb_dmat, M_DEVBUF);
+ free(xb->xb_dmat, M_DEVBUF, 0);
fail1:
if (xb->xb_io_bus_space_sw != NULL)
- free(xb->xb_io_bus_space_sw, M_DEVBUF);
+ free(xb->xb_io_bus_space_sw, M_DEVBUF, 0);
if (xb->xb_io_bus_space != NULL)
- free(xb->xb_io_bus_space, M_DEVBUF);
+ free(xb->xb_io_bus_space, M_DEVBUF, 0);
if (xb->xb_mem_bus_space_sw != NULL)
- free(xb->xb_mem_bus_space_sw, M_DEVBUF);
+ free(xb->xb_mem_bus_space_sw, M_DEVBUF, 0);
if (xb->xb_mem_bus_space != NULL)
- free(xb->xb_mem_bus_space, M_DEVBUF);
+ free(xb->xb_mem_bus_space, M_DEVBUF, 0);
if (errmsg == NULL)
errmsg = "not enough memory to build bus access structures";
printf("%s\n", errmsg);
@@ -1090,7 +1090,7 @@ xbridge_intr_establish(void *cookie, pci_intr_handle_t ih, int level,
LIST_INIT(&xi->xi_handlers);
if (xbow_intr_register(xb->xb_widget, level, &intrsrc) != 0) {
- free(xi, M_DEVBUF);
+ free(xi, M_DEVBUF, 0);
return NULL;
}
@@ -1198,7 +1198,7 @@ xbridge_intr_disestablish(void *cookie, void *vih)
*/
}
- free(xih, M_DEVBUF);
+ free(xih, M_DEVBUF, 0);
}
int
diff --git a/sys/arch/sgi/xbow/xheart.c b/sys/arch/sgi/xbow/xheart.c
index 65caa7ef1e2..75d18ebcd27 100644
--- a/sys/arch/sgi/xbow/xheart.c
+++ b/sys/arch/sgi/xbow/xheart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xheart.c,v 1.25 2012/10/03 11:18:23 miod Exp $ */
+/* $OpenBSD: xheart.c,v 1.26 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2008 Miodrag Vallat.
@@ -374,7 +374,7 @@ xheart_intr_disestablish(int intrbit)
splx(s);
if (ISSET(ih->ih_flags, IH_ALLOCATED))
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
}
void
diff --git a/sys/arch/sh/sh/interrupt.c b/sys/arch/sh/sh/interrupt.c
index d2d6f7b247d..47274455cc9 100644
--- a/sys/arch/sh/sh/interrupt.c
+++ b/sys/arch/sh/sh/interrupt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interrupt.c,v 1.13 2012/09/08 22:01:25 miod Exp $ */
+/* $OpenBSD: interrupt.c,v 1.14 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: interrupt.c,v 1.18 2006/01/25 00:02:57 uwe Exp $ */
/*-
@@ -654,7 +654,7 @@ softintr_disestablish(void *arg)
}
mtx_leave(&asi->softintr_lock);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
/* Schedule a software interrupt. */
diff --git a/sys/arch/socppc/dev/if_tsec.c b/sys/arch/socppc/dev/if_tsec.c
index 2f3cb628d34..b9053b73c2e 100644
--- a/sys/arch/socppc/dev/if_tsec.c
+++ b/sys/arch/socppc/dev/if_tsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tsec.c,v 1.30 2014/07/08 05:35:18 dlg Exp $ */
+/* $OpenBSD: if_tsec.c,v 1.31 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
@@ -1077,7 +1077,7 @@ tsec_down(struct tsec_softc *sc)
}
tsec_dmamem_free(sc, sc->sc_rxring);
- free(sc->sc_rxbuf, M_DEVBUF);
+ free(sc->sc_rxbuf, M_DEVBUF, 0);
}
void
@@ -1258,7 +1258,7 @@ free:
destroy:
bus_dmamap_destroy(sc->sc_dmat, tdm->tdm_map);
tdmfree:
- free(tdm, M_DEVBUF);
+ free(tdm, M_DEVBUF, 0);
return (NULL);
}
@@ -1269,7 +1269,7 @@ tsec_dmamem_free(struct tsec_softc *sc, struct tsec_dmamem *tdm)
bus_dmamem_unmap(sc->sc_dmat, tdm->tdm_kva, tdm->tdm_size);
bus_dmamem_free(sc->sc_dmat, &tdm->tdm_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, tdm->tdm_map);
- free(tdm, M_DEVBUF);
+ free(tdm, M_DEVBUF, 0);
}
struct mbuf *
diff --git a/sys/arch/socppc/socppc/dma.c b/sys/arch/socppc/socppc/dma.c
index 5bb208fa451..b19139179b1 100644
--- a/sys/arch/socppc/socppc/dma.c
+++ b/sys/arch/socppc/socppc/dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dma.c,v 1.11 2014/07/11 09:36:26 mpi Exp $ */
+/* $OpenBSD: dma.c,v 1.12 2014/07/12 18:44:42 tedu Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -103,7 +103,7 @@ void
_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
diff --git a/sys/arch/solbourne/solbourne/machdep.c b/sys/arch/solbourne/solbourne/machdep.c
index 1527085847a..893768e4541 100644
--- a/sys/arch/solbourne/solbourne/machdep.c
+++ b/sys/arch/solbourne/solbourne/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.38 2014/07/11 22:28:05 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.39 2014/07/12 18:44:42 tedu Exp $ */
/* OpenBSD: machdep.c,v 1.105 2005/04/11 15:13:01 deraadt Exp */
/*
@@ -254,7 +254,7 @@ setregs(p, pack, stack, retval)
savefpstate(fs);
cpuinfo.fpproc = NULL;
}
- free((void *)fs, M_SUBPROC);
+ free((void *)fs, M_SUBPROC, 0);
p->p_md.md_fpstate = NULL;
}
bzero((caddr_t)tf, sizeof *tf);
diff --git a/sys/arch/sparc/dev/cs4231.c b/sys/arch/sparc/dev/cs4231.c
index 046e626684a..0f5ab7d281a 100644
--- a/sys/arch/sparc/dev/cs4231.c
+++ b/sys/arch/sparc/dev/cs4231.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cs4231.c,v 1.31 2013/05/15 21:19:45 ratchov Exp $ */
+/* $OpenBSD: cs4231.c,v 1.32 2014/07/12 18:44:42 tedu Exp $ */
/*
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
@@ -1461,7 +1461,7 @@ cs4231_alloc(addr, direction, size, pool, flags)
p->addr_dva = dvma_malloc(size, &p->addr, flags);
if (p->addr_dva == NULL) {
- free(p, pool);
+ free(p, pool, 0);
return (NULL);
}
@@ -1485,7 +1485,7 @@ cs4231_free(addr, ptr, pool)
continue;
dvma_free(p->addr_dva, p->size, &p->addr);
*pp = p->next;
- free(p, pool);
+ free(p, pool, 0);
return;
}
printf("%s: attempt to free rogue pointer\n", sc->sc_dev.dv_xname);
diff --git a/sys/arch/sparc/dev/fd.c b/sys/arch/sparc/dev/fd.c
index 2112db9059b..f47931cb127 100644
--- a/sys/arch/sparc/dev/fd.c
+++ b/sys/arch/sparc/dev/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.89 2013/11/26 15:42:43 martin Exp $ */
+/* $OpenBSD: fd.c,v 1.90 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: fd.c,v 1.51 1997/05/24 20:16:19 pk Exp $ */
/*-
@@ -1766,7 +1766,7 @@ fdioctl(dev, cmd, addr, flag, p)
lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
fdgetdisklabel(dev, fd, lp, 0);
bcopy(lp, fd->sc_dk.dk_label, sizeof(*lp));
- free(lp, M_TEMP);
+ free(lp, M_TEMP, 0);
return 0;
case DIOCGPDINFO:
@@ -1938,7 +1938,7 @@ fdformat(dev, finfo, p)
/* ...and wait for it to complete */
rv = biowait(bp);
- free(bp, M_TEMP);
+ free(bp, M_TEMP, 0);
return (rv);
}
diff --git a/sys/arch/sparc/dev/magma.c b/sys/arch/sparc/dev/magma.c
index 50be93a3f9b..dd09f1b8a0e 100644
--- a/sys/arch/sparc/dev/magma.c
+++ b/sys/arch/sparc/dev/magma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: magma.c,v 1.27 2010/07/02 17:27:01 nicm Exp $ */
+/* $OpenBSD: magma.c,v 1.28 2014/07/12 18:44:43 tedu Exp $ */
/*-
* Copyright (c) 1998 Iain Hibbert
@@ -1754,7 +1754,7 @@ again: /* goto bad */
uio->uio_resid += (len - cnt);
}
- free(buffer, M_DEVBUF);
+ free(buffer, M_DEVBUF, 0);
return (error);
}
diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c
index 4ba613d5750..5a6b80a7c0d 100644
--- a/sys/arch/sparc/sparc/autoconf.c
+++ b/sys/arch/sparc/sparc/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.94 2014/05/09 20:15:06 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.95 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: autoconf.c,v 1.73 1997/07/29 09:41:53 fair Exp $ */
/*
@@ -1039,7 +1039,7 @@ romprop(rp, cp, node)
rp->ra_intr[n].int_vec = 0;
};
len *= sizeof(struct rom_intr);
- free(interrupts, M_TEMP);
+ free(interrupts, M_TEMP, 0);
} else
len = 0;
}
diff --git a/sys/arch/sparc/sparc/clock.c b/sys/arch/sparc/sparc/clock.c
index bf596958c5a..befc549d698 100644
--- a/sys/arch/sparc/sparc/clock.c
+++ b/sys/arch/sparc/sparc/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.28 2013/07/05 20:30:56 guenther Exp $ */
+/* $OpenBSD: clock.c,v 1.29 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: clock.c,v 1.52 1997/05/24 20:16:05 pk Exp $ */
/*
@@ -1126,7 +1126,7 @@ eeprom_uio(uio)
out:
if (buf)
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
eeprom_give();
return (error);
#else /* ! SUN4 */
diff --git a/sys/arch/sparc/sparc/intr.c b/sys/arch/sparc/sparc/intr.c
index 934b3db70dc..d06cdc9d71b 100644
--- a/sys/arch/sparc/sparc/intr.c
+++ b/sys/arch/sparc/sparc/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.38 2012/11/05 13:20:16 miod Exp $ */
+/* $OpenBSD: intr.c,v 1.39 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: intr.c,v 1.20 1997/07/29 09:42:03 fair Exp $ */
/*
@@ -416,7 +416,7 @@ softintr_disestablish(void *arg)
struct sintrhand *sih = (struct sintrhand *)arg;
ih_remove(&sintrhand[sih->sih_ipl], &sih->sih_ih);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
void *
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index 25df437a34b..75103fc5206 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.160 2014/07/11 22:28:06 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.161 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
@@ -264,7 +264,7 @@ setregs(p, pack, stack, retval)
savefpstate(fs);
cpuinfo.fpproc = NULL;
}
- free((void *)fs, M_SUBPROC);
+ free((void *)fs, M_SUBPROC, 0);
p->p_md.md_fpstate = NULL;
}
bzero((caddr_t)tf, sizeof *tf);
@@ -969,7 +969,7 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,
void
_bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
{
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
@@ -1083,7 +1083,7 @@ _bus_dmamem_free(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs)
* Return the list of pages back to the VM system.
*/
uvm_pglistfree(segs[0]._ds_mlist);
- free(segs[0]._ds_mlist, M_DEVBUF);
+ free(segs[0]._ds_mlist, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/sparc/sparc/openprom.c b/sys/arch/sparc/sparc/openprom.c
index 1aa16d4ce30..7f55c20303d 100644
--- a/sys/arch/sparc/sparc/openprom.c
+++ b/sys/arch/sparc/sparc/openprom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openprom.c,v 1.5 2003/06/02 23:27:55 millert Exp $ */
+/* $OpenBSD: openprom.c,v 1.6 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: openprom.c,v 1.8 1996/03/31 23:45:34 pk Exp $ */
/*
@@ -246,9 +246,9 @@ openpromioctl(dev, cmd, data, flags, p)
}
if (name)
- free(name, M_TEMP);
+ free(name, M_TEMP, 0);
if (value)
- free(value, M_TEMP);
+ free(value, M_TEMP, 0);
return (error);
}
diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c
index 9e3a5eba96c..9d35e0a6fae 100644
--- a/sys/arch/sparc/sparc/pmap.c
+++ b/sys/arch/sparc/sparc/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.164 2014/04/08 13:23:51 mpi Exp $ */
+/* $OpenBSD: pmap.c,v 1.165 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */
/*
@@ -3633,7 +3633,7 @@ pmap_destroy(pm)
simple_unlock(&pm->pm_lock);
if (count == 0) {
pmap_release(pm);
- free(pm, M_VMPMAP);
+ free(pm, M_VMPMAP, 0);
}
}
@@ -3695,7 +3695,7 @@ if (pmapdebug) {
}
#endif
if (pm->pm_regstore)
- free(pm->pm_regstore, M_VMPMAP);
+ free(pm->pm_regstore, M_VMPMAP, 0);
#if defined(SUN4M)
if (CPU_ISSUN4M) {
@@ -4091,10 +4091,10 @@ pmap_rmu4_4c(pm, va, endva, vr, vs)
pm->pm_stats.resident_count--;
}
if ((sp->sg_npte = nleft) == 0) {
- free(pte0, M_VMPMAP);
+ free(pte0, M_VMPMAP, 0);
sp->sg_pte = NULL;
if (--rp->rg_nsegmap == 0) {
- free(rp->rg_segmap, M_VMPMAP);
+ free(rp->rg_segmap, M_VMPMAP, 0);
rp->rg_segmap = NULL;
#if defined(SUN4_MMU3L)
if (HASSUN4_MMU3L && rp->rg_smeg != reginval) {
@@ -4175,12 +4175,12 @@ if (pm->pm_ctx == NULL) {
setregmap(0, rp->rg_smeg);
setsegmap(vs << SGSHIFT, seginval);
}
- free(pte0, M_VMPMAP);
+ free(pte0, M_VMPMAP, 0);
sp->sg_pte = NULL;
me_free(pm, pmeg);
if (--rp->rg_nsegmap == 0) {
- free(rp->rg_segmap, M_VMPMAP);
+ free(rp->rg_segmap, M_VMPMAP, 0);
rp->rg_segmap = NULL;
GAP_WIDEN(pm,vr);
@@ -4301,7 +4301,7 @@ pmap_rmu4m(pm, va, endva, vr, vs)
if (pm->pm_ctx)
tlb_flush_context(); /* Paranoia? */
setpgt4m(&pm->pm_reg_ptps[vr], SRMMU_TEINVALID);
- free(rp->rg_segmap, M_VMPMAP);
+ free(rp->rg_segmap, M_VMPMAP, 0);
rp->rg_segmap = NULL;
pool_put(&L23_pool, rp->rg_seg_ptps);
}
@@ -4382,10 +4382,10 @@ pmap_page_protect4_4c(struct vm_page *pg, vm_prot_t prot)
if (nleft) {
sp->sg_pte[VA_VPG(va)] = 0;
} else {
- free(sp->sg_pte, M_VMPMAP);
+ free(sp->sg_pte, M_VMPMAP, 0);
sp->sg_pte = NULL;
if (--rp->rg_nsegmap == 0) {
- free(rp->rg_segmap, M_VMPMAP);
+ free(rp->rg_segmap, M_VMPMAP, 0);
rp->rg_segmap = NULL;
GAP_WIDEN(pm,vr);
#if defined(SUN4_MMU3L)
@@ -4464,7 +4464,7 @@ pmap_page_protect4_4c(struct vm_page *pg, vm_prot_t prot)
setsegmap(vs << SGSHIFT, seginval);
}
#endif
- free(sp->sg_pte, M_VMPMAP);
+ free(sp->sg_pte, M_VMPMAP, 0);
sp->sg_pte = NULL;
me_free(pm, sp->sg_pmeg);
@@ -4477,7 +4477,7 @@ pmap_page_protect4_4c(struct vm_page *pg, vm_prot_t prot)
region_free(pm, rp->rg_smeg);
}
#endif
- free(rp->rg_segmap, M_VMPMAP);
+ free(rp->rg_segmap, M_VMPMAP, 0);
rp->rg_segmap = NULL;
GAP_WIDEN(pm,vr);
}
@@ -4805,7 +4805,7 @@ pmap_page_protect4m(struct vm_page *pg, vm_prot_t prot)
if (pm->pm_ctx)
tlb_flush_context();
setpgt4m(&pm->pm_reg_ptps[vr], SRMMU_TEINVALID);
- free(rp->rg_segmap, M_VMPMAP);
+ free(rp->rg_segmap, M_VMPMAP, 0);
rp->rg_segmap = NULL;
pool_put(&L23_pool, rp->rg_seg_ptps);
}
diff --git a/sys/arch/sparc/sparc/vm_machdep.c b/sys/arch/sparc/sparc/vm_machdep.c
index 410e829610c..9e933403d2c 100644
--- a/sys/arch/sparc/sparc/vm_machdep.c
+++ b/sys/arch/sparc/sparc/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.56 2013/01/16 19:04:43 miod Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.57 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: vm_machdep.c,v 1.30 1997/03/10 23:55:40 pk Exp $ */
/*
@@ -107,7 +107,7 @@ dvma_malloc_space(len, kaddr, flags, space)
*(vaddr_t *)kaddr = kva;
dva = dvma_mapin_space(kernel_map, kva, len, (flags & M_NOWAIT) ? 0 : 1, space);
if (dva == 0) {
- free((void *)kva, M_DEVBUF);
+ free((void *)kva, M_DEVBUF, 0);
return (NULL);
}
return (caddr_t)dva;
@@ -133,7 +133,7 @@ dvma_free(dva, len, kaddr)
if (!has_iocache)
#endif
kvm_recache(kaddr, atop(len));
- free((void *)kva, M_DEVBUF);
+ free((void *)kva, M_DEVBUF, 0);
}
u_long dvma_cachealign = 0;
@@ -468,7 +468,7 @@ cpu_exit(p)
savefpstate(fs);
cpuinfo.fpproc = NULL;
}
- free((void *)fs, M_SUBPROC);
+ free((void *)fs, M_SUBPROC, 0);
}
pmap_deactivate(p);
diff --git a/sys/arch/sparc/stand/common/dvma.c b/sys/arch/sparc/stand/common/dvma.c
index bfb361057e9..0703791b693 100644
--- a/sys/arch/sparc/stand/common/dvma.c
+++ b/sys/arch/sparc/stand/common/dvma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dvma.c,v 1.5 2011/04/14 18:27:49 miod Exp $ */
+/* $OpenBSD: dvma.c,v 1.6 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: dvma.c,v 1.2 1995/09/17 00:50:56 pk Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross
@@ -135,7 +135,7 @@ dvma_alloc(int len)
return (dvma_mapin(mem, len));
}
-extern void free(void *ptr, int len);
+extern void free(void *ptr, int len, 0);
void
dvma_free(char *dvma, int len)
{
@@ -143,5 +143,5 @@ dvma_free(char *dvma, int len)
mem = dvma_mapout(dvma, len);
if (mem)
- free(mem, len);
+ free(mem, len, 0);
}
diff --git a/sys/arch/sparc/stand/installboot/installboot.c b/sys/arch/sparc/stand/installboot/installboot.c
index 3e09bcbe779..0409685f3cd 100644
--- a/sys/arch/sparc/stand/installboot/installboot.c
+++ b/sys/arch/sparc/stand/installboot/installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: installboot.c,v 1.8 2013/09/29 21:30:50 jmc Exp $ */
+/* $OpenBSD: installboot.c,v 1.9 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: installboot.c,v 1.1 1997/06/01 03:39:45 mrg Exp $ */
/*
@@ -251,7 +251,7 @@ loadprotoblocks(fname, size)
}
if (read(fd, bp, statbuf.st_size) != statbuf.st_size) {
warn("read: %s", fname);
- free(bp);
+ free(bp, 0);
close(fd);
return NULL;
}
@@ -269,21 +269,21 @@ loadprotoblocks(fname, size)
if ((int)block_table & 3) {
warn("%s: invalid address: block_table = %x",
fname, block_table);
- free(bp);
+ free(bp, 0);
close(fd);
return NULL;
}
if ((int)block_count_p & 3) {
warn("%s: invalid address: block_count_p = %x",
fname, block_count_p);
- free(bp);
+ free(bp, 0);
close(fd);
return NULL;
}
if ((int)block_size_p & 3) {
warn("%s: invalid address: block_size_p = %x",
fname, block_size_p);
- free(bp);
+ free(bp, 0);
close(fd);
return NULL;
}
diff --git a/sys/arch/sparc/stand/installboot/nlist.c b/sys/arch/sparc/stand/installboot/nlist.c
index 26b71dc5607..0b4b2d7ca47 100644
--- a/sys/arch/sparc/stand/installboot/nlist.c
+++ b/sys/arch/sparc/stand/installboot/nlist.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nlist.c,v 1.1 2013/10/30 18:04:47 deraadt Exp $ */
+/* $OpenBSD: nlist.c,v 1.2 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -137,7 +137,7 @@ __aout_fdnlist(int fd, struct nlist *list)
}
aout_done:
if (usemalloc)
- free(strtab);
+ free(strtab, 0);
else
munmap(strtab, strsize);
return (nent);
diff --git a/sys/arch/sparc64/dev/ce4231.c b/sys/arch/sparc64/dev/ce4231.c
index a86d1192246..adb08d06851 100644
--- a/sys/arch/sparc64/dev/ce4231.c
+++ b/sys/arch/sparc64/dev/ce4231.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ce4231.c,v 1.30 2013/05/16 06:31:50 kettenis Exp $ */
+/* $OpenBSD: ce4231.c,v 1.31 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
@@ -1386,7 +1386,7 @@ fail2:
fail1:
bus_dmamap_destroy(dmat, p->dmamap);
fail:
- free(p, pool);
+ free(p, pool, 0);
return (NULL);
}
@@ -1408,7 +1408,7 @@ ce4231_free(addr, ptr, pool)
bus_dmamem_free(dmat, p->segs, p->nsegs);
bus_dmamap_destroy(dmat, p->dmamap);
*pp = p->next;
- free(p, pool);
+ free(p, pool, 0);
return;
}
printf("%s: attempt to free rogue pointer\n", sc->sc_dev.dv_xname);
diff --git a/sys/arch/sparc64/dev/central.c b/sys/arch/sparc64/dev/central.c
index 764d01e2aa4..eaad29540db 100644
--- a/sys/arch/sparc64/dev/central.c
+++ b/sys/arch/sparc64/dev/central.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: central.c,v 1.7 2010/11/11 17:58:23 miod Exp $ */
+/* $OpenBSD: central.c,v 1.8 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2004 Jason L. Wright (jason@thought.net)
@@ -108,7 +108,7 @@ central_attach(parent, self, aux)
(void)config_found(&sc->sc_dv, (void *)&ca, central_print);
if (ca.ca_name != NULL)
- free(ca.ca_name, M_DEVBUF);
+ free(ca.ca_name, M_DEVBUF, 0);
}
}
diff --git a/sys/arch/sparc64/dev/creator.c b/sys/arch/sparc64/dev/creator.c
index 04effe065db..99a162a073e 100644
--- a/sys/arch/sparc64/dev/creator.c
+++ b/sys/arch/sparc64/dev/creator.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: creator.c,v 1.47 2014/03/29 18:09:30 guenther Exp $ */
+/* $OpenBSD: creator.c,v 1.48 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -762,7 +762,7 @@ creator_load_firmware(void *vsc)
if (sizeof(*fw) > buflen ||
fw->fw_size * sizeof(u_int32_t) > (buflen - sizeof(*fw))) {
printf("%s: corrupt firmware\n", sc->sc_sunfb.sf_dev.dv_xname);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return;
}
@@ -795,7 +795,7 @@ creator_load_firmware(void *vsc)
creator_ras_wait(sc);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
}
#endif /* SMALL_KERNEL */
diff --git a/sys/arch/sparc64/dev/ebus.c b/sys/arch/sparc64/dev/ebus.c
index c0b6245264e..e7c4f667d11 100644
--- a/sys/arch/sparc64/dev/ebus.c
+++ b/sys/arch/sparc64/dev/ebus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ebus.c,v 1.22 2008/06/11 05:15:43 kettenis Exp $ */
+/* $OpenBSD: ebus.c,v 1.23 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: ebus.c,v 1.24 2001/07/25 03:49:54 eeh Exp $ */
/*
@@ -272,13 +272,13 @@ void
ebus_destroy_attach_args(struct ebus_attach_args *ea)
{
if (ea->ea_name)
- free((void *)ea->ea_name, M_DEVBUF);
+ free((void *)ea->ea_name, M_DEVBUF, 0);
if (ea->ea_regs)
- free((void *)ea->ea_regs, M_DEVBUF);
+ free((void *)ea->ea_regs, M_DEVBUF, 0);
if (ea->ea_intrs)
- free((void *)ea->ea_intrs, M_DEVBUF);
+ free((void *)ea->ea_intrs, M_DEVBUF, 0);
if (ea->ea_vaddrs)
- free((void *)ea->ea_vaddrs, M_DEVBUF);
+ free((void *)ea->ea_vaddrs, M_DEVBUF, 0);
}
int
diff --git a/sys/arch/sparc64/dev/fd.c b/sys/arch/sparc64/dev/fd.c
index ee4d81a8c9c..159bc75aea0 100644
--- a/sys/arch/sparc64/dev/fd.c
+++ b/sys/arch/sparc64/dev/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.44 2014/04/28 21:01:51 brad Exp $ */
+/* $OpenBSD: fd.c,v 1.45 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: fd.c,v 1.112 2003/08/07 16:29:35 agc Exp $ */
/*-
@@ -1852,7 +1852,7 @@ fdioctl(dev, cmd, addr, flag, p)
lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
fdgetdisklabel(dev, fd, lp, 0);
bcopy(lp, fd->sc_dk.dk_label, sizeof(*lp));
- free(lp, M_TEMP);
+ free(lp, M_TEMP, 0);
return 0;
case DIOCGPDINFO:
@@ -2012,7 +2012,7 @@ fdformat(dev, finfo, p)
/* ...and wait for it to complete */
rv = biowait(bp);
- free(bp, M_TEMP);
+ free(bp, M_TEMP, 0);
return (rv);
}
diff --git a/sys/arch/sparc64/dev/fhc.c b/sys/arch/sparc64/dev/fhc.c
index 46abed25a34..0b75c88c3fb 100644
--- a/sys/arch/sparc64/dev/fhc.c
+++ b/sys/arch/sparc64/dev/fhc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fhc.c,v 1.18 2011/04/07 15:30:16 miod Exp $ */
+/* $OpenBSD: fhc.c,v 1.19 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2004 Jason L. Wright (jason@thought.net)
@@ -118,13 +118,13 @@ fhc_attach(struct fhc_softc *sc)
(void)config_found(&sc->sc_dv, (void *)&fa, fhc_print);
if (fa.fa_name != NULL)
- free(fa.fa_name, M_DEVBUF);
+ free(fa.fa_name, M_DEVBUF, 0);
if (fa.fa_reg != NULL)
- free(fa.fa_reg, M_DEVBUF);
+ free(fa.fa_reg, M_DEVBUF, 0);
if (fa.fa_intr != NULL)
- free(fa.fa_intr, M_DEVBUF);
+ free(fa.fa_intr, M_DEVBUF, 0);
if (fa.fa_promvaddrs != NULL)
- free(fa.fa_promvaddrs, M_DEVBUF);
+ free(fa.fa_promvaddrs, M_DEVBUF, 0);
}
sc->sc_blink.bl_func = fhc_led_blink;
diff --git a/sys/arch/sparc64/dev/iommu.c b/sys/arch/sparc64/dev/iommu.c
index 151f59531d2..15c07e44f77 100644
--- a/sys/arch/sparc64/dev/iommu.c
+++ b/sys/arch/sparc64/dev/iommu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iommu.c,v 1.68 2014/05/10 12:20:38 kettenis Exp $ */
+/* $OpenBSD: iommu.c,v 1.69 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: iommu.c,v 1.47 2002/02/08 20:03:45 eeh Exp $ */
/*
@@ -1660,7 +1660,7 @@ iommu_iomap_destroy(struct iommu_map_state *ims)
ims->ims_map.ipm_pagecnt);
#endif
- free(ims, M_DEVBUF);
+ free(ims, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/sparc64/dev/ldc.c b/sys/arch/sparc64/dev/ldc.c
index 38173b398e4..6fa6b38afe5 100644
--- a/sys/arch/sparc64/dev/ldc.c
+++ b/sys/arch/sparc64/dev/ldc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldc.c,v 1.9 2012/10/21 18:56:00 kettenis Exp $ */
+/* $OpenBSD: ldc.c,v 1.10 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis
*
@@ -508,7 +508,7 @@ ldc_queue_free(bus_dma_tag_t t, struct ldc_queue *lq)
bus_dmamem_unmap(t, lq->lq_va, size);
bus_dmamem_free(t, &lq->lq_seg, 1);
bus_dmamap_destroy(t, lq->lq_map);
- free(lq, M_DEVBUF);
+ free(lq, M_DEVBUF, 0);
}
struct ldc_map *
@@ -568,5 +568,5 @@ ldc_map_free(bus_dma_tag_t t, struct ldc_map *lm)
bus_dmamem_unmap(t, (caddr_t)lm->lm_slot, size);
bus_dmamem_free(t, &lm->lm_seg, 1);
bus_dmamap_destroy(t, lm->lm_map);
- free(lm, M_DEVBUF);
+ free(lm, M_DEVBUF, 0);
}
diff --git a/sys/arch/sparc64/dev/msi.c b/sys/arch/sparc64/dev/msi.c
index 1bd6cc9925d..5b8e5dd0336 100644
--- a/sys/arch/sparc64/dev/msi.c
+++ b/sys/arch/sparc64/dev/msi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msi.c,v 1.1 2011/07/06 05:35:53 kettenis Exp $ */
+/* $OpenBSD: msi.c,v 1.2 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2011 Mark Kettenis <kettenis@openbsd.org>
*
@@ -82,5 +82,5 @@ msi_eq_free(bus_dma_tag_t t, struct msi_eq *meq)
bus_dmamem_unmap(t, meq->meq_va, size);
bus_dmamem_free(t, &meq->meq_seg, 1);
bus_dmamap_destroy(t, meq->meq_map);
- free(meq, M_DEVBUF);
+ free(meq, M_DEVBUF, 0);
}
diff --git a/sys/arch/sparc64/dev/psycho.c b/sys/arch/sparc64/dev/psycho.c
index 04292caa1d5..f83d2a8ab49 100644
--- a/sys/arch/sparc64/dev/psycho.c
+++ b/sys/arch/sparc64/dev/psycho.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: psycho.c,v 1.71 2014/07/12 14:12:44 uebayasi Exp $ */
+/* $OpenBSD: psycho.c,v 1.72 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp $ */
/*
@@ -891,7 +891,7 @@ psycho_iommu_init(struct psycho_softc *sc, int tsbsize)
}
#undef TSBCASE
DPRINTF(PDB_CONF, ("psycho_iommu_init: iobase=0x%x\n", iobase));
- free(vdma, M_DEVBUF);
+ free(vdma, M_DEVBUF, 0);
} else {
DPRINTF(PDB_CONF, ("psycho_iommu_init: getprop failed, "
"iobase=0x%x, tsbsize=%d\n", iobase, tsbsize));
diff --git a/sys/arch/sparc64/dev/pyro.c b/sys/arch/sparc64/dev/pyro.c
index daf02c992a7..d79cb427d4e 100644
--- a/sys/arch/sparc64/dev/pyro.c
+++ b/sys/arch/sparc64/dev/pyro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pyro.c,v 1.26 2014/01/21 10:59:30 dlg Exp $ */
+/* $OpenBSD: pyro.c,v 1.27 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -250,7 +250,7 @@ pyro_init(struct pyro_softc *sc, int busa)
pba.pba_pc->conf_write = pyro_conf_write;
pba.pba_pc->intr_map = pyro_intr_map;
- free(busranges, M_DEVBUF);
+ free(busranges, M_DEVBUF, 0);
#ifdef DDB
db_register_xir(pyro_xir, sc);
@@ -347,7 +347,7 @@ pyro_init_msi(struct pyro_softc *sc, struct pyro_pbm *pbm)
return;
free_table:
- free(pbm->pp_msi, M_DEVBUF);
+ free(pbm->pp_msi, M_DEVBUF, 0);
}
int
diff --git a/sys/arch/sparc64/dev/sbus.c b/sys/arch/sparc64/dev/sbus.c
index 082d015f6b5..15b5d886eb3 100644
--- a/sys/arch/sparc64/dev/sbus.c
+++ b/sys/arch/sparc64/dev/sbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sbus.c,v 1.40 2014/07/12 14:12:44 uebayasi Exp $ */
+/* $OpenBSD: sbus.c,v 1.41 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: sbus.c,v 1.46 2001/10/07 20:30:41 eeh Exp $ */
/*-
@@ -484,16 +484,16 @@ void
sbus_destroy_attach_args(struct sbus_attach_args *sa)
{
if (sa->sa_name != NULL)
- free(sa->sa_name, M_DEVBUF);
+ free(sa->sa_name, M_DEVBUF, 0);
if (sa->sa_nreg != 0)
- free(sa->sa_reg, M_DEVBUF);
+ free(sa->sa_reg, M_DEVBUF, 0);
if (sa->sa_intr)
- free(sa->sa_intr, M_DEVBUF);
+ free(sa->sa_intr, M_DEVBUF, 0);
if (sa->sa_promvaddrs)
- free((void *)sa->sa_promvaddrs, M_DEVBUF);
+ free((void *)sa->sa_promvaddrs, M_DEVBUF, 0);
bzero(sa, sizeof(struct sbus_attach_args)); /*DEBUG*/
}
@@ -638,7 +638,7 @@ sbus_get_intr(struct sbus_softc *sc, int node, struct sbus_intr **ipp, int *np,
ip[n].sbi_pri = pri | ipl[n];
ip[n].sbi_vec = ipl[n];
}
- free(ipl, M_DEVBUF);
+ free(ipl, M_DEVBUF, 0);
*ipp = ip;
}
diff --git a/sys/arch/sparc64/dev/schizo.c b/sys/arch/sparc64/dev/schizo.c
index 251fb94467b..1bedaf5fb81 100644
--- a/sys/arch/sparc64/dev/schizo.c
+++ b/sys/arch/sparc64/dev/schizo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: schizo.c,v 1.65 2014/05/10 12:18:38 kettenis Exp $ */
+/* $OpenBSD: schizo.c,v 1.66 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -244,7 +244,7 @@ schizo_init(struct schizo_softc *sc, int busa)
pba.pba_pc->conf_write = schizo_conf_write;
pba.pba_pc->intr_map = schizo_intr_map;
- free(busranges, M_DEVBUF);
+ free(busranges, M_DEVBUF, 0);
schizo_pbm_write(pbm, SCZ_PCI_INTR_RETRY, 5);
@@ -445,7 +445,7 @@ schizo_init_iommu(struct schizo_softc *sc, struct schizo_pbm *pbm)
}
#undef TSBCASE
DPRINTF(SDB_BUSMAP, ("schizo_iommu_init: iobase=0x%x\n", iobase));
- free(vdma, M_DEVBUF);
+ free(vdma, M_DEVBUF, 0);
} else {
DPRINTF(SDB_BUSMAP, ("schizo_iommu_init: getprop failed, "
"using iobase=0x%x, tsbsize=%d\n", iobase, tsbsize));
@@ -557,7 +557,7 @@ schizo_set_intr(struct schizo_softc *sc, struct schizo_pbm *pbm, int ipl,
map, clr, name);
if (ih == NULL) {
printf("set_intr failed...\n");
- free(name, M_DEVBUF);
+ free(name, M_DEVBUF, 0);
return;
}
diff --git a/sys/arch/sparc64/dev/ssm.c b/sys/arch/sparc64/dev/ssm.c
index 75ddf46a67c..0757aff3cd9 100644
--- a/sys/arch/sparc64/dev/ssm.c
+++ b/sys/arch/sparc64/dev/ssm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssm.c,v 1.1 2008/07/06 08:51:44 kettenis Exp $ */
+/* $OpenBSD: ssm.c,v 1.2 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
*
@@ -74,7 +74,7 @@ ssm_attach(struct device *parent, struct device *self, void *aux)
getprop(node, "reg", sizeof(*nma.ma_reg),
&nma.ma_nreg, (void **)&nma.ma_reg);
config_found(self, &nma, ssm_print);
- free(nma.ma_reg, M_DEVBUF);
+ free(nma.ma_reg, M_DEVBUF, 0);
}
}
diff --git a/sys/arch/sparc64/dev/vbus.c b/sys/arch/sparc64/dev/vbus.c
index 9af35be6b06..72e8ff49f49 100644
--- a/sys/arch/sparc64/dev/vbus.c
+++ b/sys/arch/sparc64/dev/vbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vbus.c,v 1.6 2013/07/16 21:08:06 kettenis Exp $ */
+/* $OpenBSD: vbus.c,v 1.7 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
*
@@ -168,7 +168,7 @@ vbus_intr_map(int node, int ino, uint64_t *sysino)
node = imap[address_cells + interrupt_cells];
devino = imap[address_cells + interrupt_cells + 1];
- free(reg, M_DEVBUF);
+ free(reg, M_DEVBUF, 0);
reg = NULL;
getprop(node, "reg", sizeof(*reg), &nreg, (void **)&reg);
diff --git a/sys/arch/sparc64/dev/vdsk.c b/sys/arch/sparc64/dev/vdsk.c
index 9dcdba71c9d..a097db72afd 100644
--- a/sys/arch/sparc64/dev/vdsk.c
+++ b/sys/arch/sparc64/dev/vdsk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vdsk.c,v 1.38 2014/05/10 11:49:31 kettenis Exp $ */
+/* $OpenBSD: vdsk.c,v 1.39 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2009, 2011 Mark Kettenis
*
@@ -920,7 +920,7 @@ vdsk_dring_free(bus_dma_tag_t t, struct vdsk_dring *vd)
bus_dmamem_unmap(t, (caddr_t)vd->vd_desc, size);
bus_dmamem_free(t, &vd->vd_seg, 1);
bus_dmamap_destroy(t, vd->vd_map);
- free(vd, M_DEVBUF);
+ free(vd, M_DEVBUF, 0);
}
void *
diff --git a/sys/arch/sparc64/dev/vdsp.c b/sys/arch/sparc64/dev/vdsp.c
index 4133738a7c6..86af11cc035 100644
--- a/sys/arch/sparc64/dev/vdsp.c
+++ b/sys/arch/sparc64/dev/vdsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vdsp.c,v 1.26 2014/05/10 11:49:31 kettenis Exp $ */
+/* $OpenBSD: vdsp.c,v 1.27 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2009, 2011, 2014 Mark Kettenis
*
@@ -848,15 +848,15 @@ vdsp_ldc_reset(struct ldc_conn *lc)
sc->sc_vio_state = 0;
sc->sc_seq_no = 0;
if (sc->sc_vd) {
- free(sc->sc_vd, M_DEVBUF);
+ free(sc->sc_vd, M_DEVBUF, 0);
sc->sc_vd = NULL;
}
if (sc->sc_vd_task) {
- free(sc->sc_vd_task, M_DEVBUF);
+ free(sc->sc_vd_task, M_DEVBUF, 0);
sc->sc_vd_task = NULL;
}
if (sc->sc_label) {
- free(sc->sc_label, M_DEVBUF);
+ free(sc->sc_label, M_DEVBUF, 0);
sc->sc_label = NULL;
}
@@ -984,7 +984,7 @@ vdsp_readlabel(struct vdsp_softc *sc)
err = VOP_READ(sc->sc_vp, &uio, 0, p->p_ucred);
VOP_UNLOCK(sc->sc_vp, 0, p);
if (err) {
- free(sc->sc_label, M_DEVBUF);
+ free(sc->sc_label, M_DEVBUF, 0);
sc->sc_label = NULL;
}
}
@@ -1048,7 +1048,7 @@ vdsp_is_iso(struct vdsp_softc *sc)
if (err == 0 && memcmp(vdp->id, ISO_STANDARD_ID, sizeof(vdp->id)))
err = ENOENT;
- free(vdp, M_DEVBUF);
+ free(vdp, M_DEVBUF, 0);
return (err == 0);
}
@@ -1145,7 +1145,7 @@ vdsp_read_desc(struct vdsp_softc *sc, struct vdsk_desc_msg *dm)
}
fail:
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
/* ACK the descriptor. */
dm->tag.stype = VIO_SUBTYPE_ACK;
@@ -1216,7 +1216,7 @@ vdsp_read_dring(void *arg1, void *arg2)
}
fail:
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
/* ACK the descriptor. */
vd->hdr.dstate = VIO_DESC_DONE;
@@ -1283,7 +1283,7 @@ vdsp_write_dring(void *arg1, void *arg2)
VOP_UNLOCK(sc->sc_vp, 0, p);
fail:
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
/* ACK the descriptor. */
vd->hdr.dstate = VIO_DESC_DONE;
@@ -1396,7 +1396,7 @@ vdsp_get_vtoc(void *arg1, void *arg2)
vd->status = 0;
fail:
- free(vt, M_DEVBUF);
+ free(vt, M_DEVBUF, 0);
/* ACK the descriptor. */
vd->hdr.dstate = VIO_DESC_DONE;
@@ -1488,7 +1488,7 @@ vdsp_set_vtoc(void *arg1, void *arg2)
vd->status = vdsp_writelabel(sc);
fail:
- free(vt, M_DEVBUF);
+ free(vt, M_DEVBUF, 0);
/* ACK the descriptor. */
vd->hdr.dstate = VIO_DESC_DONE;
@@ -1581,7 +1581,7 @@ vdsp_get_diskgeom(void *arg1, void *arg2)
vd->status = 0;
fail:
- free(vg, M_DEVBUF);
+ free(vg, M_DEVBUF, 0);
/* ACK the descriptor. */
vd->hdr.dstate = VIO_DESC_DONE;
diff --git a/sys/arch/sparc64/dev/vldcp.c b/sys/arch/sparc64/dev/vldcp.c
index f71648b784a..9de4aac57af 100644
--- a/sys/arch/sparc64/dev/vldcp.c
+++ b/sys/arch/sparc64/dev/vldcp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vldcp.c,v 1.8 2014/05/10 11:49:31 kettenis Exp $ */
+/* $OpenBSD: vldcp.c,v 1.9 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2009, 2012 Mark Kettenis
*
@@ -509,13 +509,13 @@ vldcpioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
hi->hi_cookie + offset, pa, nbytes, &nbytes);
if (err != H_EOK) {
printf("hv_ldc_copy %d\n", err);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
device_unref(&sc->sc_dv);
return (EINVAL);
}
err = copyout(buf, (caddr_t)hi->hi_addr + offset, nbytes);
if (err) {
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
device_unref(&sc->sc_dv);
return (err);
}
@@ -531,7 +531,7 @@ vldcpioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
nbytes = min(PAGE_SIZE, size);
err = copyin((caddr_t)hi->hi_addr + offset, buf, nbytes);
if (err) {
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
device_unref(&sc->sc_dv);
return (err);
}
@@ -539,7 +539,7 @@ vldcpioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
hi->hi_cookie + offset, pa, nbytes, &nbytes);
if (err != H_EOK) {
printf("hv_ldc_copy %d\n", err);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
device_unref(&sc->sc_dv);
return (EINVAL);
}
@@ -550,7 +550,7 @@ vldcpioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
}
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
device_unref(&sc->sc_dv);
return (0);
diff --git a/sys/arch/sparc64/dev/vnet.c b/sys/arch/sparc64/dev/vnet.c
index b594c8106bd..7684fb0cc30 100644
--- a/sys/arch/sparc64/dev/vnet.c
+++ b/sys/arch/sparc64/dev/vnet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnet.c,v 1.32 2014/07/08 02:59:51 dlg Exp $ */
+/* $OpenBSD: vnet.c,v 1.33 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis
*
@@ -1492,5 +1492,5 @@ vnet_dring_free(bus_dma_tag_t t, struct vnet_dring *vd)
bus_dmamem_unmap(t, (caddr_t)vd->vd_desc, size);
bus_dmamem_free(t, &vd->vd_seg, 1);
bus_dmamap_destroy(t, vd->vd_map);
- free(vd, M_DEVBUF);
+ free(vd, M_DEVBUF, 0);
}
diff --git a/sys/arch/sparc64/dev/vpci.c b/sys/arch/sparc64/dev/vpci.c
index cad8e10d7f9..d5ba8b60227 100644
--- a/sys/arch/sparc64/dev/vpci.c
+++ b/sys/arch/sparc64/dev/vpci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vpci.c,v 1.14 2014/05/10 11:49:31 kettenis Exp $ */
+/* $OpenBSD: vpci.c,v 1.15 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis <kettenis@openbsd.org>
*
@@ -203,7 +203,7 @@ vpci_attach(struct device *parent, struct device *self, void *aux)
pba.pba_pc->conf_write = vpci_conf_write;
pba.pba_pc->intr_map = vpci_intr_map;
- free(busranges, M_DEVBUF);
+ free(busranges, M_DEVBUF, 0);
config_found(&sc->sc_dv, &pba, vpci_print);
}
@@ -280,7 +280,7 @@ disable_queue:
free_queue:
msi_eq_free(sc->sc_dmat, pbm->vp_meq);
free_table:
- free(pbm->vp_msi, M_DEVBUF);
+ free(pbm->vp_msi, M_DEVBUF, 0);
}
int
diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c
index 59c6989bf21..ce350aabe20 100644
--- a/sys/arch/sparc64/sparc64/autoconf.c
+++ b/sys/arch/sparc64/sparc64/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.119 2014/05/10 12:29:58 kettenis Exp $ */
+/* $OpenBSD: autoconf.c,v 1.120 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */
/*
@@ -1013,7 +1013,7 @@ extern bus_space_tag_t mainbus_space_tag;
rv = getprop(node, "interrupts", sizeof(*ma.ma_interrupts),
&ma.ma_ninterrupts, (void **)&ma.ma_interrupts);
if (rv != 0 && rv != ENOENT) {
- free(ma.ma_reg, M_DEVBUF);
+ free(ma.ma_reg, M_DEVBUF, 0);
continue;
}
#ifdef DEBUG
@@ -1028,9 +1028,9 @@ extern bus_space_tag_t mainbus_space_tag;
rv = getprop(node, "address", sizeof(*ma.ma_address),
&ma.ma_naddress, (void **)&ma.ma_address);
if (rv != 0 && rv != ENOENT) {
- free(ma.ma_reg, M_DEVBUF);
+ free(ma.ma_reg, M_DEVBUF, 0);
if (ma.ma_ninterrupts)
- free(ma.ma_interrupts, M_DEVBUF);
+ free(ma.ma_interrupts, M_DEVBUF, 0);
continue;
}
#ifdef DEBUG
@@ -1043,11 +1043,11 @@ extern bus_space_tag_t mainbus_space_tag;
}
#endif
config_found(dev, &ma, mbprint);
- free(ma.ma_reg, M_DEVBUF);
+ free(ma.ma_reg, M_DEVBUF, 0);
if (ma.ma_ninterrupts)
- free(ma.ma_interrupts, M_DEVBUF);
+ free(ma.ma_interrupts, M_DEVBUF, 0);
if (ma.ma_naddress)
- free(ma.ma_address, M_DEVBUF);
+ free(ma.ma_address, M_DEVBUF, 0);
}
extern int prom_cngetc(dev_t);
diff --git a/sys/arch/sparc64/sparc64/clock.c b/sys/arch/sparc64/sparc64/clock.c
index 8ab51015522..70209032749 100644
--- a/sys/arch/sparc64/sparc64/clock.c
+++ b/sys/arch/sparc64/sparc64/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.53 2014/05/10 12:15:19 kettenis Exp $ */
+/* $OpenBSD: clock.c,v 1.54 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: clock.c,v 1.41 2001/07/24 19:29:25 eeh Exp $ */
/*
@@ -445,7 +445,7 @@ getidprom()
if (getprop(node, "idprom", sizeof(*idp), &n, (void **)&idp) != 0)
return (NULL);
if (n != 1) {
- free(idp, M_DEVBUF);
+ free(idp, M_DEVBUF, 0);
return (NULL);
}
return (idp);
@@ -544,7 +544,7 @@ myetheraddr(cp)
cp[4] = idp->id_ether[4];
cp[5] = idp->id_ether[5];
if (idprom == NULL)
- free(idp, M_DEVBUF);
+ free(idp, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/sparc64/sparc64/intr.c b/sys/arch/sparc64/sparc64/intr.c
index 0a61f1dc8e3..536dde01d22 100644
--- a/sys/arch/sparc64/sparc64/intr.c
+++ b/sys/arch/sparc64/sparc64/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.48 2014/05/10 12:29:58 kettenis Exp $ */
+/* $OpenBSD: intr.c,v 1.49 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: intr.c,v 1.39 2001/07/19 23:38:11 eeh Exp $ */
/*
@@ -339,7 +339,7 @@ void
softintr_disestablish(cookie)
void *cookie;
{
- free(cookie, M_DEVBUF);
+ free(cookie, M_DEVBUF, 0);
}
void
diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c
index e6a9c12142d..b3f721a9b24 100644
--- a/sys/arch/sparc64/sparc64/machdep.c
+++ b/sys/arch/sparc64/sparc64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.163 2014/07/11 22:28:06 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.164 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */
/*-
@@ -325,7 +325,7 @@ setregs(p, pack, stack, retval)
* to save it. In any case, get rid of our FPU state.
*/
fpusave_proc(p, 0);
- free(p->p_md.md_fpstate, M_SUBPROC);
+ free(p->p_md.md_fpstate, M_SUBPROC, 0);
p->p_md.md_fpstate = NULL;
}
bzero((caddr_t)tf, sizeof *tf);
@@ -1002,7 +1002,7 @@ _bus_dmamap_destroy(t, t0, map)
if (map->dm_nsegs)
bus_dmamap_unload(t0, map);
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
@@ -1420,7 +1420,7 @@ _bus_dmamem_free(t, t0, segs, nsegs)
* Return the list of pages back to the VM system.
*/
uvm_pglistfree(segs[0]._ds_mlist);
- free(segs[0]._ds_mlist, M_DEVBUF);
+ free(segs[0]._ds_mlist, M_DEVBUF, 0);
}
/*
@@ -1814,7 +1814,7 @@ bus_intr_allocate(bus_space_tag_t t, int (*handler)(void *), void *arg,
void
bus_intr_free(void *arg)
{
- free(arg, M_DEVBUF);
+ free(arg, M_DEVBUF, 0);
}
void *
diff --git a/sys/arch/sparc64/sparc64/openprom.c b/sys/arch/sparc64/sparc64/openprom.c
index 8bd95266089..d1897970239 100644
--- a/sys/arch/sparc64/sparc64/openprom.c
+++ b/sys/arch/sparc64/sparc64/openprom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openprom.c,v 1.17 2011/06/17 07:06:46 mk Exp $ */
+/* $OpenBSD: openprom.c,v 1.18 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: openprom.c,v 1.4 2002/01/10 06:21:53 briggs Exp $ */
/*
@@ -307,9 +307,9 @@ openpromioctl(dev, cmd, data, flags, p)
}
if (name)
- free(name, M_TEMP);
+ free(name, M_TEMP, 0);
if (value)
- free(value, M_TEMP);
+ free(value, M_TEMP, 0);
return (error);
}
diff --git a/sys/arch/sparc64/sparc64/vm_machdep.c b/sys/arch/sparc64/sparc64/vm_machdep.c
index f768148dda2..a1af56aa942 100644
--- a/sys/arch/sparc64/sparc64/vm_machdep.c
+++ b/sys/arch/sparc64/sparc64/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.29 2013/01/16 19:04:43 miod Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.30 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: vm_machdep.c,v 1.38 2001/06/30 00:02:20 eeh Exp $ */
/*
@@ -367,7 +367,7 @@ cpu_exit(struct proc *p)
{
if (p->p_md.md_fpstate != NULL) {
fpusave_proc(p, 0);
- free(p->p_md.md_fpstate, M_SUBPROC);
+ free(p->p_md.md_fpstate, M_SUBPROC, 0);
}
pmap_deactivate(p);
diff --git a/sys/arch/sparc64/stand/ofwboot/elf64_exec.c b/sys/arch/sparc64/stand/ofwboot/elf64_exec.c
index 7ac6fcaa07e..647cfa9bb86 100644
--- a/sys/arch/sparc64/stand/ofwboot/elf64_exec.c
+++ b/sys/arch/sparc64/stand/ofwboot/elf64_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: elf64_exec.c,v 1.4 2013/12/28 21:00:21 kettenis Exp $ */
+/* $OpenBSD: elf64_exec.c,v 1.5 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: elfXX_exec.c,v 1.2 2001/08/15 20:08:15 eeh Exp $ */
/*
@@ -171,7 +171,7 @@ elf64_exec(int fd, Elf_Ehdr *elf, u_int64_t *entryp, void **ssymp, void **esymp)
elf->e_phnum = 0;
bcopy(elf, addr, sizeof(Elf_Ehdr));
bcopy(shp, addr + sizeof(Elf_Ehdr), elf->e_shnum * sizeof(Elf_Shdr));
- free(shp, elf->e_shnum * sizeof(Elf_Shdr));
+ free(shp, elf->e_shnum * sizeof(Elf_Shdr), 0);
*ssymp = addr;
/*
diff --git a/sys/arch/vax/if/if_qe.c b/sys/arch/vax/if/if_qe.c
index 105ae1d0609..b413c2ec7cf 100644
--- a/sys/arch/vax/if/if_qe.c
+++ b/sys/arch/vax/if/if_qe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_qe.c,v 1.26 2013/11/27 08:56:31 mpi Exp $ */
+/* $OpenBSD: if_qe.c,v 1.27 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: if_qe.c,v 1.51 2002/06/08 12:28:37 ragge Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -195,7 +195,7 @@ qematch(struct device *parent, struct cfdata *cf, void *aux)
* All done with the bus resources.
*/
ubfree((void *)parent, &ui);
- free(ring, M_TEMP);
+ free(ring, M_TEMP, 0);
return 1;
}
diff --git a/sys/arch/vax/if/if_uba.c b/sys/arch/vax/if/if_uba.c
index 33a8e1ce022..5c7dbdd9683 100644
--- a/sys/arch/vax/if/if_uba.c
+++ b/sys/arch/vax/if/if_uba.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_uba.c,v 1.11 2003/11/10 21:05:04 miod Exp $ */
+/* $OpenBSD: if_uba.c,v 1.12 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: if_uba.c,v 1.15 1999/01/01 21:43:18 ragge Exp $ */
/*
@@ -135,7 +135,7 @@ bad:
ubarelse(ifu->iff_softc, &ifw[nw].ifw_info);
while (--nr >= 0)
ubarelse(ifu->iff_softc, &ifr[nr].ifrw_info);
- free(cp, M_DEVBUF);
+ free(cp, M_DEVBUF, 0);
ifr[0].ifrw_addr = 0;
return (0);
}
diff --git a/sys/arch/vax/mbus/legss.c b/sys/arch/vax/mbus/legss.c
index 7fcb5adef35..7a078a20a9b 100644
--- a/sys/arch/vax/mbus/legss.c
+++ b/sys/arch/vax/mbus/legss.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: legss.c,v 1.6 2013/10/21 10:36:20 miod Exp $ */
+/* $OpenBSD: legss.c,v 1.7 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2008 Miodrag Vallat.
@@ -254,7 +254,7 @@ bad2:
vax_unmap_physmem(scr->ss_vram,
(LEGSS_VISHEIGHT * LEGSS_WIDTH * 32 / NBBY) / VAX_NBPG);
bad1:
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/vax/mscp/mscp.c b/sys/arch/vax/mscp/mscp.c
index 01fd2cd044e..bbb7234429c 100644
--- a/sys/arch/vax/mscp/mscp.c
+++ b/sys/arch/vax/mscp/mscp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mscp.c,v 1.11 2012/12/05 23:20:15 deraadt Exp $ */
+/* $OpenBSD: mscp.c,v 1.12 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: mscp.c,v 1.16 2001/11/13 07:38:28 lukem Exp $ */
/*
@@ -183,7 +183,7 @@ loop:
panic("mscp_dorsp");
if (mi->mi_driveno) {
bcopy(mi->mi_dp, tmp, mi->mi_driveno);
- free(mi->mi_dp, mi->mi_driveno);
+ free(mi->mi_dp, mi->mi_driveno, 0);
}
mi->mi_driveno = tmpno;
mi->mi_dp = tmp;
diff --git a/sys/arch/vax/qbus/uda.c b/sys/arch/vax/qbus/uda.c
index 89c55fa3eac..b4145f98f5d 100644
--- a/sys/arch/vax/qbus/uda.c
+++ b/sys/arch/vax/qbus/uda.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uda.c,v 1.9 2011/07/06 18:32:59 miod Exp $ */
+/* $OpenBSD: uda.c,v 1.10 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: uda.c,v 1.36 2000/06/04 06:17:05 matt Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -331,7 +331,7 @@ udaready(uu)
return 0;
mscp_dgo(sc->sc_softc, mxi);
sc->sc_inq--;
- free(uu, M_DEVBUF);
+ free(uu, M_DEVBUF, 0);
return 1;
}
diff --git a/sys/arch/vax/vax/bus_dma.c b/sys/arch/vax/vax/bus_dma.c
index f59b5c4a23f..edb6a74f612 100644
--- a/sys/arch/vax/vax/bus_dma.c
+++ b/sys/arch/vax/vax/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.28 2014/07/11 09:36:26 mpi Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.29 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: bus_dma.c,v 1.5 1999/11/13 00:32:20 thorpej Exp $ */
/*-
@@ -137,7 +137,7 @@ _bus_dmamap_destroy(t, map)
if (map->dm_nsegs > 0)
printf("bus_dmamap_destroy() called for map with valid mappings\n");
#endif /* DIAGNOSTIC */
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/vax/vax/softintr.c b/sys/arch/vax/vax/softintr.c
index e48c1af132a..812e10f3cf7 100644
--- a/sys/arch/vax/vax/softintr.c
+++ b/sys/arch/vax/vax/softintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softintr.c,v 1.3 2014/07/08 17:19:25 deraadt Exp $ */
+/* $OpenBSD: softintr.c,v 1.4 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */
/*
@@ -149,7 +149,7 @@ softintr_disestablish(void *arg)
}
mtx_leave(&siq->siq_mtx);
- free(sih, M_DEVBUF);
+ free(sih, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/vax/vsa/gpx.c b/sys/arch/vax/vsa/gpx.c
index fca9d006ed4..600a1518d0a 100644
--- a/sys/arch/vax/vsa/gpx.c
+++ b/sys/arch/vax/vsa/gpx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gpx.c,v 1.23 2013/10/21 10:36:20 miod Exp $ */
+/* $OpenBSD: gpx.c,v 1.24 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
@@ -385,7 +385,7 @@ bad3:
bad2:
vax_unmap_physmem((vaddr_t)scr->ss_adder, 1);
bad1:
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/vax/vsa/lcg.c b/sys/arch/vax/vsa/lcg.c
index 26d27a9fab8..c3f608ba21e 100644
--- a/sys/arch/vax/vsa/lcg.c
+++ b/sys/arch/vax/vsa/lcg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lcg.c,v 1.21 2013/10/21 10:36:21 miod Exp $ */
+/* $OpenBSD: lcg.c,v 1.22 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
@@ -317,7 +317,7 @@ fail3:
fail2:
vax_unmap_physmem((vaddr_t)ss->ss_addr, ss->ss_fbsize / VAX_NBPG);
fail1:
- free(ss, M_DEVBUF);
+ free(ss, M_DEVBUF, 0);
}
/*
diff --git a/sys/arch/vax/vsa/lcspx.c b/sys/arch/vax/vsa/lcspx.c
index 90a1b43b72b..131a88fc5db 100644
--- a/sys/arch/vax/vsa/lcspx.c
+++ b/sys/arch/vax/vsa/lcspx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lcspx.c,v 1.19 2013/10/21 10:36:21 miod Exp $ */
+/* $OpenBSD: lcspx.c,v 1.20 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
@@ -367,7 +367,7 @@ fail2:
vax_unmap_physmem((vaddr_t)ss->ss_ramdac[i], 1);
vax_unmap_physmem(ss->ss_reg, LCSPX_REG_SIZE / VAX_NBPG);
fail1:
- free(ss, M_DEVBUF);
+ free(ss, M_DEVBUF, 0);
}
static __inline__ void
diff --git a/sys/arch/vax/vsa/smg.c b/sys/arch/vax/vsa/smg.c
index 8b24196b465..768f33b6b3a 100644
--- a/sys/arch/vax/vsa/smg.c
+++ b/sys/arch/vax/vsa/smg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smg.c,v 1.26 2013/10/21 10:36:21 miod Exp $ */
+/* $OpenBSD: smg.c,v 1.27 2014/07/12 18:44:43 tedu Exp $ */
/* $NetBSD: smg.c,v 1.21 2000/03/23 06:46:44 thorpej Exp $ */
/*
* Copyright (c) 2006, Miodrag Vallat
@@ -294,7 +294,7 @@ smg_attach(struct device *parent, struct device *self, void *aux)
(caddr_t)vax_map_physmem(SMADDR, SMSIZE / VAX_NBPG);
if (scr->ss_addr == NULL) {
printf(": can not map frame buffer\n");
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
return;
}
@@ -304,7 +304,7 @@ smg_attach(struct device *parent, struct device *self, void *aux)
printf(": can not map cursor chip\n");
vax_unmap_physmem((vaddr_t)scr->ss_addr,
SMSIZE / VAX_NBPG);
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
return;
}
@@ -313,7 +313,7 @@ smg_attach(struct device *parent, struct device *self, void *aux)
vax_unmap_physmem((vaddr_t)scr->ss_cursor, 1);
vax_unmap_physmem((vaddr_t)scr->ss_addr,
SMSIZE / VAX_NBPG);
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
return;
}
}
diff --git a/sys/arch/zaurus/dev/zaurus_flash.c b/sys/arch/zaurus/dev/zaurus_flash.c
index 8ded12ef0c5..1a474642718 100644
--- a/sys/arch/zaurus/dev/zaurus_flash.c
+++ b/sys/arch/zaurus/dev/zaurus_flash.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zaurus_flash.c,v 1.12 2014/05/08 21:17:01 miod Exp $ */
+/* $OpenBSD: zaurus_flash.c,v 1.13 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@openbsd.org>
@@ -583,15 +583,15 @@ zflash_write_strategy(struct zflash_softc *sc, struct buf *bp,
}
bp->b_resid = bp->b_bcount - sc->sc_flash.sc_flashdev->pagesize;
- free(oob, M_DEVBUF);
- free(buf, M_DEVBUF);
+ free(oob, M_DEVBUF, 0);
+ free(buf, M_DEVBUF, 0);
return;
bad:
bp->b_flags |= B_ERROR;
if (oob != NULL)
- free(oob, M_DEVBUF);
+ free(oob, M_DEVBUF, 0);
if (buf != NULL)
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
}
int
@@ -650,7 +650,7 @@ zflash_safe_start(struct zflash_softc *sc, dev_t dev)
phyuse = (u_int16_t *)malloc(sp->sp_pblks * sizeof(u_int16_t),
M_DEVBUF, M_NOWAIT);
if (phyuse == NULL) {
- free(sp, M_DEVBUF);
+ free(sp, M_DEVBUF, 0);
return ENOMEM;
}
sp->sp_phyuse = phyuse;
@@ -659,8 +659,8 @@ zflash_safe_start(struct zflash_softc *sc, dev_t dev)
logmap = (u_int *)malloc(sp->sp_lblks * sizeof(u_int),
M_DEVBUF, M_NOWAIT);
if (logmap == NULL) {
- free(phyuse, M_DEVBUF);
- free(sp, M_DEVBUF);
+ free(phyuse, M_DEVBUF, 0);
+ free(sp, M_DEVBUF, 0);
return ENOMEM;
}
sp->sp_logmap = logmap;
@@ -747,9 +747,9 @@ zflash_safe_stop(struct zflash_softc *sc, dev_t dev)
return;
sp = sc->sc_safe[part];
- free(sp->sp_phyuse, M_DEVBUF);
- free(sp->sp_logmap, M_DEVBUF);
- free(sp, M_DEVBUF);
+ free(sp->sp_phyuse, M_DEVBUF, 0);
+ free(sp->sp_logmap, M_DEVBUF, 0);
+ free(sp, M_DEVBUF, 0);
sc->sc_safe[part] = NULL;
}
diff --git a/sys/arch/zaurus/stand/zboot/diskprobe.c b/sys/arch/zaurus/stand/zboot/diskprobe.c
index c776b372c75..9f04963575e 100644
--- a/sys/arch/zaurus/stand/zboot/diskprobe.c
+++ b/sys/arch/zaurus/stand/zboot/diskprobe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diskprobe.c,v 1.3 2006/10/13 00:00:55 krw Exp $ */
+/* $OpenBSD: diskprobe.c,v 1.4 2014/07/12 18:44:43 tedu Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -74,7 +74,7 @@ hardprobe(void)
bzero(dip, sizeof(*dip));
if (bios_getdiskinfo(order[i], &dip->bios_info) != NULL) {
- free(dip, 0);
+ free(dip, 0, 0);
continue;
}