summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/acpi/acpi.c16
-rw-r--r--sys/dev/acpi/acpicpu.c4
-rw-r--r--sys/dev/acpi/acpimadt.c4
-rw-r--r--sys/dev/acpi/atk0110.c4
-rw-r--r--sys/dev/acpi/dsdt.c4
-rw-r--r--sys/dev/ata/atascsi.c12
-rw-r--r--sys/dev/ata/wd.c4
-rw-r--r--sys/dev/audio.c6
-rw-r--r--sys/dev/bio.c4
-rw-r--r--sys/dev/cardbus/cardbus.c10
-rw-r--r--sys/dev/cardbus/cardbus_exrom.c4
-rw-r--r--sys/dev/diskmap.c6
-rw-r--r--sys/dev/firmload.c6
-rw-r--r--sys/dev/gpio/gpio.c6
-rw-r--r--sys/dev/ic/aac.c12
-rw-r--r--sys/dev/ic/ac97.c4
-rw-r--r--sys/dev/ic/acx.c10
-rw-r--r--sys/dev/ic/ahci.c10
-rw-r--r--sys/dev/ic/aic79xx.c40
-rw-r--r--sys/dev/ic/aic79xx_openbsd.c4
-rw-r--r--sys/dev/ic/aic7xxx.c26
-rw-r--r--sys/dev/ic/aic7xxx_openbsd.c4
-rw-r--r--sys/dev/ic/aic7xxx_seeprom.c6
-rw-r--r--sys/dev/ic/ami.c18
-rw-r--r--sys/dev/ic/ar5008.c4
-rw-r--r--sys/dev/ic/ar5210.c4
-rw-r--r--sys/dev/ic/ar5211.c4
-rw-r--r--sys/dev/ic/ar5212.c6
-rw-r--r--sys/dev/ic/ar5xxx.c6
-rw-r--r--sys/dev/ic/ar9003.c6
-rw-r--r--sys/dev/ic/ath.c8
-rw-r--r--sys/dev/ic/athn.c4
-rw-r--r--sys/dev/ic/atw.c6
-rw-r--r--sys/dev/ic/bwi.c8
-rw-r--r--sys/dev/ic/cac.c4
-rw-r--r--sys/dev/ic/ciss.c4
-rw-r--r--sys/dev/ic/dc.c4
-rw-r--r--sys/dev/ic/fxp.c4
-rw-r--r--sys/dev/ic/i82365.c12
-rw-r--r--sys/dev/ic/i82596.c4
-rw-r--r--sys/dev/ic/if_wi.c8
-rw-r--r--sys/dev/ic/if_wi_hostap.c12
-rw-r--r--sys/dev/ic/malo.c12
-rw-r--r--sys/dev/ic/mfi.c40
-rw-r--r--sys/dev/ic/mpi.c28
-rw-r--r--sys/dev/ic/ncr53c9x.c4
-rw-r--r--sys/dev/ic/nvme.c12
-rw-r--r--sys/dev/ic/pgt.c30
-rw-r--r--sys/dev/ic/qla.c32
-rw-r--r--sys/dev/ic/qlw.c10
-rw-r--r--sys/dev/ic/rt2560.c6
-rw-r--r--sys/dev/ic/rt2661.c10
-rw-r--r--sys/dev/ic/rt2860.c4
-rw-r--r--sys/dev/ic/rtw.c8
-rw-r--r--sys/dev/ic/sili.c12
-rw-r--r--sys/dev/ic/siop.c20
-rw-r--r--sys/dev/ic/sti.c10
-rw-r--r--sys/dev/ic/tcic2.c4
-rw-r--r--sys/dev/ic/ti.c10
-rw-r--r--sys/dev/ic/trm.c4
-rw-r--r--sys/dev/ic/vga.c8
-rw-r--r--sys/dev/ic/wd33c93.c6
-rw-r--r--sys/dev/ic/wdc.c6
-rw-r--r--sys/dev/ipmi.c10
-rw-r--r--sys/dev/isa/fd.c6
-rw-r--r--sys/dev/isa/gus.c6
-rw-r--r--sys/dev/isa/isa.c8
-rw-r--r--sys/dev/isa/isadma.c4
-rw-r--r--sys/dev/isa/isapnp.c10
-rw-r--r--sys/dev/isa/isapnpres.c8
-rw-r--r--sys/dev/isa/spkr.c4
-rw-r--r--sys/dev/microcode/aic7xxx/aicasm_symbol.c26
-rw-r--r--sys/dev/microcode/bnx/build.c6
-rw-r--r--sys/dev/microcode/bwi/build/build.c8
-rw-r--r--sys/dev/microcode/bwi/extract/extract.c8
-rw-r--r--sys/dev/microcode/kue/build.c4
-rw-r--r--sys/dev/microcode/myx/build.c4
-rw-r--r--sys/dev/microcode/tigon/build.c4
-rw-r--r--sys/dev/microcode/yds/build.c4
-rw-r--r--sys/dev/onewire/onewire.c4
-rw-r--r--sys/dev/onewire/owctr.c4
-rw-r--r--sys/dev/pci/agp.c18
-rw-r--r--sys/dev/pci/agp_amd.c6
-rw-r--r--sys/dev/pci/agp_i810.c16
-rw-r--r--sys/dev/pci/ahd_pci.c4
-rw-r--r--sys/dev/pci/arc.c32
-rw-r--r--sys/dev/pci/auacer.c6
-rw-r--r--sys/dev/pci/auglx.c6
-rw-r--r--sys/dev/pci/auich.c6
-rw-r--r--sys/dev/pci/auixp.c8
-rw-r--r--sys/dev/pci/autri.c6
-rw-r--r--sys/dev/pci/auvia.c6
-rw-r--r--sys/dev/pci/azalia.c26
-rw-r--r--sys/dev/pci/azalia_codec.c6
-rw-r--r--sys/dev/pci/cmpci.c6
-rw-r--r--sys/dev/pci/cs4280.c12
-rw-r--r--sys/dev/pci/cs4281.c8
-rw-r--r--sys/dev/pci/drm/drmP.h6
-rw-r--r--sys/dev/pci/drm/drm_drv.c6
-rw-r--r--sys/dev/pci/drm/drm_edid.c6
-rw-r--r--sys/dev/pci/drm/drm_mem_util.h6
-rw-r--r--sys/dev/pci/drm/drm_memory.c6
-rw-r--r--sys/dev/pci/drm/i915/i915_gem.c4
-rw-r--r--sys/dev/pci/drm/i915/i915_gem_context.c4
-rw-r--r--sys/dev/pci/drm/i915/i915_gem_execbuffer.c6
-rw-r--r--sys/dev/pci/drm/i915/i915_irq.c8
-rw-r--r--sys/dev/pci/drm/i915/intel_hdmi.c8
-rw-r--r--sys/dev/pci/drm/i915/intel_modes.c4
-rw-r--r--sys/dev/pci/drm/radeon/ni.c10
-rw-r--r--sys/dev/pci/drm/radeon/r100.c4
-rw-r--r--sys/dev/pci/drm/radeon/r600.c8
-rw-r--r--sys/dev/pci/drm/radeon/radeon_ttm.c10
-rw-r--r--sys/dev/pci/drm/radeon/si.c12
-rw-r--r--sys/dev/pci/eap.c6
-rw-r--r--sys/dev/pci/emuxki.c16
-rw-r--r--sys/dev/pci/esa.c10
-rw-r--r--sys/dev/pci/eso.c6
-rw-r--r--sys/dev/pci/fms.c6
-rw-r--r--sys/dev/pci/hifn7751.c16
-rw-r--r--sys/dev/pci/if_bge.c4
-rw-r--r--sys/dev/pci/if_bnx.c12
-rw-r--r--sys/dev/pci/if_em.c6
-rw-r--r--sys/dev/pci/if_ipw.c8
-rw-r--r--sys/dev/pci/if_iwi.c6
-rw-r--r--sys/dev/pci/if_iwn.c14
-rw-r--r--sys/dev/pci/if_ix.c14
-rw-r--r--sys/dev/pci/if_ixgb.c6
-rw-r--r--sys/dev/pci/if_msk.c4
-rw-r--r--sys/dev/pci/if_myx.c4
-rw-r--r--sys/dev/pci/if_nxe.c18
-rw-r--r--sys/dev/pci/if_oce.c38
-rw-r--r--sys/dev/pci/if_san_common.c6
-rw-r--r--sys/dev/pci/if_san_xilinx.c8
-rw-r--r--sys/dev/pci/if_sandrv.c8
-rw-r--r--sys/dev/pci/if_sk.c4
-rw-r--r--sys/dev/pci/if_tht.c10
-rw-r--r--sys/dev/pci/if_txp.c18
-rw-r--r--sys/dev/pci/if_vic.c6
-rw-r--r--sys/dev/pci/if_vio.c4
-rw-r--r--sys/dev/pci/if_wpi.c12
-rw-r--r--sys/dev/pci/ips.c8
-rw-r--r--sys/dev/pci/isp_pci.c22
-rw-r--r--sys/dev/pci/lofn.c8
-rw-r--r--sys/dev/pci/maestro.c4
-rw-r--r--sys/dev/pci/mfii.c8
-rw-r--r--sys/dev/pci/mpii.c52
-rw-r--r--sys/dev/pci/nofn.c8
-rw-r--r--sys/dev/pci/pccbb.c6
-rw-r--r--sys/dev/pci/pci.c4
-rw-r--r--sys/dev/pci/pciide.c4
-rw-r--r--sys/dev/pci/ppb.c8
-rw-r--r--sys/dev/pci/qle.c34
-rw-r--r--sys/dev/pci/safe.c8
-rw-r--r--sys/dev/pci/sv.c6
-rw-r--r--sys/dev/pci/ubsec.c16
-rw-r--r--sys/dev/pci/vga_pci_common.c2
-rw-r--r--sys/dev/pci/virtio.c4
-rw-r--r--sys/dev/pci/vmwpvs.c8
-rw-r--r--sys/dev/pci/yds.c16
-rw-r--r--sys/dev/pckbc/pms.c14
-rw-r--r--sys/dev/pcmcia/cfxga.c10
-rw-r--r--sys/dev/pcmcia/if_malo.c12
-rw-r--r--sys/dev/pcmcia/if_xe.c4
-rw-r--r--sys/dev/pcmcia/pcmcia_cis.c4
-rw-r--r--sys/dev/pcmcia/pcmcia_cis_quirks.c6
-rw-r--r--sys/dev/rasops/rasops.c8
-rw-r--r--sys/dev/rd.c4
-rw-r--r--sys/dev/rnd.c6
-rw-r--r--sys/dev/sbus/cs4231.c6
-rw-r--r--sys/dev/sbus/isp_sbus.c12
-rw-r--r--sys/dev/sbus/magma.c4
-rw-r--r--sys/dev/sbus/qla_sbus.c4
-rw-r--r--sys/dev/sdmmc/sdhc.c4
-rw-r--r--sys/dev/sdmmc/sdmmc.c6
-rw-r--r--sys/dev/sdmmc/sdmmc_io.c4
-rw-r--r--sys/dev/sdmmc/sdmmc_mem.c4
-rw-r--r--sys/dev/sdmmc/sdmmc_scsi.c12
-rw-r--r--sys/dev/softraid.c76
-rw-r--r--sys/dev/softraid_aoe.c16
-rw-r--r--sys/dev/softraid_crypto.c24
-rw-r--r--sys/dev/softraid_raid6.c4
-rw-r--r--sys/dev/systrace.c18
-rw-r--r--sys/dev/tc/bba.c4
-rw-r--r--sys/dev/usb/ezload.c4
-rw-r--r--sys/dev/usb/hid.c4
-rw-r--r--sys/dev/usb/hidkbd.c4
-rw-r--r--sys/dev/usb/if_athn_usb.c8
-rw-r--r--sys/dev/usb/if_atu.c12
-rw-r--r--sys/dev/usb/if_kue.c12
-rw-r--r--sys/dev/usb/if_otus.c6
-rw-r--r--sys/dev/usb/if_rsu.c4
-rw-r--r--sys/dev/usb/if_rum.c4
-rw-r--r--sys/dev/usb/if_run.c6
-rw-r--r--sys/dev/usb/if_uath.c4
-rw-r--r--sys/dev/usb/if_upgt.c4
-rw-r--r--sys/dev/usb/if_urndis.c26
-rw-r--r--sys/dev/usb/if_urtwn.c4
-rw-r--r--sys/dev/usb/if_wi_usb.c6
-rw-r--r--sys/dev/usb/if_zyd.c6
-rw-r--r--sys/dev/usb/uaudio.c26
-rw-r--r--sys/dev/usb/ubcmtp.c10
-rw-r--r--sys/dev/usb/ubsa.c6
-rw-r--r--sys/dev/usb/uchcom.c4
-rw-r--r--sys/dev/usb/ucycom.c6
-rw-r--r--sys/dev/usb/udl.c10
-rw-r--r--sys/dev/usb/ugen.c26
-rw-r--r--sys/dev/usb/uhci.c10
-rw-r--r--sys/dev/usb/uhid.c4
-rw-r--r--sys/dev/usb/uhidev.c14
-rw-r--r--sys/dev/usb/uhub.c18
-rw-r--r--sys/dev/usb/ulpt.c4
-rw-r--r--sys/dev/usb/umass.c4
-rw-r--r--sys/dev/usb/umct.c6
-rw-r--r--sys/dev/usb/umidi.c12
-rw-r--r--sys/dev/usb/umsm.c6
-rw-r--r--sys/dev/usb/uoaklux.c4
-rw-r--r--sys/dev/usb/uoakrh.c4
-rw-r--r--sys/dev/usb/uoakv.c4
-rw-r--r--sys/dev/usb/upd.c6
-rw-r--r--sys/dev/usb/uplcom.c6
-rw-r--r--sys/dev/usb/urio.c4
-rw-r--r--sys/dev/usb/usb.c8
-rw-r--r--sys/dev/usb/usb_mem.c6
-rw-r--r--sys/dev/usb/usb_subr.c34
-rw-r--r--sys/dev/usb/usbdi.c6
-rw-r--r--sys/dev/usb/usbf_subr.c30
-rw-r--r--sys/dev/usb/usps.c6
-rw-r--r--sys/dev/usb/uticom.c12
-rw-r--r--sys/dev/usb/utrh.c4
-rw-r--r--sys/dev/usb/uts.c6
-rw-r--r--sys/dev/usb/utwitch.c4
-rw-r--r--sys/dev/usb/uvideo.c24
-rw-r--r--sys/dev/usb/uvscom.c6
-rw-r--r--sys/dev/video.c4
-rw-r--r--sys/dev/vmt.c4
-rw-r--r--sys/dev/vnd.c8
-rw-r--r--sys/dev/vscsi.c4
-rw-r--r--sys/dev/wscons/wsdisplay.c16
-rw-r--r--sys/dev/wscons/wsdisplay_compat_usl.c6
-rw-r--r--sys/dev/wscons/wsemul_dumb.c4
-rw-r--r--sys/dev/wscons/wsemul_sun.c4
-rw-r--r--sys/dev/wscons/wsemul_vt100.c6
-rw-r--r--sys/dev/wscons/wsevent.c4
-rw-r--r--sys/dev/wscons/wskbd.c6
-rw-r--r--sys/dev/wscons/wskbdutil.c4
-rw-r--r--sys/dev/wscons/wsmux.c4
-rw-r--r--sys/dev/wsfont/wsfont.c12
247 files changed, 1159 insertions, 1159 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index b680f28487b..c5c920fefbc 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.264 2014/07/12 09:02:24 kettenis Exp $ */
+/* $OpenBSD: acpi.c,v 1.265 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -512,13 +512,13 @@ acpi_getpci(struct aml_node *node, void *arg)
/* Check if PCI device exists */
if (pci->dev > 0x1F || pci->fun > 7) {
- free(pci, M_DEVBUF);
+ free(pci, M_DEVBUF, 0);
return (1);
}
tag = pci_make_tag(pc, pci->bus, pci->dev, pci->fun);
reg = pci_conf_read(pc, tag, PCI_ID_REG);
if (PCI_VENDOR(reg) == PCI_VENDOR_INVALID) {
- free(pci, M_DEVBUF);
+ free(pci, M_DEVBUF, 0);
return (1);
}
node->pci = pci;
@@ -1069,7 +1069,7 @@ acpi_loadtables(struct acpi_softc *sc, struct acpi_rsdp *rsdp)
acpi_maptable(sc, xsdt->table_offsets[i], NULL, NULL,
NULL, 1);
- free(sdt, M_DEVBUF);
+ free(sdt, M_DEVBUF, 0);
} else {
struct acpi_rsdt *rsdt;
@@ -1088,7 +1088,7 @@ acpi_loadtables(struct acpi_softc *sc, struct acpi_rsdp *rsdp)
acpi_maptable(sc, rsdt->table_offsets[i], NULL, NULL,
NULL, 1);
- free(sdt, M_DEVBUF);
+ free(sdt, M_DEVBUF, 0);
}
return (0);
@@ -1418,7 +1418,7 @@ acpi_dotask(struct acpi_softc *sc)
wq->handler(wq->arg0, wq->arg1);
- free(wq, M_DEVBUF);
+ free(wq, M_DEVBUF, 0);
/* We did something */
return (1);
@@ -1893,7 +1893,7 @@ acpi_foundprw(struct aml_node *node, void *arg)
wq->q_wakepkg = malloc(sizeof(struct aml_value), M_DEVBUF,
M_NOWAIT | M_ZERO);
if (wq->q_wakepkg == NULL) {
- free(wq, M_DEVBUF);
+ free(wq, M_DEVBUF, 0);
return 0;
}
dnprintf(10, "Found _PRW (%s)\n", node->parent->name);
@@ -2310,7 +2310,7 @@ acpi_thread(void *arg)
while(acpi_dotask(acpi_softc))
;
}
- free(thread, M_DEVBUF);
+ free(thread, M_DEVBUF, 0);
kthread_exit(0);
}
diff --git a/sys/dev/acpi/acpicpu.c b/sys/dev/acpi/acpicpu.c
index abd7ed78fa6..56eae560a76 100644
--- a/sys/dev/acpi/acpicpu.c
+++ b/sys/dev/acpi/acpicpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpicpu.c,v 1.59 2014/07/11 14:33:45 kettenis Exp $ */
+/* $OpenBSD: acpicpu.c,v 1.60 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
@@ -606,7 +606,7 @@ acpicpu_getpss(struct acpicpu_softc *sc)
}
if (sc->sc_pss)
- free(sc->sc_pss, M_DEVBUF);
+ free(sc->sc_pss, M_DEVBUF, 0);
sc->sc_pss = malloc(res.length * sizeof *sc->sc_pss, M_DEVBUF,
M_WAITOK | M_ZERO);
diff --git a/sys/dev/acpi/acpimadt.c b/sys/dev/acpi/acpimadt.c
index fb879305f7e..c285986c09c 100644
--- a/sys/dev/acpi/acpimadt.c
+++ b/sys/dev/acpi/acpimadt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpimadt.c,v 1.28 2014/07/06 21:36:55 kettenis Exp $ */
+/* $OpenBSD: acpimadt.c,v 1.29 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2006 Mark Kettenis <kettenis@openbsd.org>
*
@@ -330,7 +330,7 @@ acpimadt_attach(struct device *parent, struct device *self, void *aux)
if (!acpimadt_cfg_intr(entry->madt_override.flags, &map->redir)) {
printf("%s: bogus override for pin %d\n",
self->dv_xname, pin);
- free(map, M_DEVBUF);
+ free(map, M_DEVBUF, 0);
break;
}
diff --git a/sys/dev/acpi/atk0110.c b/sys/dev/acpi/atk0110.c
index ef9aec19385..e8cc6533fb4 100644
--- a/sys/dev/acpi/atk0110.c
+++ b/sys/dev/acpi/atk0110.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atk0110.c,v 1.9 2014/05/21 02:14:07 mlarkin Exp $ */
+/* $OpenBSD: atk0110.c,v 1.10 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2009 Constantine A. Murenin <cnst+openbsd@bugmail.mojo.ru>
@@ -330,7 +330,7 @@ aibs_add_sensor(struct aibs_softc *sc, char *name)
printf("%s: aibs_add_sensor: %s: unknown sensor type %llx\n",
DEVNAME(sc), name, ri.v_package[0]->v_integer);
aml_freevalue(&ri);
- free(as, M_DEVBUF);
+ free(as, M_DEVBUF, 0);
return;
}
strlcpy(as->s.desc, ri.v_package[1]->v_string,
diff --git a/sys/dev/acpi/dsdt.c b/sys/dev/acpi/dsdt.c
index 6f187c5b078..89179f9fae6 100644
--- a/sys/dev/acpi/dsdt.c
+++ b/sys/dev/acpi/dsdt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dsdt.c,v 1.211 2014/06/25 18:56:22 kettenis Exp $ */
+/* $OpenBSD: dsdt.c,v 1.212 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
*
@@ -452,7 +452,7 @@ _acpi_os_free(void *ptr, const char *fn, int line)
#endif
dnprintf(99, "free: %p %s:%d\n", sptr, fn, line);
- free(sptr, M_ACPI);
+ free(sptr, M_ACPI, 0);
}
}
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c
index 6c6ba32bdd5..bd75eece59f 100644
--- a/sys/dev/ata/atascsi.c
+++ b/sys/dev/ata/atascsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atascsi.c,v 1.118 2013/12/09 11:44:52 dlg Exp $ */
+/* $OpenBSD: atascsi.c,v 1.119 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -216,8 +216,8 @@ atascsi_detach(struct atascsi *as, int flags)
if (rv != 0)
return (rv);
- free(as->as_host_ports, M_DEVBUF);
- free(as, M_DEVBUF);
+ free(as->as_host_ports, M_DEVBUF, 0);
+ free(as, M_DEVBUF, 0);
return (0);
}
@@ -437,7 +437,7 @@ atascsi_probe(struct scsi_link *link)
return (0);
error:
- free(ap, M_DEVBUF);
+ free(ap, M_DEVBUF, 0);
unsupported:
as->as_methods->free(as->as_cookie, port, link->lun);
@@ -464,7 +464,7 @@ atascsi_free(struct scsi_link *link)
return;
ap = ahp->ahp_ports[link->lun];
- free(ap, M_DEVBUF);
+ free(ap, M_DEVBUF, 0);
ahp->ahp_ports[link->lun] = NULL;
as->as_methods->free(as->as_cookie, port, link->lun);
@@ -474,7 +474,7 @@ atascsi_free(struct scsi_link *link)
* free ahp itself. this relies on the order luns are
* detached in scsi_detach_target().
*/
- free(ahp, M_DEVBUF);
+ free(ahp, M_DEVBUF, 0);
as->as_host_ports[port] = NULL;
}
}
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c
index 04ccdc8d872..3b0c33b0cec 100644
--- a/sys/dev/ata/wd.c
+++ b/sys/dev/ata/wd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd.c,v 1.115 2014/07/10 14:21:20 deraadt Exp $ */
+/* $OpenBSD: wd.c,v 1.116 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */
/*
@@ -781,7 +781,7 @@ wdioctl(dev_t dev, u_long xfer, caddr_t addr, int flag, struct proc *p)
lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
wdgetdisklabel(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:
diff --git a/sys/dev/audio.c b/sys/dev/audio.c
index f29f69af426..a9fa22b6496 100644
--- a/sys/dev/audio.c
+++ b/sys/dev/audio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: audio.c,v 1.121 2014/05/19 07:00:15 ratchov Exp $ */
+/* $OpenBSD: audio.c,v 1.122 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: audio.c,v 1.119 1999/11/09 16:50:47 augustss Exp $ */
/*
@@ -715,7 +715,7 @@ audio_free_ring(struct audio_softc *sc, struct audio_ringbuffer *r)
if (sc->hw_if->freem) {
sc->hw_if->freem(sc->hw_hdl, r->start, M_DEVBUF);
} else {
- free(r->start, M_DEVBUF);
+ free(r->start, M_DEVBUF, 0);
}
}
@@ -3269,7 +3269,7 @@ mixer_remove(struct audio_softc *sc, struct proc *p)
if ((*pm)->proc == p) {
m = *pm;
*pm = m->next;
- free(m, M_DEVBUF);
+ free(m, M_DEVBUF, 0);
return;
}
}
diff --git a/sys/dev/bio.c b/sys/dev/bio.c
index 9fa89ddfd7c..42956d5820b 100644
--- a/sys/dev/bio.c
+++ b/sys/dev/bio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bio.c,v 1.14 2012/01/20 12:38:20 jsing Exp $ */
+/* $OpenBSD: bio.c,v 1.15 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2002 Niklas Hallqvist. All rights reserved.
@@ -134,7 +134,7 @@ bio_unregister(struct device *dev)
if (dev == bm->bm_dev) {
LIST_REMOVE(bm, bm_link);
- free(bm, M_DEVBUF);
+ free(bm, M_DEVBUF, 0);
}
}
}
diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c
index 4e8d4d814e8..3534040a5ac 100644
--- a/sys/dev/cardbus/cardbus.c
+++ b/sys/dev/cardbus/cardbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cardbus.c,v 1.46 2013/05/30 16:15:01 deraadt Exp $ */
+/* $OpenBSD: cardbus.c,v 1.47 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: cardbus.c,v 1.24 2000/04/02 19:11:37 mycroft Exp $ */
/*
@@ -241,7 +241,7 @@ cardbus_read_tuples(struct cardbus_attach_args *ca, pcireg_t cis_ptr,
out:
while ((p = SIMPLEQ_FIRST(&rom_image)) != NULL) {
SIMPLEQ_REMOVE_HEAD(&rom_image, next);
- free(p, M_DEVBUF);
+ free(p, M_DEVBUF, 0);
}
exrom = pci_conf_read(pc, tag, reg);
pci_conf_write(pc, tag, reg, exrom & ~1);
@@ -537,7 +537,7 @@ cardbus_attach_card(struct cardbus_softc *sc)
cardbussubmatch)) == NULL) {
/* do not match */
disable_function(sc, function);
- free(ct, M_DEVBUF);
+ free(ct, M_DEVBUF, 0);
*previous_next = NULL;
} else {
/* found */
@@ -551,7 +551,7 @@ cardbus_attach_card(struct cardbus_softc *sc)
* if no functions were attached).
*/
disable_function(sc, 8);
- free(tuple, M_TEMP);
+ free(tuple, M_TEMP, 0);
return (no_work_funcs);
}
@@ -625,7 +625,7 @@ cardbus_detach_card(struct cardbus_softc *sc)
} else {
sc->sc_poweron_func &= ~(1 << ct->ct_func);
*prev_next = ct->ct_next;
- free(ct, M_DEVBUF);
+ free(ct, M_DEVBUF, 0);
}
}
diff --git a/sys/dev/cardbus/cardbus_exrom.c b/sys/dev/cardbus/cardbus_exrom.c
index 41402f31078..ee1b27ea952 100644
--- a/sys/dev/cardbus/cardbus_exrom.c
+++ b/sys/dev/cardbus/cardbus_exrom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cardbus_exrom.c,v 1.5 2013/06/20 09:52:09 mpi Exp $ */
+/* $OpenBSD: cardbus_exrom.c,v 1.6 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: cardbus_exrom.c,v 1.4 2000/02/03 06:47:31 thorpej Exp $ */
/*
@@ -139,7 +139,7 @@ cardbus_read_exrom(bus_space_tag_t romt, bus_space_handle_t romh,
if (bus_space_subregion(romt, romh, addr,
image_size, &image->romh)) {
DPRINTF(("%s: bus_space_subregion failed", __func__));
- free(image, M_DEVBUF);
+ free(image, M_DEVBUF, 0);
return (1);
}
SIMPLEQ_INSERT_TAIL(head, image, next);
diff --git a/sys/dev/diskmap.c b/sys/dev/diskmap.c
index 8cd3182a342..124f28d0e5d 100644
--- a/sys/dev/diskmap.c
+++ b/sys/dev/diskmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diskmap.c,v 1.7 2012/04/22 05:43:14 guenther Exp $ */
+/* $OpenBSD: diskmap.c,v 1.8 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2009, 2010 Joel Sing <jsing@openbsd.org>
@@ -118,7 +118,7 @@ diskmapioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
FRELE(fp, p);
fdpunlock(fdp);
- free(devname, M_DEVBUF);
+ free(devname, M_DEVBUF, 0);
return 0;
@@ -131,7 +131,7 @@ bad:
fdpunlock(fdp);
invalid:
- free(devname, M_DEVBUF);
+ free(devname, M_DEVBUF, 0);
return (error);
}
diff --git a/sys/dev/firmload.c b/sys/dev/firmload.c
index 4c150f368ce..936af9fcfc7 100644
--- a/sys/dev/firmload.c
+++ b/sys/dev/firmload.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: firmload.c,v 1.10 2011/03/23 16:09:19 marco Exp $ */
+/* $OpenBSD: firmload.c,v 1.11 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2004 Theo de Raadt <deraadt@openbsd.org>
@@ -102,12 +102,12 @@ loadfirmware(const char *name, u_char **bufp, size_t *buflen)
*bufp = ptr;
*buflen = va.va_size;
} else
- free(ptr, M_DEVBUF);
+ free(ptr, M_DEVBUF, 0);
fail:
vput(nid.ni_vp);
err:
if (path)
- free(path, M_TEMP);
+ free(path, M_TEMP, 0);
return (error);
}
diff --git a/sys/dev/gpio/gpio.c b/sys/dev/gpio/gpio.c
index 0bca78d5c6b..7ccf7346810 100644
--- a/sys/dev/gpio/gpio.c
+++ b/sys/dev/gpio/gpio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gpio.c,v 1.12 2011/10/03 20:24:51 matthieu Exp $ */
+/* $OpenBSD: gpio.c,v 1.13 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org>
@@ -427,7 +427,7 @@ gpioioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
== 0) {
if (config_detach(gdev->sc_dev, 0) == 0) {
LIST_REMOVE(gdev, sc_next);
- free(gdev, M_DEVBUF);
+ free(gdev, M_DEVBUF, 0);
}
break;
}
@@ -504,7 +504,7 @@ gpioioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
LIST_FOREACH(nm, &sc->sc_names, gp_next) {
if (nm->gp_pin == pin) {
LIST_REMOVE(nm, gp_next);
- free(nm, M_DEVBUF);
+ free(nm, M_DEVBUF, 0);
break;
}
}
diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c
index d59dfd0176b..37dcde32940 100644
--- a/sys/dev/ic/aac.c
+++ b/sys/dev/ic/aac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aac.c,v 1.63 2014/07/08 17:19:25 deraadt Exp $ */
+/* $OpenBSD: aac.c,v 1.64 2014/07/12 18:48:17 tedu Exp $ */
/*-
* Copyright (c) 2000 Michael Smith
@@ -470,7 +470,7 @@ aac_free(struct aac_softc *sc)
if (sc->aac_fib_dmat)
bus_dma_tag_destroy(sc->aac_fib_dmat);
- free(sc->aac_commands, M_AACBUF);
+ free(sc->aac_commands, M_AACBUF, 0);
/* destroy the common area */
if (sc->aac_common) {
@@ -526,7 +526,7 @@ aac_detach(device_t dev)
if (error)
return (error);
TAILQ_REMOVE(&sc->aac_container_tqh, co, co_link);
- free(co, M_AACBUF);
+ free(co, M_AACBUF, 0);
}
/* Remove the CAM SIMs */
@@ -535,7 +535,7 @@ aac_detach(device_t dev)
error = device_delete_child(dev, sim->sim_dev);
if (error)
return (error);
- free(sim, M_AACBUF);
+ free(sim, M_AACBUF, 0);
}
if (sc->aifflags & AAC_AIFFLAGS_RUNNING) {
@@ -1267,7 +1267,7 @@ aac_alloc_commands(struct aac_softc *sc)
exit_map:
bus_dmamem_free(sc->aac_dmat, &fm->aac_seg, fm->aac_nsegs);
exit_alloc:
- free(fm, M_DEVBUF);
+ free(fm, M_DEVBUF, 0);
exit:
AAC_LOCK_RELEASE(&sc->aac_io_lock);
return (error);
@@ -1301,7 +1301,7 @@ aac_free_commands(struct aac_softc *sc)
bus_dmamem_unmap(sc->aac_dmat, (caddr_t)fm->aac_fibs,
AAC_FIBMAP_SIZE);
bus_dmamem_free(sc->aac_dmat, &fm->aac_seg, fm->aac_nsegs);
- free(fm, M_DEVBUF);
+ free(fm, M_DEVBUF, 0);
}
}
diff --git a/sys/dev/ic/ac97.c b/sys/dev/ic/ac97.c
index a3f81f9144c..27d4ece9585 100644
--- a/sys/dev/ic/ac97.c
+++ b/sys/dev/ic/ac97.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ac97.c,v 1.77 2011/01/03 15:28:46 fgsch Exp $ */
+/* $OpenBSD: ac97.c,v 1.78 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 1999, 2000 Constantine Sapuntzakis
@@ -818,7 +818,7 @@ ac97_attach(struct ac97_host_if *host_if)
as->host_if = host_if;
if ((error = host_if->attach(host_if->arg, &as->codec_if))) {
- free(as, M_DEVBUF);
+ free(as, M_DEVBUF, 0);
return (error);
}
diff --git a/sys/dev/ic/acx.c b/sys/dev/ic/acx.c
index 96b0cbcd9a3..4103e850fa6 100644
--- a/sys/dev/ic/acx.c
+++ b/sys/dev/ic/acx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acx.c,v 1.102 2014/03/19 10:09:19 mpi Exp $ */
+/* $OpenBSD: acx.c,v 1.103 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -1560,7 +1560,7 @@ acx_load_base_firmware(struct acx_softc *sc, const char *name)
/* Load base firmware */
error = acx_load_firmware(sc, 0, ucode, size);
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
if (error) {
printf("%s: can't load base firmware\n", ifp->if_xname);
@@ -1611,21 +1611,21 @@ acx_load_radio_firmware(struct acx_softc *sc, const char *name)
* radio firmware can be loaded after it.
*/
if (acx_get_conf(sc, ACX_CONF_MMAP, &mem_map, sizeof(mem_map)) != 0) {
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
return (ENXIO);
}
radio_fw_ofs = letoh32(mem_map.code_end);
/* Put ECPU into sleeping state, before loading radio firmware */
if (acx_exec_command(sc, ACXCMD_SLEEP, NULL, 0, NULL, 0) != 0) {
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
return (ENXIO);
}
/* Load radio firmware */
error = acx_load_firmware(sc, radio_fw_ofs, ucode, size);
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
if (error) {
printf("%s: can't load radio firmware\n", ifp->if_xname);
diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c
index 2725e6220fe..669ae5f0962 100644
--- a/sys/dev/ic/ahci.c
+++ b/sys/dev/ic/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.14 2014/06/26 04:25:38 jmatthew Exp $ */
+/* $OpenBSD: ahci.c,v 1.15 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -673,7 +673,7 @@ ahci_port_free(struct ahci_softc *sc, u_int port)
if (ap->ap_ccbs) {
while ((ccb = ahci_get_ccb(ap)) != NULL)
bus_dmamap_destroy(sc->sc_dmat, ccb->ccb_dmamap);
- free(ap->ap_ccbs, M_DEVBUF);
+ free(ap->ap_ccbs, M_DEVBUF, 0);
}
if (ap->ap_dmamem_cmd_list)
@@ -687,7 +687,7 @@ ahci_port_free(struct ahci_softc *sc, u_int port)
/* bus_space(9) says we dont free the subregions handle */
- free(ap, M_DEVBUF);
+ free(ap, M_DEVBUF, 0);
sc->sc_ports[port] = NULL;
}
@@ -2598,7 +2598,7 @@ free:
destroy:
bus_dmamap_destroy(sc->sc_dmat, adm->adm_map);
admfree:
- free(adm, M_DEVBUF);
+ free(adm, M_DEVBUF, 0);
return (NULL);
}
@@ -2610,7 +2610,7 @@ ahci_dmamem_free(struct ahci_softc *sc, struct ahci_dmamem *adm)
bus_dmamem_unmap(sc->sc_dmat, adm->adm_kva, adm->adm_size);
bus_dmamem_free(sc->sc_dmat, &adm->adm_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, adm->adm_map);
- free(adm, M_DEVBUF);
+ free(adm, M_DEVBUF, 0);
}
u_int32_t
diff --git a/sys/dev/ic/aic79xx.c b/sys/dev/ic/aic79xx.c
index f20ce6ee5dc..6fd07dd86cf 100644
--- a/sys/dev/ic/aic79xx.c
+++ b/sys/dev/ic/aic79xx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic79xx.c,v 1.52 2013/12/03 22:49:07 brad Exp $ */
+/* $OpenBSD: aic79xx.c,v 1.53 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
@@ -2851,7 +2851,7 @@ ahd_free_tstate(struct ahd_softc *ahd, u_int scsi_id, char channel, int force)
tstate = ahd->enabled_targets[scsi_id];
if (tstate != NULL)
- free(tstate, M_DEVBUF);
+ free(tstate, M_DEVBUF, 0);
ahd->enabled_targets[scsi_id] = NULL;
}
#endif
@@ -5274,7 +5274,7 @@ ahd_alloc(void *platform_arg, char *name)
AHD_INT_COALESCING_STOP_THRESHOLD_DEFAULT;
if (ahd_platform_alloc(ahd, platform_arg) != 0) {
- free(ahd->seep_config, M_DEVBUF);
+ free(ahd->seep_config, M_DEVBUF, 0);
return (NULL);
}
@@ -5375,7 +5375,7 @@ void
ahd_set_name(struct ahd_softc *ahd, char *name)
{
if (ahd->name != NULL)
- free(ahd->name, M_DEVBUF);
+ free(ahd->name, M_DEVBUF, 0);
ahd->name = name;
}
@@ -5413,23 +5413,23 @@ ahd_free(struct ahd_softc *ahd)
lstate = tstate->enabled_luns[j];
if (lstate != NULL) {
xpt_free_path(lstate->path);
- free(lstate, M_DEVBUF);
+ free(lstate, M_DEVBUF, 0);
}
}
#endif
- free(tstate, M_DEVBUF);
+ free(tstate, M_DEVBUF, 0);
}
}
#if AHD_TARGET_MODE
if (ahd->black_hole != NULL) {
xpt_free_path(ahd->black_hole->path);
- free(ahd->black_hole, M_DEVBUF);
+ free(ahd->black_hole, M_DEVBUF, 0);
}
#endif
if (ahd->seep_config != NULL)
- free(ahd->seep_config, M_DEVBUF);
+ free(ahd->seep_config, M_DEVBUF, 0);
if (ahd->saved_stack != NULL)
- free(ahd->saved_stack, M_DEVBUF);
+ free(ahd->saved_stack, M_DEVBUF, 0);
return;
}
@@ -5719,7 +5719,7 @@ ahd_fini_scbdata(struct ahd_softc *ahd)
while ((sns_map = SLIST_FIRST(&scb_data->sense_maps)) != NULL) {
SLIST_REMOVE_HEAD(&scb_data->sense_maps, links);
ahd_freedmamem(ahd, sns_map);
- free(sns_map, M_DEVBUF);
+ free(sns_map, M_DEVBUF, 0);
}
/* FALLTHROUGH */
}
@@ -5730,7 +5730,7 @@ ahd_fini_scbdata(struct ahd_softc *ahd)
while ((sg_map = SLIST_FIRST(&scb_data->sg_maps)) != NULL) {
SLIST_REMOVE_HEAD(&scb_data->sg_maps, links);
ahd_freedmamem(ahd, sg_map);
- free(sg_map, M_DEVBUF);
+ free(sg_map, M_DEVBUF, 0);
}
/* FALLTHROUGH */
}
@@ -5741,7 +5741,7 @@ ahd_fini_scbdata(struct ahd_softc *ahd)
while ((hscb_map = SLIST_FIRST(&scb_data->hscb_maps)) != NULL) {
SLIST_REMOVE_HEAD(&scb_data->hscb_maps, links);
ahd_freedmamem(ahd, hscb_map);
- free(hscb_map, M_DEVBUF);
+ free(hscb_map, M_DEVBUF, 0);
}
/* FALLTHROUGH */
}
@@ -5979,7 +5979,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd)
/* Allocate the next batch of hardware SCBs */
if (ahd_createdmamem(ahd, PAGE_SIZE, hscb_map,
"hardware SCB structures") < 0) {
- free(hscb_map, M_DEVBUF);
+ free(hscb_map, M_DEVBUF, 0);
return;
}
@@ -6009,7 +6009,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd)
/* Allocate the next batch of S/G lists */
if (ahd_createdmamem(ahd, ahd_sglist_allocsize(ahd), sg_map,
"SG data structures") < 0) {
- free(sg_map, M_DEVBUF);
+ free(sg_map, M_DEVBUF, 0);
return;
}
@@ -6043,7 +6043,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd)
/* Allocate the next batch of sense buffers */
if (ahd_createdmamem(ahd, PAGE_SIZE, sense_map,
"Sense Data structures") < 0) {
- free(sense_map, M_DEVBUF);
+ free(sense_map, M_DEVBUF, 0);
return;
}
@@ -6081,7 +6081,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd)
if (sizeof(*pdata) > 0) {
pdata = malloc(sizeof(*pdata), M_DEVBUF, M_NOWAIT);
if (pdata == NULL) {
- free(next_scb, M_DEVBUF);
+ free(next_scb, M_DEVBUF, 0);
break;
}
}
@@ -6116,8 +6116,8 @@ ahd_alloc_scbs(struct ahd_softc *ahd)
BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW, &next_scb->dmamap);
if (error != 0) {
- free(next_scb, M_DEVBUF);
- free(pdata, M_DEVBUF);
+ free(next_scb, M_DEVBUF, 0);
+ free(pdata, M_DEVBUF, 0);
break;
}
next_scb->hscb->tag = aic_htole16(scb_data->numscbs);
@@ -9601,7 +9601,7 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb)
xpt_path_target_id(ccb->ccb_h.path),
xpt_path_lun_id(ccb->ccb_h.path));
if (status != CAM_REQ_CMP) {
- free(lstate, M_DEVBUF);
+ free(lstate, M_DEVBUF, 0);
xpt_print_path(ccb->ccb_h.path);
printf("Couldn't allocate path\n");
ccb->ccb_h.status = CAM_RESRC_UNAVAIL;
@@ -9715,7 +9715,7 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb)
xpt_print_path(ccb->ccb_h.path);
printf("Target mode disabled\n");
xpt_free_path(lstate->path);
- free(lstate, M_DEVBUF);
+ free(lstate, M_DEVBUF, 0);
ahd_pause(ahd);
/* Can we clean up the target too? */
diff --git a/sys/dev/ic/aic79xx_openbsd.c b/sys/dev/ic/aic79xx_openbsd.c
index 0197819951a..b19d2ac05f6 100644
--- a/sys/dev/ic/aic79xx_openbsd.c
+++ b/sys/dev/ic/aic79xx_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic79xx_openbsd.c,v 1.41 2014/01/17 23:23:58 dlg Exp $ */
+/* $OpenBSD: aic79xx_openbsd.c,v 1.42 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
@@ -588,7 +588,7 @@ void
ahd_platform_free(struct ahd_softc *ahd)
{
if (sizeof(struct ahd_platform_data) > 0)
- free(ahd->platform_data, M_DEVBUF);
+ free(ahd->platform_data, M_DEVBUF, 0);
}
int
diff --git a/sys/dev/ic/aic7xxx.c b/sys/dev/ic/aic7xxx.c
index c1e29ddd8e0..9d6874f1f09 100644
--- a/sys/dev/ic/aic7xxx.c
+++ b/sys/dev/ic/aic7xxx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic7xxx.c,v 1.86 2013/04/20 20:23:09 miod Exp $ */
+/* $OpenBSD: aic7xxx.c,v 1.87 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: aic7xxx.c,v 1.108 2003/11/02 11:07:44 wiz Exp $ */
/*
@@ -40,7 +40,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
- * $Id: aic7xxx.c,v 1.86 2013/04/20 20:23:09 miod Exp $
+ * $Id: aic7xxx.c,v 1.87 2014/07/12 18:48:17 tedu Exp $
*/
/*
* Ported from FreeBSD by Pascal Renauld, Network Storage Solutions, Inc. - April 2003
@@ -1688,7 +1688,7 @@ ahc_free_tstate(struct ahc_softc *ahc, u_int scsi_id, char channel, int force)
scsi_id += 8;
tstate = ahc->enabled_targets[scsi_id];
if (tstate != NULL)
- free(tstate, M_DEVBUF);
+ free(tstate, M_DEVBUF, 0);
ahc->enabled_targets[scsi_id] = NULL;
}
#endif
@@ -3958,7 +3958,7 @@ void
ahc_set_name(struct ahc_softc *ahc, char *name)
{
if (ahc->name != NULL)
- free(ahc->name, M_DEVBUF);
+ free(ahc->name, M_DEVBUF, 0);
ahc->name = name;
}
@@ -3998,21 +3998,21 @@ ahc_free(struct ahc_softc *ahc)
lstate = tstate->enabled_luns[j];
if (lstate != NULL) {
/*xpt_free_path(lstate->path);*/
- free(lstate, M_DEVBUF);
+ free(lstate, M_DEVBUF, 0);
}
}
#endif
- free(tstate, M_DEVBUF);
+ free(tstate, M_DEVBUF, 0);
}
}
#ifdef AHC_TARGET_MODE
if (ahc->black_hole != NULL) {
/*xpt_free_path(ahc->black_hole->path);*/
- free(ahc->black_hole, M_DEVBUF);
+ free(ahc->black_hole, M_DEVBUF, 0);
}
#endif
if (ahc->seep_config != NULL)
- free(ahc->seep_config, M_DEVBUF);
+ free(ahc->seep_config, M_DEVBUF, 0);
return;
}
@@ -4328,7 +4328,7 @@ ahc_fini_scbdata(struct ahc_softc *ahc)
ahc_freedmamem(ahc->parent_dmat, PAGE_SIZE,
sg_map->sg_dmamap, (caddr_t)sg_map->sg_vaddr,
&sg_map->sg_dmasegs, sg_map->sg_nseg);
- free(sg_map, M_DEVBUF);
+ free(sg_map, M_DEVBUF, 0);
}
}
/*FALLTHROUGH*/
@@ -4350,7 +4350,7 @@ ahc_fini_scbdata(struct ahc_softc *ahc)
break;
}
if (scb_data->scbarray != NULL)
- free(scb_data->scbarray, M_DEVBUF);
+ free(scb_data->scbarray, M_DEVBUF, 0);
}
void
@@ -4382,7 +4382,7 @@ ahc_alloc_scbs(struct ahc_softc *ahc)
(caddr_t *)&sg_map->sg_vaddr, &sg_map->sg_physaddr,
&sg_map->sg_dmasegs, &sg_map->sg_nseg, ahc_name(ahc),
"SG space") < 0) {
- free(sg_map, M_DEVBUF);
+ free(sg_map, M_DEVBUF, 0);
return;
}
@@ -6865,7 +6865,7 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb)
xpt_path_target_id(ccb->ccb_h.path),
xpt_path_lun_id(ccb->ccb_h.path));
if (status != CAM_REQ_CMP) {
- free(lstate, M_DEVBUF);
+ free(lstate, M_DEVBUF, 0);
xpt_print_path(ccb->ccb_h.path);
printf("Couldn't allocate path\n");
ccb->ccb_h.status = CAM_RESRC_UNAVAIL;
@@ -6986,7 +6986,7 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb)
xpt_print_path(ccb->ccb_h.path);
printf("Target mode disabled\n");
xpt_free_path(lstate->path);
- free(lstate, M_DEVBUF);
+ free(lstate, M_DEVBUF, 0);
ahc_pause(ahc);
/* Can we clean up the target too? */
diff --git a/sys/dev/ic/aic7xxx_openbsd.c b/sys/dev/ic/aic7xxx_openbsd.c
index bf81bc036f9..6475611aece 100644
--- a/sys/dev/ic/aic7xxx_openbsd.c
+++ b/sys/dev/ic/aic7xxx_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic7xxx_openbsd.c,v 1.52 2014/01/17 23:25:07 dlg Exp $ */
+/* $OpenBSD: aic7xxx_openbsd.c,v 1.53 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $ */
/*
@@ -667,7 +667,7 @@ void
ahc_platform_free(struct ahc_softc *ahc)
{
if (sizeof(struct ahc_platform_data) > 0)
- free(ahc->platform_data, M_DEVBUF);
+ free(ahc->platform_data, M_DEVBUF, 0);
}
int
diff --git a/sys/dev/ic/aic7xxx_seeprom.c b/sys/dev/ic/aic7xxx_seeprom.c
index 3e576a7f074..00622bc6fa5 100644
--- a/sys/dev/ic/aic7xxx_seeprom.c
+++ b/sys/dev/ic/aic7xxx_seeprom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic7xxx_seeprom.c,v 1.4 2008/05/13 02:24:08 brad Exp $ */
+/* $OpenBSD: aic7xxx_seeprom.c,v 1.5 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: aic7xxx_seeprom.c,v 1.8 2003/05/02 19:12:19 dyoung Exp $ */
/*
@@ -47,7 +47,7 @@
* from the FreeBSD source file aic7xxx_pci.c by Frank van der Linden
* <fvdl@netbsd.org>
*
- * $Id: aic7xxx_seeprom.c,v 1.4 2008/05/13 02:24:08 brad Exp $
+ * $Id: aic7xxx_seeprom.c,v 1.5 2014/07/12 18:48:17 tedu Exp $
*
* $FreeBSD: src/sys/dev/aic7xxx/aic7xxx_pci.c,v 1.22 2003/01/20 20:44:55 gibbs Exp $
*/
@@ -196,7 +196,7 @@ ahc_check_extport(struct ahc_softc *ahc, u_int *sxfrctl1)
if (bootverbose)
printf("%s: No SEEPROM available.\n", ahc_name(ahc));
ahc->flags |= AHC_USEDEFAULTS | AHC_NO_BIOS_INIT;
- free(ahc->seep_config, M_DEVBUF);
+ free(ahc->seep_config, M_DEVBUF, 0);
ahc->seep_config = NULL;
sc = NULL;
} else {
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c
index 6099be53d14..f1e3ba6bde1 100644
--- a/sys/dev/ic/ami.c
+++ b/sys/dev/ic/ami.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami.c,v 1.226 2013/10/19 13:03:43 dlg Exp $ */
+/* $OpenBSD: ami.c,v 1.227 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -262,7 +262,7 @@ free:
destroy:
bus_dmamap_destroy(sc->sc_dmat, am->am_map);
amfree:
- free(am, M_DEVBUF);
+ free(am, M_DEVBUF, 0);
return (NULL);
}
@@ -274,7 +274,7 @@ ami_freemem(struct ami_softc *sc, struct ami_mem *am)
bus_dmamem_unmap(sc->sc_dmat, am->am_kva, am->am_size);
bus_dmamem_free(sc->sc_dmat, &am->am_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, am->am_map);
- free(am, M_DEVBUF);
+ free(am, M_DEVBUF, 0);
}
void
@@ -363,7 +363,7 @@ free_list:
ami_freemem(sc, sc->sc_ccbmem_am);
free_ccbs:
- free(sc->sc_ccbs, M_DEVBUF);
+ free(sc->sc_ccbs, M_DEVBUF, 0);
return (1);
}
@@ -1948,7 +1948,7 @@ ami_ioctl_inq(struct ami_softc *sc, struct bioc_inq *bi)
bcopy(bi, &sc->sc_bi, sizeof sc->sc_bi);
error = 0;
bail:
- free(p, M_DEVBUF);
+ free(p, M_DEVBUF, 0);
done:
dma_free(inqbuf, sizeof(*inqbuf));
return (error);
@@ -2181,7 +2181,7 @@ ami_ioctl_vol(struct ami_softc *sc, struct bioc_vol *bv)
strlcpy(bv->bv_dev, sc->sc_hdr[i].dev, sizeof(bv->bv_dev));
bail:
- free(p, M_DEVBUF);
+ free(p, M_DEVBUF, 0);
return (error);
}
@@ -2293,7 +2293,7 @@ ami_ioctl_disk(struct ami_softc *sc, struct bioc_disk *bd)
done:
error = 0;
bail:
- free(p, M_DEVBUF);
+ free(p, M_DEVBUF, 0);
dma_free(vpdbuf, sizeof(*vpdbuf));
dma_free(inqbuf, sizeof(*inqbuf));
@@ -2444,9 +2444,9 @@ ami_create_sensors(struct ami_softc *sc)
return (0);
freebd:
- free(sc->sc_bd, M_DEVBUF);
+ free(sc->sc_bd, M_DEVBUF, 0);
bad:
- free(sc->sc_sensors, M_DEVBUF);
+ free(sc->sc_sensors, M_DEVBUF, 0);
return (1);
}
diff --git a/sys/dev/ic/ar5008.c b/sys/dev/ic/ar5008.c
index 1f84c2717f6..0a55576527e 100644
--- a/sys/dev/ic/ar5008.c
+++ b/sys/dev/ic/ar5008.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5008.c,v 1.23 2013/08/07 01:06:28 bluhm Exp $ */
+/* $OpenBSD: ar5008.c,v 1.24 2014/07/12 18:48:17 tedu Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -658,7 +658,7 @@ ar5008_rx_free(struct athn_softc *sc)
if (bf->bf_m != NULL)
m_freem(bf->bf_m);
}
- free(rxq->bf, M_DEVBUF);
+ free(rxq->bf, M_DEVBUF, 0);
/* Free Rx descriptors. */
if (rxq->map != NULL) {
diff --git a/sys/dev/ic/ar5210.c b/sys/dev/ic/ar5210.c
index 2889b784d95..26f20ef1ed0 100644
--- a/sys/dev/ic/ar5210.c
+++ b/sys/dev/ic/ar5210.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5210.c,v 1.45 2009/06/02 12:39:02 reyk Exp $ */
+/* $OpenBSD: ar5210.c,v 1.46 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2004, 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org>
@@ -354,7 +354,7 @@ ar5k_ar5210_detach(struct ath_hal *hal)
/*
* Free HAL structure, assume interrupts are down
*/
- free(hal, M_DEVBUF);
+ free(hal, M_DEVBUF, 0);
}
HAL_BOOL
diff --git a/sys/dev/ic/ar5211.c b/sys/dev/ic/ar5211.c
index 853b5b2aad6..69adc4d3386 100644
--- a/sys/dev/ic/ar5211.c
+++ b/sys/dev/ic/ar5211.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5211.c,v 1.45 2012/08/30 11:03:57 jsg Exp $ */
+/* $OpenBSD: ar5211.c,v 1.46 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2004, 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org>
@@ -404,7 +404,7 @@ ar5k_ar5211_detach(struct ath_hal *hal)
/*
* Free HAL structure, assume interrupts are down
*/
- free(hal, M_DEVBUF);
+ free(hal, M_DEVBUF, 0);
}
HAL_BOOL
diff --git a/sys/dev/ic/ar5212.c b/sys/dev/ic/ar5212.c
index 877a012ab65..4b77f6a7620 100644
--- a/sys/dev/ic/ar5212.c
+++ b/sys/dev/ic/ar5212.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5212.c,v 1.54 2014/07/09 16:36:13 stsp Exp $ */
+/* $OpenBSD: ar5212.c,v 1.55 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2004, 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org>
@@ -457,12 +457,12 @@ void
ar5k_ar5212_detach(struct ath_hal *hal)
{
if (hal->ah_rf_banks != NULL)
- free(hal->ah_rf_banks, M_DEVBUF);
+ free(hal->ah_rf_banks, M_DEVBUF, 0);
/*
* Free HAL structure, assume interrupts are down
*/
- free(hal, M_DEVBUF);
+ free(hal, M_DEVBUF, 0);
}
HAL_BOOL
diff --git a/sys/dev/ic/ar5xxx.c b/sys/dev/ic/ar5xxx.c
index f98043d78e5..dd86d6cd50a 100644
--- a/sys/dev/ic/ar5xxx.c
+++ b/sys/dev/ic/ar5xxx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5xxx.c,v 1.56 2012/01/28 12:45:48 stsp Exp $ */
+/* $OpenBSD: ar5xxx.c,v 1.57 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2004, 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org>
@@ -295,7 +295,7 @@ ath_hal_attach(u_int16_t device, void *arg, bus_space_tag_t st,
return (hal);
failed:
- free(hal, M_DEVBUF);
+ free(hal, M_DEVBUF, 0);
return (NULL);
}
@@ -506,7 +506,7 @@ ath_hal_init_channels(struct ath_hal *hal, HAL_CHANNEL *channels,
done:
bcopy(all_channels, channels, sizeof(HAL_CHANNEL) * max_channels);
*channels_size = c;
- free(all_channels, M_TEMP);
+ free(all_channels, M_TEMP, 0);
return (AH_TRUE);
}
diff --git a/sys/dev/ic/ar9003.c b/sys/dev/ic/ar9003.c
index b738ff2688e..e80726f9db8 100644
--- a/sys/dev/ic/ar9003.c
+++ b/sys/dev/ic/ar9003.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar9003.c,v 1.27 2013/08/07 01:06:28 bluhm Exp $ */
+/* $OpenBSD: ar9003.c,v 1.28 2014/07/12 18:48:17 tedu Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -491,7 +491,7 @@ ar9003_read_rom(struct athn_softc *sc)
if (error == 0)
ops->swap_rom(sc);
#endif
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return (error);
}
@@ -793,7 +793,7 @@ ar9003_rx_free(struct athn_softc *sc, int qid)
if (bf->bf_m != NULL)
m_freem(bf->bf_m);
}
- free(rxq->bf, M_DEVBUF);
+ free(rxq->bf, M_DEVBUF, 0);
}
void
diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c
index 1327d85f077..202a4eb4324 100644
--- a/sys/dev/ic/ath.c
+++ b/sys/dev/ic/ath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ath.c,v 1.100 2014/07/10 11:34:48 stsp Exp $ */
+/* $OpenBSD: ath.c,v 1.101 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */
/*-
@@ -1678,7 +1678,7 @@ ath_desc_free(struct ath_softc *sc)
TAILQ_INIT(&sc->sc_rxbuf);
TAILQ_INIT(&sc->sc_txbuf);
TAILQ_INIT(&sc->sc_txq);
- free(sc->sc_bufptr, M_DEVBUF);
+ free(sc->sc_bufptr, M_DEVBUF, 0);
sc->sc_bufptr = NULL;
}
@@ -2999,7 +2999,7 @@ ath_getchannels(struct ath_softc *sc, HAL_BOOL outdoor, HAL_BOOL xchanmode)
HAL_MODE_ALL, outdoor, xchanmode)) {
printf("%s: unable to collect channel list from hal\n",
ifp->if_xname);
- free(chans, M_TEMP);
+ free(chans, M_TEMP, 0);
return EINVAL;
}
@@ -3030,7 +3030,7 @@ ath_getchannels(struct ath_softc *sc, HAL_BOOL outdoor, HAL_BOOL xchanmode)
/* count valid channels */
sc->sc_nchan++;
}
- free(chans, M_TEMP);
+ free(chans, M_TEMP, 0);
if (sc->sc_nchan < 1) {
printf("%s: no valid channels for regdomain %s(%u)\n",
diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c
index d0c7a498686..213178085f0 100644
--- a/sys/dev/ic/athn.c
+++ b/sys/dev/ic/athn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: athn.c,v 1.81 2014/03/19 10:09:19 mpi Exp $ */
+/* $OpenBSD: athn.c,v 1.82 2014/07/12 18:48:17 tedu Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -393,7 +393,7 @@ athn_detach(struct athn_softc *sc)
}
/* Free ROM copy. */
if (sc->eep != NULL)
- free(sc->eep, M_DEVBUF);
+ free(sc->eep, M_DEVBUF, 0);
ieee80211_ifdetach(ifp);
if_detach(ifp);
diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c
index da599fdab11..64a8e3637e2 100644
--- a/sys/dev/ic/atw.c
+++ b/sys/dev/ic/atw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atw.c,v 1.82 2014/07/08 17:19:25 deraadt Exp $ */
+/* $OpenBSD: atw.c,v 1.83 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: atw.c,v 1.69 2004/07/23 07:07:55 dyoung Exp $ */
/*-
@@ -423,7 +423,7 @@ atw_read_srom(struct atw_softc *sc)
if (!read_seeprom(&sd, sc->sc_srom, 0, sc->sc_sromsz/2)) {
printf("%s: could not read SROM\n", sc->sc_dev.dv_xname);
- free(sc->sc_srom, M_DEVBUF);
+ free(sc->sc_srom, M_DEVBUF, 0);
return -1;
}
#ifdef ATW_DEBUG
@@ -2743,7 +2743,7 @@ atw_detach(struct atw_softc *sc)
bus_dmamem_free(sc->sc_dmat, &sc->sc_cdseg, sc->sc_cdnseg);
if (sc->sc_srom)
- free(sc->sc_srom, M_DEVBUF);
+ free(sc->sc_srom, M_DEVBUF, 0);
return (0);
}
diff --git a/sys/dev/ic/bwi.c b/sys/dev/ic/bwi.c
index 2f316ecab99..33a9b4eda11 100644
--- a/sys/dev/ic/bwi.c
+++ b/sys/dev/ic/bwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bwi.c,v 1.101 2014/03/19 10:09:19 mpi Exp $ */
+/* $OpenBSD: bwi.c,v 1.102 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
@@ -1660,7 +1660,7 @@ bwi_get_firmware(const char *name, const uint8_t *ucode, size_t size_ucode,
}
}
- free(h, M_DEVBUF);
+ free(h, M_DEVBUF, 0);
return (ret);
}
@@ -1837,7 +1837,7 @@ void
bwi_mac_fw_free(struct bwi_mac *mac)
{
if (mac->mac_fw != NULL) {
- free(mac->mac_fw, M_DEVBUF);
+ free(mac->mac_fw, M_DEVBUF, 0);
mac->mac_fw = NULL;
}
}
@@ -7798,7 +7798,7 @@ bwi_dma_txstats_free(struct bwi_softc *sc)
bus_dmamap_unload(sc->sc_dmat, st->stats_dmap);
bus_dmamem_free(sc->sc_dmat, &st->stats_seg, 1);
- free(st, M_DEVBUF);
+ free(st, M_DEVBUF, 0);
}
int
diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c
index d19899b87bc..2d90a355848 100644
--- a/sys/dev/ic/cac.c
+++ b/sys/dev/ic/cac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cac.c,v 1.50 2013/05/30 16:15:02 deraadt Exp $ */
+/* $OpenBSD: cac.c,v 1.51 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: cac.c,v 1.15 2000/11/08 19:20:35 ad Exp $ */
/*
@@ -943,7 +943,7 @@ cac_create_sensors(struct cac_softc *sc)
return (0);
bad:
- free(sc->sc_sensors, M_DEVBUF);
+ free(sc->sc_sensors, M_DEVBUF, 0);
return (1);
}
diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c
index c9a4fa1a1f4..aa61a284c5c 100644
--- a/sys/dev/ic/ciss.c
+++ b/sys/dev/ic/ciss.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ciss.c,v 1.68 2013/05/30 16:15:02 deraadt Exp $ */
+/* $OpenBSD: ciss.c,v 1.69 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2005,2006 Michael Shalayeff
@@ -403,7 +403,7 @@ ciss_attach(struct ciss_softc *sc)
sensor_attach(&sc->sensordev, &sc->sensors[i]);
}
if (sensor_task_register(sc, ciss_sensors, 10) == NULL)
- free(sc->sensors, M_DEVBUF);
+ free(sc->sensors, M_DEVBUF, 0);
else
sensordev_install(&sc->sensordev);
}
diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c
index 50fe708ded2..f87d8dc15e5 100644
--- a/sys/dev/ic/dc.c
+++ b/sys/dev/ic/dc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dc.c,v 1.132 2014/04/18 14:56:59 henning Exp $ */
+/* $OpenBSD: dc.c,v 1.133 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -3128,7 +3128,7 @@ dc_detach(struct dc_softc *sc)
mii_detach(&sc->sc_mii, MII_PHY_ANY, MII_OFFSET_ANY);
if (sc->dc_srom)
- free(sc->dc_srom, M_DEVBUF);
+ free(sc->dc_srom, M_DEVBUF, 0);
for (i = 0; i < DC_RX_LIST_CNT; i++)
bus_dmamap_destroy(sc->sc_dmat, sc->dc_cdata.dc_rx_chain[i].sd_map);
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c
index 183b4dbc917..d9df07c37ea 100644
--- a/sys/dev/ic/fxp.c
+++ b/sys/dev/ic/fxp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fxp.c,v 1.115 2013/12/28 03:34:59 deraadt Exp $ */
+/* $OpenBSD: fxp.c,v 1.116 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */
/*
@@ -1056,7 +1056,7 @@ fxp_detach(struct fxp_softc *sc)
#ifndef SMALL_KERNEL
if (sc->sc_ucodebuf)
- free(sc->sc_ucodebuf, M_DEVBUF);
+ free(sc->sc_ucodebuf, M_DEVBUF, 0);
#endif
}
diff --git a/sys/dev/ic/i82365.c b/sys/dev/ic/i82365.c
index 797391f7945..1dd43555e17 100644
--- a/sys/dev/ic/i82365.c
+++ b/sys/dev/ic/i82365.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82365.c,v 1.31 2014/07/08 17:19:25 deraadt Exp $ */
+/* $OpenBSD: i82365.c,v 1.32 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: i82365.c,v 1.10 1998/06/09 07:36:55 thorpej Exp $ */
/*
@@ -469,9 +469,9 @@ pcic_event_process(h, pe)
break;
if (pe2->pe_type == PCIC_EVENT_INSERTION) {
SIMPLEQ_REMOVE_HEAD(&h->events, pe_q);
- free(pe1, M_TEMP);
+ free(pe1, M_TEMP, 0);
SIMPLEQ_REMOVE_HEAD(&h->events, pe_q);
- free(pe2, M_TEMP);
+ free(pe2, M_TEMP, 0);
}
}
splx(s);
@@ -493,9 +493,9 @@ pcic_event_process(h, pe)
break;
if (pe2->pe_type == PCIC_EVENT_REMOVAL) {
SIMPLEQ_REMOVE_HEAD(&h->events, pe_q);
- free(pe1, M_TEMP);
+ free(pe1, M_TEMP, 0);
SIMPLEQ_REMOVE_HEAD(&h->events, pe_q);
- free(pe2, M_TEMP);
+ free(pe2, M_TEMP, 0);
}
}
splx(s);
@@ -507,7 +507,7 @@ pcic_event_process(h, pe)
default:
panic("pcic_event_thread: unknown event %d", pe->pe_type);
}
- free(pe, M_TEMP);
+ free(pe, M_TEMP, 0);
}
void
diff --git a/sys/dev/ic/i82596.c b/sys/dev/ic/i82596.c
index 6db2fdc4b76..8be1e5a491a 100644
--- a/sys/dev/ic/i82596.c
+++ b/sys/dev/ic/i82596.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82596.c,v 1.37 2014/07/08 17:19:25 deraadt Exp $ */
+/* $OpenBSD: i82596.c,v 1.38 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: i82586.c,v 1.18 1998/08/15 04:42:42 mycroft Exp $ */
/*-
@@ -1973,7 +1973,7 @@ ie_mc_reset(sc)
if (size > sc->mcast_addrs_size) {
/* Need to allocate more space */
if (sc->mcast_addrs_size)
- free(sc->mcast_addrs, M_IFMADDR);
+ free(sc->mcast_addrs, M_IFMADDR, 0);
sc->mcast_addrs = (char *)
malloc(size, M_IFMADDR, M_WAITOK);
sc->mcast_addrs_size = size;
diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c
index 0c44fd50a47..71dd4280c7b 100644
--- a/sys/dev/ic/if_wi.c
+++ b/sys/dev/ic/if_wi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi.c,v 1.154 2013/11/26 09:50:33 mpi Exp $ */
+/* $OpenBSD: if_wi.c,v 1.155 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -1976,7 +1976,7 @@ wi_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
na->na_nodes++;
}
if (nr)
- free(nr, M_DEVBUF);
+ free(nr, M_DEVBUF, 0);
break;
}
case SIOCG80211FLAGS:
@@ -2031,9 +2031,9 @@ wi_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
}
if (wreq)
- free(wreq, M_DEVBUF);
+ free(wreq, M_DEVBUF, 0);
if (nwidp)
- free(nwidp, M_DEVBUF);
+ free(nwidp, M_DEVBUF, 0);
fail:
sc->wi_flags &= ~WI_FLAGS_BUSY;
diff --git a/sys/dev/ic/if_wi_hostap.c b/sys/dev/ic/if_wi_hostap.c
index 155ad0f8ecb..fb1ae619337 100644
--- a/sys/dev/ic/if_wi_hostap.c
+++ b/sys/dev/ic/if_wi_hostap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi_hostap.c,v 1.42 2013/08/07 01:06:30 bluhm Exp $ */
+/* $OpenBSD: if_wi_hostap.c,v 1.43 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2002
@@ -296,8 +296,8 @@ wihap_shutdown(struct wi_softc *sc)
printf("wihap_shutdown: free(sta=%p)\n", sta);
next = TAILQ_NEXT(sta, list);
if (sta->challenge)
- free(sta->challenge, M_TEMP);
- free(sta, M_DEVBUF);
+ free(sta->challenge, M_TEMP, 0);
+ free(sta, M_DEVBUF, 0);
}
TAILQ_INIT(&whi->sta_list);
@@ -442,8 +442,8 @@ wihap_sta_delete(struct wihap_sta_info *sta)
TAILQ_REMOVE(&whi->sta_list, sta, list);
LIST_REMOVE(sta, hash);
if (sta->challenge)
- free(sta->challenge, M_TEMP);
- free(sta, M_DEVBUF);
+ free(sta->challenge, M_TEMP, 0);
+ free(sta, M_DEVBUF, 0);
whi->n_stations--;
}
@@ -669,7 +669,7 @@ wihap_auth_req(struct wi_softc *sc, struct wi_frame *rxfrm,
}
sta->flags |= WI_SIFLAGS_AUTHEN;
- free(sta->challenge, M_TEMP);
+ free(sta->challenge, M_TEMP, 0);
sta->challenge = NULL;
challenge_len = 0;
break;
diff --git a/sys/dev/ic/malo.c b/sys/dev/ic/malo.c
index 0722b6d0160..bf85ed4d2c6 100644
--- a/sys/dev/ic/malo.c
+++ b/sys/dev/ic/malo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: malo.c,v 1.98 2014/03/19 10:09:19 mpi Exp $ */
+/* $OpenBSD: malo.c,v 1.99 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
@@ -683,7 +683,7 @@ malo_free_rx_ring(struct malo_softc *sc, struct malo_rx_ring *ring)
if (data->map != NULL)
bus_dmamap_destroy(sc->sc_dmat, data->map);
}
- free(ring->data, M_DEVBUF);
+ free(ring->data, M_DEVBUF, 0);
}
}
@@ -834,7 +834,7 @@ malo_free_tx_ring(struct malo_softc *sc, struct malo_tx_ring *ring)
if (data->map != NULL)
bus_dmamap_destroy(sc->sc_dmat, data->map);
}
- free(ring->data, M_DEVBUF);
+ free(ring->data, M_DEVBUF, 0);
}
}
@@ -1803,10 +1803,10 @@ malo_load_bootimg(struct malo_softc *sc)
if (i == 10) {
printf("%s: timeout at boot firmware load!\n",
sc->sc_dev.dv_xname);
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
return (ETIMEDOUT);
}
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
/* tell the card we're done and... */
malo_mem_write2(sc, 0xbef8, 0x001);
@@ -1858,7 +1858,7 @@ malo_load_firmware(struct malo_softc *sc)
BUS_DMASYNC_POSTWRITE);
delay(500);
}
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
DPRINTF(1, "%s: firmware upload finished\n", sc->sc_dev.dv_xname);
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c
index cb8412eec15..fa15b75f4e1 100644
--- a/sys/dev/ic/mfi.c
+++ b/sys/dev/ic/mfi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfi.c,v 1.152 2014/05/04 20:09:15 sf Exp $ */
+/* $OpenBSD: mfi.c,v 1.153 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -293,7 +293,7 @@ destroy:
while ((ccb = mfi_get_ccb(sc)) != NULL)
bus_dmamap_destroy(sc->sc_dmat, ccb->ccb_dmamap);
- free(sc->sc_ccb, M_DEVBUF);
+ free(sc->sc_ccb, M_DEVBUF, 0);
return (1);
}
@@ -364,7 +364,7 @@ free:
destroy:
bus_dmamap_destroy(sc->sc_dmat, mm->am_map);
amfree:
- free(mm, M_DEVBUF);
+ free(mm, M_DEVBUF, 0);
return (NULL);
}
@@ -378,7 +378,7 @@ mfi_freemem(struct mfi_softc *sc, struct mfi_mem *mm)
bus_dmamem_unmap(sc->sc_dmat, mm->am_kva, mm->am_size);
bus_dmamem_free(sc->sc_dmat, &mm->am_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, mm->am_map);
- free(mm, M_DEVBUF);
+ free(mm, M_DEVBUF, 0);
}
int
@@ -847,7 +847,7 @@ mfi_syspd(struct mfi_softc *sc)
sc->sc_pd->pd_links[i] = pl;
}
- free(pd, M_TEMP);
+ free(pd, M_TEMP, 0);
link = &sc->sc_pd->pd_link;
link->adapter = &mfi_pd_switch;
@@ -870,12 +870,12 @@ nopl:
if (pl == NULL)
break;
- free(pl, M_DEVBUF);
+ free(pl, M_DEVBUF, 0);
}
nopd:
- free(pd, M_TEMP);
+ free(pd, M_TEMP, 0);
nopdsc:
- free(sc->sc_pd, M_DEVBUF);
+ free(sc->sc_pd, M_DEVBUF, 0);
return (1);
}
@@ -1471,25 +1471,25 @@ mfi_bio_getitall(struct mfi_softc *sc)
goto done;
if (mfi_mgmt(sc, MR_DCMD_CONF_GET, MFI_DATA_IN, sizeof *cfg, cfg,
NULL)) {
- free(cfg, M_DEVBUF);
+ free(cfg, M_DEVBUF, 0);
goto done;
}
size = cfg->mfc_size;
- free(cfg, M_DEVBUF);
+ free(cfg, M_DEVBUF, 0);
/* memory for read config */
cfg = malloc(size, M_DEVBUF, M_NOWAIT | M_ZERO);
if (cfg == NULL)
goto done;
if (mfi_mgmt(sc, MR_DCMD_CONF_GET, MFI_DATA_IN, size, cfg, NULL)) {
- free(cfg, M_DEVBUF);
+ free(cfg, M_DEVBUF, 0);
goto done;
}
/* replace current pointer with new one */
if (sc->sc_cfg)
- free(sc->sc_cfg, M_DEVBUF);
+ free(sc->sc_cfg, M_DEVBUF, 0);
sc->sc_cfg = cfg;
/* get all ld info */
@@ -1501,7 +1501,7 @@ mfi_bio_getitall(struct mfi_softc *sc)
size = cfg->mfc_no_ld * sizeof(struct mfi_ld_details);
if (sc->sc_ld_sz != size) {
if (sc->sc_ld_details)
- free(sc->sc_ld_details, M_DEVBUF);
+ free(sc->sc_ld_details, M_DEVBUF, 0);
ld_det = malloc( size, M_DEVBUF, M_NOWAIT | M_ZERO);
if (ld_det == NULL)
@@ -1757,7 +1757,7 @@ mfi_ioctl_disk(struct mfi_softc *sc, struct bioc_disk *bd)
rv = 0;
freeme:
- free(pd, M_DEVBUF);
+ free(pd, M_DEVBUF, 0);
return (rv);
}
@@ -1865,7 +1865,7 @@ mfi_ioctl_blink(struct mfi_softc *sc, struct bioc_blink *bb)
rv = 0;
done:
- free(pd, M_DEVBUF);
+ free(pd, M_DEVBUF, 0);
return (rv);
}
@@ -1927,7 +1927,7 @@ mfi_ioctl_setstate(struct mfi_softc *sc, struct bioc_setstate *bs)
rv = 0;
done:
- free(pd, M_DEVBUF);
+ free(pd, M_DEVBUF, 0);
return (rv);
}
@@ -1958,7 +1958,7 @@ mfi_bio_hs(struct mfi_softc *sc, int volid, int type, void *bio_hs)
goto freeme;
size = cfg->mfc_size;
- free(cfg, M_DEVBUF);
+ free(cfg, M_DEVBUF, 0);
/* memory for read config */
cfg = malloc(size, M_DEVBUF, M_WAITOK|M_ZERO);
@@ -2023,8 +2023,8 @@ mfi_bio_hs(struct mfi_softc *sc, int volid, int type, void *bio_hs)
DNPRINTF(MFI_D_IOCTL, "%s: mfi_vol_hs 6\n", DEVNAME(sc));
rv = 0;
freeme:
- free(pd, M_DEVBUF);
- free(cfg, M_DEVBUF);
+ free(pd, M_DEVBUF, 0);
+ free(cfg, M_DEVBUF, 0);
return (rv);
}
@@ -2191,7 +2191,7 @@ mfi_create_sensors(struct mfi_softc *sc)
return (0);
bad:
- free(sc->sc_sensors, M_DEVBUF);
+ free(sc->sc_sensors, M_DEVBUF, 0);
return (1);
}
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c
index b455c95b6f1..86648e4ed5e 100644
--- a/sys/dev/ic/mpi.c
+++ b/sys/dev/ic/mpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpi.c,v 1.191 2014/04/16 01:19:28 dlg Exp $ */
+/* $OpenBSD: mpi.c,v 1.192 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2005, 2006, 2009 David Gwynne <dlg@openbsd.org>
@@ -399,7 +399,7 @@ free_ccbs:
while ((ccb = mpi_get_ccb(sc)) != NULL)
bus_dmamap_destroy(sc->sc_dmat, ccb->ccb_dmamap);
mpi_dmamem_free(sc, sc->sc_requests);
- free(sc->sc_ccbs, M_DEVBUF);
+ free(sc->sc_ccbs, M_DEVBUF, 0);
return(1);
}
@@ -563,7 +563,7 @@ mpi_run_ppr(struct mpi_softc *sc)
}
out:
- free(physdisk_pg, M_TEMP);
+ free(physdisk_pg, M_TEMP, 0);
}
int
@@ -859,7 +859,7 @@ mpi_cfg_sas(struct mpi_softc *sc)
}
out:
- free(pg, M_TEMP);
+ free(pg, M_TEMP, 0);
return (rv);
}
@@ -1023,7 +1023,7 @@ free:
destroy:
bus_dmamap_destroy(sc->sc_dmat, mdm->mdm_map);
mdmfree:
- free(mdm, M_DEVBUF);
+ free(mdm, M_DEVBUF, 0);
return (NULL);
}
@@ -1037,7 +1037,7 @@ mpi_dmamem_free(struct mpi_softc *sc, struct mpi_dmamem *mdm)
bus_dmamem_unmap(sc->sc_dmat, mdm->mdm_kva, mdm->mdm_size);
bus_dmamem_free(sc->sc_dmat, &mdm->mdm_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, mdm->mdm_map);
- free(mdm, M_DEVBUF);
+ free(mdm, M_DEVBUF, 0);
}
int
@@ -1105,7 +1105,7 @@ free_maps:
mpi_dmamem_free(sc, sc->sc_requests);
free_ccbs:
- free(sc->sc_ccbs, M_DEVBUF);
+ free(sc->sc_ccbs, M_DEVBUF, 0);
return (1);
}
@@ -1163,7 +1163,7 @@ mpi_alloc_replies(struct mpi_softc *sc)
sc->sc_replies = mpi_dmamem_alloc(sc, sc->sc_repq * MPI_REPLY_SIZE);
if (sc->sc_replies == NULL) {
- free(sc->sc_rcbs, M_DEVBUF);
+ free(sc->sc_rcbs, M_DEVBUF, 0);
return (1);
}
@@ -1637,7 +1637,7 @@ mpi_scsi_probe_virtual(struct scsi_link *link)
if (rv == 0)
SET(link->flags, SDEV_VIRTUAL);
- free(rp0, M_TEMP);
+ free(rp0, M_TEMP, 0);
return (0);
}
@@ -2722,7 +2722,7 @@ mpi_manufacturing(struct mpi_softc *sc)
rv = 0;
out:
- free(pg, M_TEMP);
+ free(pg, M_TEMP, 0);
return (rv);
}
@@ -2775,7 +2775,7 @@ mpi_get_raid(struct mpi_softc *sc)
sc->sc_flags |= MPI_F_RAID;
out:
- free(vol_page, M_TEMP);
+ free(vol_page, M_TEMP, 0);
}
int
@@ -3098,7 +3098,7 @@ mpi_ioctl_cache(struct scsi_link *link, u_long cmd, struct dk_cache *dc)
scsi_io_put(&sc->sc_iopool, ccb);
done:
- free(rpg0, M_TEMP);
+ free(rpg0, M_TEMP, 0);
return (rv);
}
@@ -3136,7 +3136,7 @@ mpi_bio_get_pg0_raid(struct mpi_softc *sc, int id)
goto done;
}
if (sc->sc_rpg0)
- free(sc->sc_rpg0, M_DEVBUF);
+ free(sc->sc_rpg0, M_DEVBUF, 0);
sc->sc_rpg0 = rpg0;
/* get raid vol page 0 */
@@ -3464,7 +3464,7 @@ mpi_create_sensors(struct mpi_softc *sc)
return (0);
bad:
- free(sc->sc_sensors, M_DEVBUF);
+ free(sc->sc_sensors, M_DEVBUF, 0);
return (1);
}
diff --git a/sys/dev/ic/ncr53c9x.c b/sys/dev/ic/ncr53c9x.c
index a4785eb0634..91211103d41 100644
--- a/sys/dev/ic/ncr53c9x.c
+++ b/sys/dev/ic/ncr53c9x.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr53c9x.c,v 1.57 2014/01/26 17:26:55 miod Exp $ */
+/* $OpenBSD: ncr53c9x.c,v 1.58 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: ncr53c9x.c,v 1.56 2000/11/30 14:41:46 thorpej Exp $ */
/*
@@ -822,7 +822,7 @@ ncr53c9x_scsi_free(struct scsi_link *sc_link)
ti->lun[lun] = NULL;
splx(s);
- free(li, M_DEVBUF);
+ free(li, M_DEVBUF, 0);
}
/*
diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c
index 59f7fb9f881..8e2ae166171 100644
--- a/sys/dev/ic/nvme.c
+++ b/sys/dev/ic/nvme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvme.c,v 1.4 2014/04/16 01:28:02 dlg Exp $ */
+/* $OpenBSD: nvme.c,v 1.5 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2014 David Gwynne <dlg@openbsd.org>
@@ -571,7 +571,7 @@ nvme_ccbs_free(struct nvme_softc *sc)
bus_dmamap_destroy(sc->sc_dmat, ccb->ccb_dmamap);
}
- free(sc->sc_ccbs, M_DEVBUF);
+ free(sc->sc_ccbs, M_DEVBUF, 0);
}
struct nvme_queue *
@@ -615,7 +615,7 @@ nvme_q_alloc(struct nvme_softc *sc, u_int idx, u_int entries, u_int dstrd)
free_sq:
nvme_dmamem_free(sc, q->q_sq_dmamem);
free:
- free(q, M_DEVBUF);
+ free(q, M_DEVBUF, 0);
return (NULL);
}
@@ -629,7 +629,7 @@ nvme_q_free(struct nvme_softc *sc, struct nvme_queue *q)
0, NVME_DMA_LEN(q->q_sq_dmamem), BUS_DMASYNC_POSTWRITE);
nvme_dmamem_free(sc, q->q_cq_dmamem);
nvme_dmamem_free(sc, q->q_sq_dmamem);
- free(q, M_DEVBUF);
+ free(q, M_DEVBUF, 0);
}
int
@@ -677,7 +677,7 @@ free:
destroy:
bus_dmamap_destroy(sc->sc_dmat, ndm->ndm_map);
ndmfree:
- free(ndm, M_DEVBUF);
+ free(ndm, M_DEVBUF, 0);
return (NULL);
}
@@ -689,6 +689,6 @@ nvme_dmamem_free(struct nvme_softc *sc, struct nvme_dmamem *ndm)
bus_dmamem_unmap(sc->sc_dmat, ndm->ndm_kva, ndm->ndm_size);
bus_dmamem_free(sc->sc_dmat, &ndm->ndm_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, ndm->ndm_map);
- free(ndm, M_DEVBUF);
+ free(ndm, M_DEVBUF, 0);
}
diff --git a/sys/dev/ic/pgt.c b/sys/dev/ic/pgt.c
index a7de558fe91..7e5c4f0aaa7 100644
--- a/sys/dev/ic/pgt.c
+++ b/sys/dev/ic/pgt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pgt.c,v 1.73 2013/12/06 21:03:03 deraadt Exp $ */
+/* $OpenBSD: pgt.c,v 1.74 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
@@ -312,7 +312,7 @@ pgt_load_firmware(struct pgt_softc *sc)
if (size & 3) {
DPRINTF(("%s: bad firmware size %u\n",
sc->sc_dev.dv_xname, size));
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
return (EINVAL);
}
@@ -366,7 +366,7 @@ pgt_load_firmware(struct pgt_softc *sc)
pgt_write_memory_barrier(sc);
DELAY(PGT_WRITEIO_DELAY);
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
return (0);
}
@@ -1827,7 +1827,7 @@ pgt_ieee80211_node_free(struct ieee80211com *ic, struct ieee80211_node *ni)
struct pgt_ieee80211_node *pin;
pin = (struct pgt_ieee80211_node *)ni;
- free(pin, M_DEVBUF);
+ free(pin, M_DEVBUF, 0);
}
void
@@ -1898,7 +1898,7 @@ pgt_net_attach(struct pgt_softc *sc)
freqs = malloc(j, M_DEVBUF, M_WAITOK);
error = pgt_oid_get(sc, PGT_OID_SUPPORTED_FREQUENCIES, freqs, j);
if (error) {
- free(freqs, M_DEVBUF);
+ free(freqs, M_DEVBUF, 0);
return (error);
}
@@ -1909,7 +1909,7 @@ pgt_net_attach(struct pgt_softc *sc)
if (chan > IEEE80211_CHAN_MAX) {
printf("%s: reported bogus channel (%uMHz)\n",
sc->sc_dev.dv_xname, chan);
- free(freqs, M_DEVBUF);
+ free(freqs, M_DEVBUF, 0);
return (EIO);
}
@@ -1940,7 +1940,7 @@ pgt_net_attach(struct pgt_softc *sc)
sc->sc_dev.dv_xname, chan,
letoh16(freqs->pof_freqlist_mhz[i])));
}
- free(freqs, M_DEVBUF);
+ free(freqs, M_DEVBUF, 0);
if (firstchan == -1) {
printf("%s: no channels found\n", sc->sc_dev.dv_xname);
return (EIO);
@@ -2348,9 +2348,9 @@ pgt_ioctl(struct ifnet *ifp, u_long cmd, caddr_t req)
na->na_nodes++;
}
if (nr)
- free(nr, M_DEVBUF);
- free(pob, M_DEVBUF);
- free(wreq, M_DEVBUF);
+ free(nr, M_DEVBUF, 0);
+ free(pob, M_DEVBUF, 0);
+ free(wreq, M_DEVBUF, 0);
break;
}
case SIOCSIFADDR:
@@ -3184,7 +3184,7 @@ pgt_dma_alloc_queue(struct pgt_softc *sc, enum pgt_queue pq)
if (error != 0) {
printf("%s: can not create DMA tag for fragment\n",
sc->sc_dev.dv_xname);
- free(pd, M_DEVBUF);
+ free(pd, M_DEVBUF, 0);
break;
}
@@ -3193,7 +3193,7 @@ pgt_dma_alloc_queue(struct pgt_softc *sc, enum pgt_queue pq)
if (error != 0) {
printf("%s: error alloc frag %zu on queue %u\n",
sc->sc_dev.dv_xname, i, pq);
- free(pd, M_DEVBUF);
+ free(pd, M_DEVBUF, 0);
break;
}
@@ -3202,7 +3202,7 @@ pgt_dma_alloc_queue(struct pgt_softc *sc, enum pgt_queue pq)
if (error != 0) {
printf("%s: error map frag %zu on queue %u\n",
sc->sc_dev.dv_xname, i, pq);
- free(pd, M_DEVBUF);
+ free(pd, M_DEVBUF, 0);
break;
}
@@ -3214,7 +3214,7 @@ pgt_dma_alloc_queue(struct pgt_softc *sc, enum pgt_queue pq)
sc->sc_dev.dv_xname, i, pq);
bus_dmamem_free(sc->sc_dmat, &pd->pd_dmas,
nsegs);
- free(pd, M_DEVBUF);
+ free(pd, M_DEVBUF, 0);
break;
}
pd->pd_dmaaddr = pd->pd_dmam->dm_segs[0].ds_addr;
@@ -3274,7 +3274,7 @@ pgt_dma_free_queue(struct pgt_softc *sc, enum pgt_queue pq)
pd->pd_dmam = NULL;
}
bus_dmamem_free(sc->sc_dmat, &pd->pd_dmas, 1);
- free(pd, M_DEVBUF);
+ free(pd, M_DEVBUF, 0);
}
}
diff --git a/sys/dev/ic/qla.c b/sys/dev/ic/qla.c
index 19476e41098..7a520c6ae1b 100644
--- a/sys/dev/ic/qla.c
+++ b/sys/dev/ic/qla.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qla.c,v 1.41 2014/05/21 23:01:43 jmatthew Exp $ */
+/* $OpenBSD: qla.c,v 1.42 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2011 David Gwynne <dlg@openbsd.org>
@@ -309,11 +309,11 @@ qla_add_loop_port(struct qla_softc *sc, struct qla_fc_port *port)
sc->sc_targets[port->loopid] = port;
break;
case QLA_PORT_DISP_DUP:
- free(port, M_DEVBUF);
+ free(port, M_DEVBUF, 0);
break;
case QLA_PORT_DISP_SAME:
TAILQ_REMOVE(&sc->sc_ports_gone, pport, update);
- free(port, M_DEVBUF);
+ free(port, M_DEVBUF, 0);
break;
}
mtx_leave(&sc->sc_port_mtx);
@@ -1725,13 +1725,13 @@ qla_clear_port_lists(struct qla_softc *sc)
while (!TAILQ_EMPTY(&sc->sc_ports_found)) {
p = TAILQ_FIRST(&sc->sc_ports_found);
TAILQ_REMOVE(&sc->sc_ports_found, p, update);
- free(p, M_DEVBUF);
+ free(p, M_DEVBUF, 0);
}
while (!TAILQ_EMPTY(&sc->sc_ports_new)) {
p = TAILQ_FIRST(&sc->sc_ports_new);
TAILQ_REMOVE(&sc->sc_ports_new, p, update);
- free(p, M_DEVBUF);
+ free(p, M_DEVBUF, 0);
}
while (!TAILQ_EMPTY(&sc->sc_ports_gone)) {
@@ -1775,7 +1775,7 @@ qla_do_update(void *xsc, void *x)
if (port->location & QLA_LOCATION_FABRIC)
qla_fabric_plogo(sc, port);
- free(port, M_DEVBUF);
+ free(port, M_DEVBUF, 0);
}
qla_update_done(sc, QLA_UPDATE_TASK_CLEAR_ALL);
@@ -1862,12 +1862,12 @@ qla_do_update(void *xsc, void *x)
DPRINTF(QLA_D_PORT, "%s: loop port %d\n",
DEVNAME(sc), fport->loopid);
if (qla_add_loop_port(sc, fport) != 0)
- free(fport, M_DEVBUF);
+ free(fport, M_DEVBUF, 0);
} else if (fport->location & QLA_LOCATION_FABRIC) {
qla_add_fabric_port(sc, fport);
} else {
/* already processed */
- free(fport, M_DEVBUF);
+ free(fport, M_DEVBUF, 0);
}
continue;
}
@@ -1904,7 +1904,7 @@ qla_do_update(void *xsc, void *x)
fport, update);
break;
case QLA_PORT_DISP_DUP:
- free(fport, M_DEVBUF);
+ free(fport, M_DEVBUF, 0);
break;
case QLA_PORT_DISP_SAME:
DPRINTF(QLA_D_PORT, "%s: existing port"
@@ -1912,7 +1912,7 @@ qla_do_update(void *xsc, void *x)
fport->portid);
TAILQ_REMOVE(&sc->sc_ports_gone, port,
update);
- free(fport, M_DEVBUF);
+ free(fport, M_DEVBUF, 0);
break;
}
mtx_leave(&sc->sc_port_mtx);
@@ -1942,7 +1942,7 @@ qla_do_update(void *xsc, void *x)
if (qla_fabric_plogi(sc, port) == 0) {
qla_add_fabric_port(sc, port);
} else {
- free(port, M_DEVBUF);
+ free(port, M_DEVBUF, 0);
}
} else {
DPRINTF(QLA_D_PORT, "%s: done with logins\n",
@@ -1990,7 +1990,7 @@ qla_do_update(void *xsc, void *x)
if (port->location & QLA_LOCATION_FABRIC)
qla_fabric_plogo(sc, port);
- free(port, M_DEVBUF);
+ free(port, M_DEVBUF, 0);
} else {
qla_update_done(sc,
QLA_UPDATE_TASK_DETACH_TARGET);
@@ -2519,7 +2519,7 @@ free:
destroy:
bus_dmamap_destroy(sc->sc_dmat, m->qdm_map);
qdmfree:
- free(m, M_DEVBUF);
+ free(m, M_DEVBUF, 0);
return (NULL);
}
@@ -2531,7 +2531,7 @@ qla_dmamem_free(struct qla_softc *sc, struct qla_dmamem *m)
bus_dmamem_unmap(sc->sc_dmat, m->qdm_kva, m->qdm_size);
bus_dmamem_free(sc->sc_dmat, &m->qdm_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, m->qdm_map);
- free(m, M_DEVBUF);
+ free(m, M_DEVBUF, 0);
}
int
@@ -2610,7 +2610,7 @@ free_res:
free_req:
qla_dmamem_free(sc, sc->sc_requests);
free_ccbs:
- free(sc->sc_ccbs, M_DEVBUF);
+ free(sc->sc_ccbs, M_DEVBUF, 0);
return (1);
}
@@ -2626,7 +2626,7 @@ qla_free_ccbs(struct qla_softc *sc)
qla_dmamem_free(sc, sc->sc_segments);
qla_dmamem_free(sc, sc->sc_responses);
qla_dmamem_free(sc, sc->sc_requests);
- free(sc->sc_ccbs, M_DEVBUF);
+ free(sc->sc_ccbs, M_DEVBUF, 0);
}
void *
diff --git a/sys/dev/ic/qlw.c b/sys/dev/ic/qlw.c
index 325c7611786..37f21205760 100644
--- a/sys/dev/ic/qlw.c
+++ b/sys/dev/ic/qlw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qlw.c,v 1.22 2014/04/06 20:17:23 kettenis Exp $ */
+/* $OpenBSD: qlw.c,v 1.23 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2011 David Gwynne <dlg@openbsd.org>
@@ -1673,7 +1673,7 @@ free:
destroy:
bus_dmamap_destroy(sc->sc_dmat, m->qdm_map);
qdmfree:
- free(m, M_DEVBUF);
+ free(m, M_DEVBUF, 0);
return (NULL);
}
@@ -1685,7 +1685,7 @@ qlw_dmamem_free(struct qlw_softc *sc, struct qlw_dmamem *m)
bus_dmamem_unmap(sc->sc_dmat, m->qdm_kva, m->qdm_size);
bus_dmamem_free(sc->sc_dmat, &m->qdm_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, m->qdm_map);
- free(m, M_DEVBUF);
+ free(m, M_DEVBUF, 0);
}
int
@@ -1749,7 +1749,7 @@ free_maps:
free_req:
qlw_dmamem_free(sc, sc->sc_requests);
free_ccbs:
- free(sc->sc_ccbs, M_DEVBUF);
+ free(sc->sc_ccbs, M_DEVBUF, 0);
return (1);
}
@@ -1764,7 +1764,7 @@ qlw_free_ccbs(struct qlw_softc *sc)
bus_dmamap_destroy(sc->sc_dmat, ccb->ccb_dmamap);
qlw_dmamem_free(sc, sc->sc_responses);
qlw_dmamem_free(sc, sc->sc_requests);
- free(sc->sc_ccbs, M_DEVBUF);
+ free(sc->sc_ccbs, M_DEVBUF, 0);
}
void *
diff --git a/sys/dev/ic/rt2560.c b/sys/dev/ic/rt2560.c
index 8749e1d2e15..fc9c24b0351 100644
--- a/sys/dev/ic/rt2560.c
+++ b/sys/dev/ic/rt2560.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2560.c,v 1.63 2014/03/19 10:09:19 mpi Exp $ */
+/* $OpenBSD: rt2560.c,v 1.64 2014/07/12 18:48:17 tedu Exp $ */
/*-
* Copyright (c) 2005, 2006
@@ -483,7 +483,7 @@ rt2560_free_tx_ring(struct rt2560_softc *sc, struct rt2560_tx_ring *ring)
if (data->map != NULL)
bus_dmamap_destroy(sc->sc_dmat, data->map);
}
- free(ring->data, M_DEVBUF);
+ free(ring->data, M_DEVBUF, 0);
}
}
@@ -638,7 +638,7 @@ rt2560_free_rx_ring(struct rt2560_softc *sc, struct rt2560_rx_ring *ring)
if (data->map != NULL)
bus_dmamap_destroy(sc->sc_dmat, data->map);
}
- free(ring->data, M_DEVBUF);
+ free(ring->data, M_DEVBUF, 0);
}
}
diff --git a/sys/dev/ic/rt2661.c b/sys/dev/ic/rt2661.c
index bb9eabe3f11..caa37d0e1ce 100644
--- a/sys/dev/ic/rt2661.c
+++ b/sys/dev/ic/rt2661.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2661.c,v 1.72 2014/03/19 10:09:19 mpi Exp $ */
+/* $OpenBSD: rt2661.c,v 1.73 2014/07/12 18:48:17 tedu Exp $ */
/*-
* Copyright (c) 2006
@@ -401,7 +401,7 @@ rt2661_detach(void *xsc)
rt2661_free_rx_ring(sc, &sc->rxq);
if (sc->ucode != NULL)
- free(sc->ucode, M_DEVBUF);
+ free(sc->ucode, M_DEVBUF, 0);
return 0;
}
@@ -566,7 +566,7 @@ rt2661_free_tx_ring(struct rt2661_softc *sc, struct rt2661_tx_ring *ring)
if (data->map != NULL)
bus_dmamap_destroy(sc->sc_dmat, data->map);
}
- free(ring->data, M_DEVBUF);
+ free(ring->data, M_DEVBUF, 0);
}
}
@@ -717,7 +717,7 @@ rt2661_free_rx_ring(struct rt2661_softc *sc, struct rt2661_rx_ring *ring)
if (data->map != NULL)
bus_dmamap_destroy(sc->sc_dmat, data->map);
}
- free(ring->data, M_DEVBUF);
+ free(ring->data, M_DEVBUF, 0);
}
}
@@ -758,7 +758,7 @@ rt2661_amrr_node_free(struct rt2661_softc *sc, struct rt2661_amrr_node *amn)
TAILQ_REMOVE(&sc->amn, amn, entry);
sc->amn_count--;
splx(s);
- free(amn, M_DEVBUF);
+ free(amn, M_DEVBUF, 0);
}
void
diff --git a/sys/dev/ic/rt2860.c b/sys/dev/ic/rt2860.c
index 7879145f740..ac22ff942ba 100644
--- a/sys/dev/ic/rt2860.c
+++ b/sys/dev/ic/rt2860.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2860.c,v 1.72 2014/03/19 10:09:19 mpi Exp $ */
+/* $OpenBSD: rt2860.c,v 1.73 2014/07/12 18:48:17 tedu Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -399,7 +399,7 @@ rt2860_detach(void *xsc)
rt2860_free_tx_pool(sc);
if (sc->ucode != NULL)
- free(sc->ucode, M_DEVBUF);
+ free(sc->ucode, M_DEVBUF, 0);
return 0;
}
diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c
index 651e75d91be..f63657cd3bf 100644
--- a/sys/dev/ic/rtw.c
+++ b/sys/dev/ic/rtw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtw.c,v 1.85 2014/07/08 17:19:25 deraadt Exp $ */
+/* $OpenBSD: rtw.c,v 1.86 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: rtw.c,v 1.29 2004/12/27 19:49:16 dyoung Exp $ */
/*-
@@ -690,7 +690,7 @@ rtw_srom_read(struct rtw_regs *regs, u_int32_t flags, struct rtw_srom *sr,
/* TBD bus barriers */
if (!read_seeprom(&sd, sr->sr_content, 0, sr->sr_size/2)) {
printf("\n%s: could not read SROM\n", dvname);
- free(sr->sr_content, M_DEVBUF);
+ free(sr->sr_content, M_DEVBUF, 0);
sr->sr_content = NULL;
return -1; /* XXX */
}
@@ -3629,7 +3629,7 @@ rtw_txsoft_blk_cleanup_all(struct rtw_softc *sc)
for (pri = 0; pri < RTW_NTXPRI; pri++) {
tsb = &sc->sc_txsoft_blk[pri];
- free(tsb->tsb_desc, M_DEVBUF);
+ free(tsb->tsb_desc, M_DEVBUF, 0);
tsb->tsb_desc = NULL;
}
}
@@ -4073,7 +4073,7 @@ fail8:
sr = &sc->sc_srom;
sr->sr_size = 0;
if (sr->sr_content != NULL) {
- free(sr->sr_content, M_DEVBUF);
+ free(sr->sr_content, M_DEVBUF, 0);
sr->sr_content = NULL;
}
diff --git a/sys/dev/ic/sili.c b/sys/dev/ic/sili.c
index 065699d339f..49be864def4 100644
--- a/sys/dev/ic/sili.c
+++ b/sys/dev/ic/sili.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sili.c,v 1.51 2012/02/04 21:44:54 krw Exp $ */
+/* $OpenBSD: sili.c,v 1.52 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -772,7 +772,7 @@ sili_ports_alloc(struct sili_softc *sc)
freeports:
/* bus_space(9) says subregions dont have to be freed */
- free(sp, M_DEVBUF);
+ free(sp, M_DEVBUF, 0);
sc->sc_ports = NULL;
return (1);
}
@@ -791,7 +791,7 @@ sili_ports_free(struct sili_softc *sc)
}
/* bus_space(9) says subregions dont have to be freed */
- free(sc->sc_ports, M_DEVBUF);
+ free(sc->sc_ports, M_DEVBUF, 0);
sc->sc_ports = NULL;
}
@@ -859,7 +859,7 @@ sili_ccb_free(struct sili_port *sp)
while ((ccb = sili_get_ccb(sp)) != NULL)
bus_dmamap_destroy(sc->sc_dmat, ccb->ccb_dmamap);
- free(sp->sp_ccbs, M_DEVBUF);
+ free(sp->sp_ccbs, M_DEVBUF, 0);
sp->sp_ccbs = NULL;
}
@@ -943,7 +943,7 @@ free:
destroy:
bus_dmamap_destroy(sc->sc_dmat, sdm->sdm_map);
sdmfree:
- free(sdm, M_DEVBUF);
+ free(sdm, M_DEVBUF, 0);
return (NULL);
}
@@ -955,7 +955,7 @@ sili_dmamem_free(struct sili_softc *sc, struct sili_dmamem *sdm)
bus_dmamem_unmap(sc->sc_dmat, sdm->sdm_kva, sdm->sdm_size);
bus_dmamem_free(sc->sc_dmat, &sdm->sdm_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, sdm->sdm_map);
- free(sdm, M_DEVBUF);
+ free(sdm, M_DEVBUF, 0);
}
u_int32_t
diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c
index 263db8e03af..d7d4a22d9b2 100644
--- a/sys/dev/ic/siop.c
+++ b/sys/dev/ic/siop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siop.c,v 1.66 2013/05/27 21:19:31 miod Exp $ */
+/* $OpenBSD: siop.c,v 1.67 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: siop.c,v 1.79 2005/11/18 23:10:32 bouyer Exp $ */
/*
@@ -299,7 +299,7 @@ siop_reset(sc)
sc->sc_c.sc_dev.dv_xname, lunsw->lunsw_off);
#endif
TAILQ_REMOVE(&sc->lunsw_list, lunsw, next);
- free(lunsw, M_DEVBUF);
+ free(lunsw, M_DEVBUF, 0);
}
TAILQ_INIT(&sc->lunsw_list);
/* restore reselect switch */
@@ -312,7 +312,7 @@ siop_reset(sc)
sc->sc_c.sc_dev.dv_xname, i);
#endif
target = (struct siop_target *)sc->sc_c.targets[i];
- free(target->lunsw, M_DEVBUF);
+ free(target->lunsw, M_DEVBUF, 0);
target->lunsw = siop_get_lunsw(sc);
if (target->lunsw == NULL) {
printf("%s: can't alloc lunsw for target %d\n",
@@ -1426,7 +1426,7 @@ siop_scsiprobe(struct scsi_link *link)
if (siop_target->lunsw == NULL) {
printf("%s: can't alloc lunsw for target %d\n",
sc->sc_c.sc_dev.dv_xname, target);
- free(siop_target, M_DEVBUF);
+ free(siop_target, M_DEVBUF, 0);
return (ENOMEM);
}
for (i = 0; i < 8; i++)
@@ -1952,9 +1952,9 @@ bad0:
bad1:
siop_dmamem_free(sc, newcbd->xfers);
bad2:
- free(newcbd->cmds, M_DEVBUF);
+ free(newcbd->cmds, M_DEVBUF, 0);
bad3:
- free(newcbd, M_DEVBUF);
+ free(newcbd, M_DEVBUF, 0);
return;
}
@@ -2188,7 +2188,7 @@ siop_scsifree(struct scsi_link *link)
#endif
siop_target = (struct siop_target *)sc->sc_c.targets[target];
- free(siop_target->siop_lun[lun], M_DEVBUF);
+ free(siop_target->siop_lun[lun], M_DEVBUF, 0);
siop_target->siop_lun[lun] = NULL;
/* XXX compact sw entry too ? */
/* check if we can free the whole target */
@@ -2208,7 +2208,7 @@ siop_scsifree(struct scsi_link *link)
siop_script_write(sc, siop_target->reseloff, 0x800c00ff);
siop_script_sync(sc, BUS_DMASYNC_PREWRITE);
TAILQ_INSERT_TAIL(&sc->lunsw_list, siop_target->lunsw, next);
- free(sc->sc_c.targets[target], M_DEVBUF);
+ free(sc->sc_c.targets[target], M_DEVBUF, 0);
sc->sc_c.targets[target] = NULL;
sc->sc_ntargets--;
}
@@ -2265,7 +2265,7 @@ free:
destroy:
bus_dmamap_destroy(sc->sc_c.sc_dmat, sdm->sdm_map);
sdmfree:
- free(sdm, M_DEVBUF);
+ free(sdm, M_DEVBUF, 0);
return (NULL);
}
@@ -2277,6 +2277,6 @@ siop_dmamem_free(struct siop_softc *sc, struct siop_dmamem *sdm)
bus_dmamem_unmap(sc->sc_c.sc_dmat, sdm->sdm_kva, sdm->sdm_size);
bus_dmamem_free(sc->sc_c.sc_dmat, &sdm->sdm_seg, 1);
bus_dmamap_destroy(sc->sc_c.sc_dmat, sdm->sdm_map);
- free(sdm, M_DEVBUF);
+ free(sdm, M_DEVBUF, 0);
}
diff --git a/sys/dev/ic/sti.c b/sys/dev/ic/sti.c
index 12eafb47ddf..3f9ca8d30c7 100644
--- a/sys/dev/ic/sti.c
+++ b/sys/dev/ic/sti.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sti.c,v 1.71 2014/03/28 17:57:11 mpi Exp $ */
+/* $OpenBSD: sti.c,v 1.72 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2000-2003 Michael Shalayeff
@@ -157,7 +157,7 @@ sti_attach_common(struct sti_softc *sc, bus_space_tag_t iot,
rom->rom_softc = sc;
rc = sti_rom_setup(rom, iot, memt, romh, sc->bases, codebase);
if (rc != 0) {
- free(rom, M_DEVBUF);
+ free(rom, M_DEVBUF, 0);
return (rc);
}
@@ -189,7 +189,7 @@ sti_attach_screen(struct sti_softc *sc, int flags)
scr->scr_rom = sc->sc_rom;
rc = sti_screen_setup(scr, flags);
if (rc != 0) {
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
return (NULL);
}
@@ -629,7 +629,7 @@ sti_screen_setup(struct sti_screen *scr, int flags)
fail:
/* XXX free resources */
if (scr->scr_ecfg.addr != NULL) {
- free(scr->scr_ecfg.addr, M_DEVBUF);
+ free(scr->scr_ecfg.addr, M_DEVBUF, 0);
scr->scr_ecfg.addr = NULL;
}
@@ -842,7 +842,7 @@ rescan:
}
}
- free(scr->scr_romfont, M_DEVBUF);
+ free(scr->scr_romfont, M_DEVBUF, 0);
scr->scr_romfont = NULL;
}
#endif
diff --git a/sys/dev/ic/tcic2.c b/sys/dev/ic/tcic2.c
index f04e378055f..52277af36d2 100644
--- a/sys/dev/ic/tcic2.c
+++ b/sys/dev/ic/tcic2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcic2.c,v 1.10 2014/07/08 17:19:25 deraadt Exp $ */
+/* $OpenBSD: tcic2.c,v 1.11 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: tcic2.c,v 1.3 2000/01/13 09:38:17 joda Exp $ */
#undef TCICDEBUG
@@ -499,7 +499,7 @@ tcic_event_thread(arg)
panic("tcic_event_thread: unknown event %d",
pe->pe_type);
}
- free(pe, M_TEMP);
+ free(pe, M_TEMP, 0);
}
h->event_thread = NULL;
diff --git a/sys/dev/ic/ti.c b/sys/dev/ic/ti.c
index 4528c297dea..e547913cdf5 100644
--- a/sys/dev/ic/ti.c
+++ b/sys/dev/ic/ti.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ti.c,v 1.7 2013/10/01 20:06:00 sf Exp $ */
+/* $OpenBSD: ti.c,v 1.8 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -436,7 +436,7 @@ ti_loadfw(struct ti_softc *sc)
TI_FIRMWARE_MAJOR, TI_FIRMWARE_MINOR,
TI_FIRMWARE_FIX, tf->FwReleaseMajor,
tf->FwReleaseMinor, tf->FwReleaseFix);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return;
}
ti_mem_write(sc, tf->FwTextAddr, tf->FwTextLen,
@@ -448,7 +448,7 @@ ti_loadfw(struct ti_softc *sc)
ti_mem_set(sc, tf->FwBssAddr, tf->FwBssLen);
ti_mem_set(sc, tf->FwSbssAddr, tf->FwSbssLen);
CSR_WRITE_4(sc, TI_CPU_PROGRAM_COUNTER, tf->FwStartAddr);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
}
/*
@@ -1048,7 +1048,7 @@ ti_free_tx_ring(struct ti_softc *sc)
while ((entry = SLIST_FIRST(&sc->ti_tx_map_listhead))) {
SLIST_REMOVE_HEAD(&sc->ti_tx_map_listhead, link);
bus_dmamap_destroy(sc->sc_dmatag, entry->dmamap);
- free(entry, M_DEVBUF);
+ free(entry, M_DEVBUF, 0);
}
}
@@ -1187,7 +1187,7 @@ ti_iff(struct ti_softc *sc)
mc = SLIST_FIRST(&sc->ti_mc_listhead);
ti_del_mcast(sc, &mc->mc_addr);
SLIST_REMOVE_HEAD(&sc->ti_mc_listhead, mc_entries);
- free(mc, M_DEVBUF);
+ free(mc, M_DEVBUF, 0);
}
/* Now program new ones. */
diff --git a/sys/dev/ic/trm.c b/sys/dev/ic/trm.c
index f49c8e98883..f8d6f64a3a5 100644
--- a/sys/dev/ic/trm.c
+++ b/sys/dev/ic/trm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trm.c,v 1.31 2013/07/12 20:51:31 krw Exp $
+/* $OpenBSD: trm.c,v 1.32 2014/07/12 18:48:17 tedu Exp $
* ------------------------------------------------------------
* O.S : OpenBSD
* File Name : trm.c
@@ -2066,7 +2066,7 @@ trm_FinishSRB(struct trm_softc *sc, struct trm_scsi_req_q *pSRB)
sc_print_addr(xs->sc_link);
printf("trm_FinishSRB NO Device\n");
#endif
- free(pDCB, M_DEVBUF);
+ free(pDCB, M_DEVBUF, 0);
sc->pDCB[target][lun] = NULL;
pDCB = NULL;
diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c
index 6a536b6bbf4..4561404e111 100644
--- a/sys/dev/ic/vga.c
+++ b/sys/dev/ic/vga.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vga.c,v 1.61 2013/10/20 21:24:00 miod Exp $ */
+/* $OpenBSD: vga.c,v 1.62 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: vga.c,v 1.28.2.1 2000/06/30 16:27:47 simonb Exp $ */
/*-
@@ -702,13 +702,13 @@ vga_free_screen(void *v, void *cookie)
* removes backing store for the last one
*/
if (vc->nscreens == 1)
- free(LIST_FIRST(&vc->screens)->pcs.mem, M_DEVBUF);
+ free(LIST_FIRST(&vc->screens)->pcs.mem, M_DEVBUF, 0);
/* Last screen has no backing store */
if (vc->nscreens != 0)
- free(vs->pcs.mem, M_DEVBUF);
+ free(vs->pcs.mem, M_DEVBUF, 0);
- free(vs, M_DEVBUF);
+ free(vs, M_DEVBUF, 0);
} else
panic("vga_free_screen: console");
diff --git a/sys/dev/ic/wd33c93.c b/sys/dev/ic/wd33c93.c
index 6aadfa2f0b7..946cf95f3cb 100644
--- a/sys/dev/ic/wd33c93.c
+++ b/sys/dev/ic/wd33c93.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd33c93.c,v 1.6 2014/06/27 17:51:08 miod Exp $ */
+/* $OpenBSD: wd33c93.c,v 1.7 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: wd33c93.c,v 1.24 2010/11/13 13:52:02 uebayasi Exp $ */
/*
@@ -813,7 +813,7 @@ wd33c93_scsidone(struct wd33c93_softc *sc, struct wd33c93_acb *acb, int status)
if (li->untagged == NULL && li->used == 0) {
if (sc_link->lun < SBIC_NLUN)
ti->lun[sc_link->lun] = NULL;
- free(li, M_DEVBUF);
+ free(li, M_DEVBUF, 0);
li = NULL;
}
}
@@ -2295,7 +2295,7 @@ wd33c93_watchdog(void *arg)
if (li && li->last_used < old &&
li->untagged == NULL && li->used == 0) {
ti->lun[li->lun] = NULL;
- free(li, M_DEVBUF);
+ free(li, M_DEVBUF, 0);
}
splx(s);
}
diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c
index cb3a1fcc789..fc0a664bf78 100644
--- a/sys/dev/ic/wdc.c
+++ b/sys/dev/ic/wdc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wdc.c,v 1.124 2014/07/08 17:19:25 deraadt Exp $ */
+/* $OpenBSD: wdc.c,v 1.125 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: wdc.c,v 1.68 1999/06/23 19:00:17 bouyer Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -732,7 +732,7 @@ wdc_alloc_queue(void)
void
wdc_free_queue(struct channel_queue *queue)
{
- free(queue, M_DEVBUF);
+ free(queue, M_DEVBUF, 0);
}
void
@@ -2144,7 +2144,7 @@ wdc_ioctl(struct ata_drive_datas *drvp, u_long xfer, caddr_t addr, int flag,
if (log_to_copy != NULL) {
error = copyout(log_to_copy, agt->buf, size);
- free(log_to_copy, M_TEMP);
+ free(log_to_copy, M_TEMP, 0);
}
agt->bytes_copied = size;
diff --git a/sys/dev/ipmi.c b/sys/dev/ipmi.c
index aa8f62d1edc..fd0aff8410a 100644
--- a/sys/dev/ipmi.c
+++ b/sys/dev/ipmi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipmi.c,v 1.71 2014/07/08 17:19:25 deraadt Exp $ */
+/* $OpenBSD: ipmi.c,v 1.72 2014/07/12 18:48:17 tedu Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave
@@ -1026,7 +1026,7 @@ ipmi_sendcmd(struct ipmi_softc *sc, int rssa, int rslun, int netfn, int cmd,
goto done;
}
rc = sc->sc_if->sendmsg(sc, txlen, buf);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
ipmi_delay(sc, 5); /* give bmc chance to digest command */
@@ -1066,7 +1066,7 @@ ipmi_recvcmd(struct ipmi_softc *sc, int maxlen, int *rxlen, void *data)
*rxlen);
dbg_dump(10, " recv", *rxlen, data);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
ipmi_delay(sc, 5); /* give bmc chance to digest command */
@@ -1156,14 +1156,14 @@ get_sdr(struct ipmi_softc *sc, u_int16_t recid, u_int16_t *nxtrec)
psdr + offset, NULL)) {
printf("%s: get chunk: %d,%d fails\n", DEVNAME(sc),
offset, len);
- free(psdr, M_DEVBUF);
+ free(psdr, M_DEVBUF, 0);
return (1);
}
}
/* Add SDR to sensor list, if not wanted, free buffer */
if (add_sdr_sensor(sc, psdr) == 0)
- free(psdr, M_DEVBUF);
+ free(psdr, M_DEVBUF, 0);
return (0);
}
diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c
index 7527427742a..e159e700bd7 100644
--- a/sys/dev/isa/fd.c
+++ b/sys/dev/isa/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.99 2014/06/15 11:43:24 sf Exp $ */
+/* $OpenBSD: fd.c,v 1.100 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */
/*-
@@ -1014,7 +1014,7 @@ fdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *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:
@@ -1113,6 +1113,6 @@ fdformat(dev_t dev, struct fd_formb *finfo, struct proc *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/dev/isa/gus.c b/sys/dev/isa/gus.c
index 1fa77ae8833..4358c94b90d 100644
--- a/sys/dev/isa/gus.c
+++ b/sys/dev/isa/gus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gus.c,v 1.39 2013/11/15 16:46:27 brad Exp $ */
+/* $OpenBSD: gus.c,v 1.40 2014/07/12 18:48:17 tedu Exp $ */
/* $NetBSD: gus.c,v 1.51 1998/01/25 23:48:06 mycroft Exp $ */
/*-
@@ -618,7 +618,7 @@ gusclose(void *addr)
sc->sc_flags &= ~(GUS_OPEN|GUS_LOCKED|GUS_DMAOUT_ACTIVE|GUS_DMAIN_ACTIVE);
if (sc->sc_deintr_buf) {
- free(sc->sc_deintr_buf, M_DEVBUF);
+ free(sc->sc_deintr_buf, M_DEVBUF, 0);
sc->sc_deintr_buf = NULL;
}
/* turn off speaker, etc. */
@@ -1579,7 +1579,7 @@ gus_round_blocksize(addr, blocksize)
/* set up temporary buffer to hold the deinterleave, if necessary
for stereo output */
if (sc->sc_deintr_buf) {
- free(sc->sc_deintr_buf, M_DEVBUF);
+ free(sc->sc_deintr_buf, M_DEVBUF, 0);
sc->sc_deintr_buf = NULL;
}
sc->sc_deintr_buf = malloc(blocksize/2, M_DEVBUF, M_WAITOK);
diff --git a/sys/dev/isa/isa.c b/sys/dev/isa/isa.c
index f817620e328..5def3845b83 100644
--- a/sys/dev/isa/isa.c
+++ b/sys/dev/isa/isa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isa.c,v 1.41 2013/05/30 16:15:02 deraadt Exp $ */
+/* $OpenBSD: isa.c,v 1.42 2014/07/12 18:48:18 tedu Exp $ */
/* $NetBSD: isa.c,v 1.85 1996/05/14 00:31:04 thorpej Exp $ */
/*
@@ -240,7 +240,7 @@ isascan(parent, match)
if (autoconf_verbose)
printf(">>> probing for %s* finished\n",
cf->cf_driver->cd_name);
- free(dev, M_DEVBUF);
+ free(dev, M_DEVBUF, 0);
return;
}
@@ -253,7 +253,7 @@ isascan(parent, match)
!isa_intr_check(sc->sc_ic, ia.ia_irq, IST_EDGE)) {
printf("%s%d: irq %d already in use\n",
cf->cf_driver->cd_name, cf->cf_unit, ia.ia_irq);
- free(dev, M_DEVBUF);
+ free(dev, M_DEVBUF, 0);
} else {
#endif
if (autoconf_verbose)
@@ -274,7 +274,7 @@ isascan(parent, match)
if (autoconf_verbose)
printf(">>> probing for %s%d failed\n",
cf->cf_driver->cd_name, cf->cf_unit);
- free(dev, M_DEVBUF);
+ free(dev, M_DEVBUF, 0);
}
}
diff --git a/sys/dev/isa/isadma.c b/sys/dev/isa/isadma.c
index 0099c74c9d7..74b73896a44 100644
--- a/sys/dev/isa/isadma.c
+++ b/sys/dev/isa/isadma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isadma.c,v 1.31 2008/06/26 05:42:16 ray Exp $ */
+/* $OpenBSD: isadma.c,v 1.32 2014/07/12 18:48:18 tedu Exp $ */
/* $NetBSD: isadma.c,v 1.32 1997/09/05 01:48:33 thorpej Exp $ */
/*-
@@ -719,7 +719,7 @@ isa_free(addr, pool)
*mp = m->next;
isa_dmamem_unmap(m->isadev, m->chan, kva, m->size);
isa_dmamem_free(m->isadev, m->chan, m->addr, m->size);
- free(m, pool);
+ free(m, pool, 0);
}
paddr_t
diff --git a/sys/dev/isa/isapnp.c b/sys/dev/isa/isapnp.c
index c29feb8c056..2b5911aec54 100644
--- a/sys/dev/isa/isapnp.c
+++ b/sys/dev/isa/isapnp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isapnp.c,v 1.40 2011/06/29 12:17:40 tedu Exp $ */
+/* $OpenBSD: isapnp.c,v 1.41 2014/07/12 18:48:18 tedu Exp $ */
/* $NetBSD: isapnp.c,v 1.9.4.3 1997/10/29 00:40:43 thorpej Exp $ */
/*
@@ -427,7 +427,7 @@ isapnp_bestconfig(isa, sc, ipa)
return best;
}
- free(best, M_DEVBUF);
+ free(best, M_DEVBUF, 0);
continue;
}
else {
@@ -439,7 +439,7 @@ isapnp_bestconfig(isa, sc, ipa)
continue;
d = c->ipa_sibling;
if (SAMEDEV(c, best))
- free(c, M_DEVBUF);
+ free(c, M_DEVBUF, 0);
else {
if (n)
n->ipa_sibling = c;
@@ -923,7 +923,7 @@ isapnp_attach(parent, self, aux)
if (lpa->ipa_pref == ISAPNP_DEP_CONFLICTING) {
isapnp_print(lpa, self->dv_xname);
printf(" resource conflict\n");
- free(lpa, M_DEVBUF);
+ free(lpa, M_DEVBUF, 0);
continue;
}
@@ -948,7 +948,7 @@ isapnp_attach(parent, self, aux)
printf(" not configured\n");
isapnp_write_reg(sc, ISAPNP_ACTIVATE, 0);
}
- free(lpa, M_DEVBUF);
+ free(lpa, M_DEVBUF, 0);
}
isapnp_write_reg(sc, ISAPNP_WAKE, 0); /* Good night cards */
}
diff --git a/sys/dev/isa/isapnpres.c b/sys/dev/isa/isapnpres.c
index a45b0c654e4..5c5a82beb18 100644
--- a/sys/dev/isa/isapnpres.c
+++ b/sys/dev/isa/isapnpres.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isapnpres.c,v 1.8 2013/11/15 16:46:27 brad Exp $ */
+/* $OpenBSD: isapnpres.c,v 1.9 2014/07/12 18:48:18 tedu Exp $ */
/* $NetBSD: isapnpres.c,v 1.7.4.1 1997/11/20 07:46:13 mellon Exp $ */
/*
@@ -177,7 +177,7 @@ isapnp_flatten(struct isa_attach_args *card)
struct isa_attach_args *dev, *conf, *d, *c, *pa;
dev = card->ipa_child;
- free(card, M_DEVBUF);
+ free(card, M_DEVBUF, 0);
for (conf = c = NULL, d = dev; d; d = dev) {
dev = d->ipa_sibling;
@@ -198,7 +198,7 @@ isapnp_flatten(struct isa_attach_args *card)
isapnp_merge(pa, d);
pa = d->ipa_child;
- free(d, M_DEVBUF);
+ free(d, M_DEVBUF, 0);
}
if (c == NULL)
@@ -514,7 +514,7 @@ parse:
bad:
for (card = isapnp_flatten(card); card; ) {
dev = card->ipa_sibling;
- free(card, M_DEVBUF);
+ free(card, M_DEVBUF, 0);
card = dev;
}
printf("%s: %s, card %d\n", sc->sc_dev.dv_xname,
diff --git a/sys/dev/isa/spkr.c b/sys/dev/isa/spkr.c
index 8e9d022fe2a..085eb98a769 100644
--- a/sys/dev/isa/spkr.c
+++ b/sys/dev/isa/spkr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spkr.c,v 1.15 2014/07/10 14:21:20 deraadt Exp $ */
+/* $OpenBSD: spkr.c,v 1.16 2014/07/12 18:48:18 tedu Exp $ */
/* $NetBSD: spkr.c,v 1.1 1998/04/15 20:26:18 drochner Exp $ */
/*
@@ -452,7 +452,7 @@ spkrclose(dev_t dev, int flags, int mode, struct proc *p)
return (ENXIO);
else {
tone(0, 0);
- free(spkr_inbuf, M_DEVBUF);
+ free(spkr_inbuf, M_DEVBUF, 0);
spkr_active = 0;
}
return (0);
diff --git a/sys/dev/microcode/aic7xxx/aicasm_symbol.c b/sys/dev/microcode/aic7xxx/aicasm_symbol.c
index 7b3c2a8f3a0..3474ec074c0 100644
--- a/sys/dev/microcode/aic7xxx/aicasm_symbol.c
+++ b/sys/dev/microcode/aic7xxx/aicasm_symbol.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aicasm_symbol.c,v 1.11 2012/12/05 23:20:19 deraadt Exp $ */
+/* $OpenBSD: aicasm_symbol.c,v 1.12 2014/07/12 18:48:18 tedu Exp $ */
/* $NetBSD: aicasm_symbol.c,v 1.4 2003/07/14 15:42:40 lukem Exp $ */
/*
@@ -96,11 +96,11 @@ symbol_delete(symbol_t *symbol)
case SRAMLOC:
case REGISTER:
if (symbol->info.rinfo != NULL)
- free(symbol->info.rinfo);
+ free(symbol->info.rinfo, 0);
break;
case ALIAS:
if (symbol->info.ainfo != NULL)
- free(symbol->info.ainfo);
+ free(symbol->info.ainfo, 0);
break;
case MASK:
case FIELD:
@@ -108,24 +108,24 @@ symbol_delete(symbol_t *symbol)
case ENUM_ENTRY:
if (symbol->info.finfo != NULL) {
symlist_free(&symbol->info.finfo->symrefs);
- free(symbol->info.finfo);
+ free(symbol->info.finfo, 0);
}
break;
case DOWNLOAD_CONST:
case CONST:
if (symbol->info.cinfo != NULL)
- free(symbol->info.cinfo);
+ free(symbol->info.cinfo, 0);
break;
case LABEL:
if (symbol->info.linfo != NULL)
- free(symbol->info.linfo);
+ free(symbol->info.linfo, 0);
break;
case UNINITIALIZED:
default:
break;
}
- free(symbol->name);
- free(symbol);
+ free(symbol->name, 0);
+ free(symbol, 0);
}
void
@@ -299,7 +299,7 @@ symlist_free(symlist_t *symlist)
node1 = SLIST_FIRST(symlist);
while (node1 != NULL) {
node2 = SLIST_NEXT(node1, links);
- free(node1);
+ free(node1, 0);
node1 = node2;
}
SLIST_INIT(symlist);
@@ -632,7 +632,7 @@ symtable_dump(FILE *ofile, FILE *dfile)
fprintf(ofile, "#define%s%-16s%s0x%02x\n",
tab_str, curnode->symbol->name, tab_str2,
value);
- free(curnode);
+ free(curnode, 0);
}
fprintf(ofile, "\n\n");
@@ -644,7 +644,7 @@ symtable_dump(FILE *ofile, FILE *dfile)
fprintf(ofile, "#define\t%-8s\t0x%02x\n",
curnode->symbol->name,
curnode->symbol->info.cinfo->value);
- free(curnode);
+ free(curnode, 0);
}
@@ -658,7 +658,7 @@ symtable_dump(FILE *ofile, FILE *dfile)
fprintf(ofile, "#define\t%-8s\t0x%02x\n",
curnode->symbol->name,
curnode->symbol->info.cinfo->value);
- free(curnode);
+ free(curnode, 0);
}
fprintf(ofile, "#define\tDOWNLOAD_CONST_COUNT\t0x%02x\n", i);
@@ -672,7 +672,7 @@ symtable_dump(FILE *ofile, FILE *dfile)
fprintf(ofile, "#define\tLABEL_%-8s\t0x%02x\n",
curnode->symbol->name,
curnode->symbol->info.linfo->address);
- free(curnode);
+ free(curnode, 0);
}
}
diff --git a/sys/dev/microcode/bnx/build.c b/sys/dev/microcode/bnx/build.c
index 06ed4d89aff..47e62305bc7 100644
--- a/sys/dev/microcode/bnx/build.c
+++ b/sys/dev/microcode/bnx/build.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: build.c,v 1.5 2009/07/03 04:34:51 dlg Exp $ */
+/* $OpenBSD: build.c,v 1.6 2014/07/12 18:48:18 tedu Exp $ */
/*
* Copyright (c) 2004 Theo de Raadt <deraadt@openbsd.org>
@@ -297,7 +297,7 @@ main(int argc, char *argv[])
write_firmware(FILENAME_B09, bf, sizeof(*bf), chunks_b09,
nitems(chunks_b09));
- free(bf);
+ free(bf, 0);
rh = (struct bnx_rv2p_header *)malloc(sizeof *rh);
@@ -328,7 +328,7 @@ main(int argc, char *argv[])
write_firmware(FILENAME_XI90_RV2P, rh, sizeof(*rh), chunks_xi90_rv2p,
nitems(chunks_xi90_rv2p));
- free(rh);
+ free(rh, 0);
return 0;
}
diff --git a/sys/dev/microcode/bwi/build/build.c b/sys/dev/microcode/bwi/build/build.c
index d93be003090..e286e82f3a3 100644
--- a/sys/dev/microcode/bwi/build/build.c
+++ b/sys/dev/microcode/bwi/build/build.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: build.c,v 1.1 2007/10/04 17:46:09 mglocker Exp $ */
+/* $OpenBSD: build.c,v 1.2 2014/07/12 18:48:18 tedu Exp $ */
/*
* Copyright (c) 2006 Marcus Glocker <mglocker@openbsd.org>
@@ -131,18 +131,18 @@ main(int argc, char *argv[])
err(1, "malloc");
}
if (read(fdin, p, h[i].filesize) < 1) {
- free(p);
+ free(p, 0);
close(fdout);
close(fdin);
err(1, "read input file failed\n");
}
if (write(fdout, p, h[i].filesize) < 1) {
- free(p);
+ free(p, 0);
close(fdout);
close(fdin);
err(1, "write to output file failed\n");
}
- free(p);
+ free(p, 0);
close(fdin);
}
diff --git a/sys/dev/microcode/bwi/extract/extract.c b/sys/dev/microcode/bwi/extract/extract.c
index 2aee0d8aea5..0c91ab8ebee 100644
--- a/sys/dev/microcode/bwi/extract/extract.c
+++ b/sys/dev/microcode/bwi/extract/extract.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: extract.c,v 1.1 2007/10/04 17:46:09 mglocker Exp $ */
+/* $OpenBSD: extract.c,v 1.2 2014/07/12 18:48:18 tedu Exp $ */
/*
* Copyright (c) 2006 Marcus Glocker <mglocker@openbsd.org>
@@ -85,7 +85,7 @@ main(int argc, char *argv[])
err(1, "read from input file failed");
if (write(fdout, p, h[i]->filesize) < 1)
err(1, "write to output file failed");
- free(p);
+ free(p, 0);
close(fdout);
printf("extracting %s (filesize %d, fileoffset %d)\n",
h[i]->filename, h[i]->filesize, h[i]->fileoffset);
@@ -93,8 +93,8 @@ main(int argc, char *argv[])
/* free header space */
for (i = 0; i < nfiles; i++)
- free(h[i]);
- free(h);
+ free(h[i], 0);
+ free(h, 0);
/* game over */
close (fdin);
diff --git a/sys/dev/microcode/kue/build.c b/sys/dev/microcode/kue/build.c
index aaf8003279e..55f06583419 100644
--- a/sys/dev/microcode/kue/build.c
+++ b/sys/dev/microcode/kue/build.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: build.c,v 1.4 2007/01/09 16:30:06 deraadt Exp $ */
+/* $OpenBSD: build.c,v 1.5 2014/07/12 18:48:18 tedu Exp $ */
/*
* Copyright (c) 2004 Theo de Raadt <deraadt@openbsd.org>
@@ -65,7 +65,7 @@ main(int argc, char *argv[])
err(1, "%s", FILENAME);
if (rlen != len)
errx(1, "%s: short write", FILENAME);
- free(kf);
+ free(kf, 0);
close(fd);
return 0;
}
diff --git a/sys/dev/microcode/myx/build.c b/sys/dev/microcode/myx/build.c
index 7a12c39593a..a66764250fb 100644
--- a/sys/dev/microcode/myx/build.c
+++ b/sys/dev/microcode/myx/build.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: build.c,v 1.2 2011/07/08 03:58:27 dlg Exp $ */
+/* $OpenBSD: build.c,v 1.3 2014/07/12 18:48:18 tedu Exp $ */
/*
* Copyright (c) 2007 Reyk Floeter <reyk@openbsd.org>
@@ -82,7 +82,7 @@ myx_build_firmware(u_int8_t *fw, size_t len, size_t ulen, const char *file)
} while (total < ulen);
printf("%s: len %zu -> %zu\n", file, len, ulen);
- free(ufw);
+ free(ufw, 0);
fclose(f);
}
diff --git a/sys/dev/microcode/tigon/build.c b/sys/dev/microcode/tigon/build.c
index 5498eecb381..048de9c3674 100644
--- a/sys/dev/microcode/tigon/build.c
+++ b/sys/dev/microcode/tigon/build.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: build.c,v 1.6 2009/08/29 22:53:23 kettenis Exp $ */
+/* $OpenBSD: build.c,v 1.7 2014/07/12 18:48:18 tedu Exp $ */
/*
* Copyright (c) 2004 Theo de Raadt <deraadt@openbsd.org>
@@ -95,7 +95,7 @@ output(const char *name,
err(1, "%s", name);
if (rlen != len)
errx(1, "%s: short write", name);
- free(tf);
+ free(tf, 0);
close(fd);
}
diff --git a/sys/dev/microcode/yds/build.c b/sys/dev/microcode/yds/build.c
index 1dfd81ffcf0..392a250803e 100644
--- a/sys/dev/microcode/yds/build.c
+++ b/sys/dev/microcode/yds/build.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: build.c,v 1.4 2007/01/06 02:48:42 deraadt Exp $ */
+/* $OpenBSD: build.c,v 1.5 2014/07/12 18:48:18 tedu Exp $ */
/*
* Copyright (c) 2004 Theo de Raadt <deraadt@openbsd.org>
@@ -81,7 +81,7 @@ main(int argc, char *argv[])
err(1, "%s", FILENAME);
if (rlen != len)
errx(1, "%s: short write", FILENAME);
- free(yf);
+ free(yf, 0);
close(fd);
return 0;
}
diff --git a/sys/dev/onewire/onewire.c b/sys/dev/onewire/onewire.c
index 7cf3eff1875..cd7f94bbe4c 100644
--- a/sys/dev/onewire/onewire.c
+++ b/sys/dev/onewire/onewire.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: onewire.c,v 1.14 2013/11/18 20:21:51 deraadt Exp $ */
+/* $OpenBSD: onewire.c,v 1.15 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2006 Alexander Yurchenko <grange@openbsd.org>
@@ -494,7 +494,7 @@ out:
if (d->d_dev != NULL)
config_detach(d->d_dev, DETACH_FORCE);
TAILQ_REMOVE(&sc->sc_devs, d, d_list);
- free(d, M_DEVBUF);
+ free(d, M_DEVBUF, 0);
}
}
}
diff --git a/sys/dev/onewire/owctr.c b/sys/dev/onewire/owctr.c
index 918c41cadc7..5b47ac922bb 100644
--- a/sys/dev/onewire/owctr.c
+++ b/sys/dev/onewire/owctr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: owctr.c,v 1.4 2010/07/19 23:44:09 deraadt Exp $ */
+/* $OpenBSD: owctr.c,v 1.5 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2010 John L. Scarfone <john@scarfone.net>
*
@@ -213,7 +213,7 @@ owctr_update_counter(void *arg, int bank)
}
onewire_reset(sc->sc_onewire);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
done:
onewire_unlock(sc->sc_onewire);
diff --git a/sys/dev/pci/agp.c b/sys/dev/pci/agp.c
index 7661a60dabb..3b515a2ca6a 100644
--- a/sys/dev/pci/agp.c
+++ b/sys/dev/pci/agp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: agp.c,v 1.43 2014/03/26 14:41:41 mpi Exp $ */
+/* $OpenBSD: agp.c,v 1.44 2014/07/12 18:48:51 tedu Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
* All rights reserved.
@@ -240,7 +240,7 @@ agp_alloc_gatt(bus_dma_tag_t dmat, u_int32_t apsize)
if (agp_alloc_dmamem(dmat, gatt->ag_size, &gatt->ag_dmamap,
&gatt->ag_physical, &gatt->ag_dmaseg) != 0) {
- free(gatt, M_AGP);
+ free(gatt, M_AGP, 0);
return (NULL);
}
@@ -248,7 +248,7 @@ agp_alloc_gatt(bus_dma_tag_t dmat, u_int32_t apsize)
(caddr_t *)&gatt->ag_virtual, BUS_DMA_NOWAIT) != 0) {
agp_free_dmamem(dmat, gatt->ag_size, gatt->ag_dmamap,
&gatt->ag_dmaseg);
- free(gatt, M_AGP);
+ free(gatt, M_AGP, 0);
return (NULL);
}
@@ -262,7 +262,7 @@ agp_free_gatt(bus_dma_tag_t dmat, struct agp_gatt *gatt)
{
bus_dmamem_unmap(dmat, (caddr_t)gatt->ag_virtual, gatt->ag_size);
agp_free_dmamem(dmat, gatt->ag_size, gatt->ag_dmamap, &gatt->ag_dmaseg);
- free(gatt, M_AGP);
+ free(gatt, M_AGP, 0);
}
int
@@ -340,7 +340,7 @@ agp_generic_alloc_memory(struct agp_softc *sc, int type, vsize_t size)
if (bus_dmamap_create(sc->sc_dmat, size, size / PAGE_SIZE + 1,
size, 0, BUS_DMA_NOWAIT, &mem->am_dmamap) != 0) {
- free(mem, M_AGP);
+ free(mem, M_AGP, 0);
return (NULL);
}
@@ -361,7 +361,7 @@ agp_generic_free_memory(struct agp_softc *sc, struct agp_memory *mem)
sc->sc_allocated -= mem->am_size;
TAILQ_REMOVE(&sc->sc_memory, mem, am_link);
bus_dmamap_destroy(sc->sc_dmat, mem->am_dmamap);
- free(mem, M_AGP);
+ free(mem, M_AGP, 0);
return (0);
}
@@ -401,7 +401,7 @@ agp_generic_bind_memory(struct agp_softc *sc, struct agp_memory *mem,
segs = malloc(nseg * sizeof *segs, M_AGP, M_WAITOK);
if ((error = bus_dmamem_alloc(sc->sc_dmat, mem->am_size, PAGE_SIZE, 0,
segs, nseg, &mem->am_nseg, BUS_DMA_ZERO | BUS_DMA_WAITOK)) != 0) {
- free(segs, M_AGP);
+ free(segs, M_AGP, 0);
rw_exit_write(&sc->sc_lock);
AGP_DPF("bus_dmamem_alloc failed %d\n", error);
return (error);
@@ -409,7 +409,7 @@ agp_generic_bind_memory(struct agp_softc *sc, struct agp_memory *mem,
if ((error = bus_dmamap_load_raw(sc->sc_dmat, mem->am_dmamap, segs,
mem->am_nseg, mem->am_size, BUS_DMA_WAITOK)) != 0) {
bus_dmamem_free(sc->sc_dmat, segs, mem->am_nseg);
- free(segs, M_AGP);
+ free(segs, M_AGP, 0);
rw_exit_write(&sc->sc_lock);
AGP_DPF("bus_dmamap_load failed %d\n", error);
return (error);
@@ -488,7 +488,7 @@ agp_generic_unbind_memory(struct agp_softc *sc, struct agp_memory *mem)
bus_dmamap_unload(sc->sc_dmat, mem->am_dmamap);
bus_dmamem_free(sc->sc_dmat, mem->am_dmaseg, mem->am_nseg);
- free(mem->am_dmaseg, M_AGP);
+ free(mem->am_dmaseg, M_AGP, 0);
mem->am_offset = 0;
mem->am_is_bound = 0;
diff --git a/sys/dev/pci/agp_amd.c b/sys/dev/pci/agp_amd.c
index f04f984401d..e87b5b8b569 100644
--- a/sys/dev/pci/agp_amd.c
+++ b/sys/dev/pci/agp_amd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: agp_amd.c,v 1.19 2014/05/27 12:40:00 kettenis Exp $ */
+/* $OpenBSD: agp_amd.c,v 1.20 2014/07/12 18:48:51 tedu Exp $ */
/* $NetBSD: agp_amd.c,v 1.6 2001/10/06 02:48:50 thorpej Exp $ */
/*-
@@ -119,7 +119,7 @@ agp_amd_alloc_gatt(bus_dma_tag_t dmat, bus_size_t apsize)
if (agp_alloc_dmamem(dmat, gatt->ag_size, &gatt->ag_dmamap,
&gatt->ag_pdir, &gatt->ag_dmaseg) != 0) {
printf("failed to allocate GATT\n");
- free(gatt, M_AGP);
+ free(gatt, M_AGP, 0);
return (NULL);
}
@@ -128,7 +128,7 @@ agp_amd_alloc_gatt(bus_dma_tag_t dmat, bus_size_t apsize)
printf("failed to map GATT\n");
agp_free_dmamem(dmat, gatt->ag_size, gatt->ag_dmamap,
&gatt->ag_dmaseg);
- free(gatt, M_AGP);
+ free(gatt, M_AGP, 0);
return (NULL);
}
diff --git a/sys/dev/pci/agp_i810.c b/sys/dev/pci/agp_i810.c
index 8ba5968e236..4d33120f4b2 100644
--- a/sys/dev/pci/agp_i810.c
+++ b/sys/dev/pci/agp_i810.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: agp_i810.c,v 1.86 2014/05/12 19:29:16 kettenis Exp $ */
+/* $OpenBSD: agp_i810.c,v 1.87 2014/07/12 18:48:51 tedu Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
@@ -509,7 +509,7 @@ out:
if (isc->gatt->ag_size != 0)
agp_free_dmamem(pa->pa_dmat, isc->gatt->ag_size,
isc->gatt->ag_dmamap, &isc->gatt->ag_dmaseg);
- free(isc->gatt, M_AGP);
+ free(isc->gatt, M_AGP, 0);
}
if (isc->gtt_map != NULL)
vga_pci_bar_unmap(isc->gtt_map);
@@ -645,14 +645,14 @@ agp_i810_alloc_memory(void *softc, int type, vsize_t size)
*/
if ((mem->am_dmaseg = malloc(sizeof (*mem->am_dmaseg), M_AGP,
M_WAITOK | M_CANFAIL)) == NULL) {
- free(mem, M_AGP);
+ free(mem, M_AGP, 0);
return (NULL);
}
if ((error = agp_alloc_dmamem(sc->sc_dmat, size,
&mem->am_dmamap, &mem->am_physical, mem->am_dmaseg)) != 0) {
- free(mem->am_dmaseg, M_AGP);
- free(mem, M_AGP);
+ free(mem->am_dmaseg, M_AGP, 0);
+ free(mem, M_AGP, 0);
printf("agp: agp_alloc_dmamem(%d)\n", error);
return (NULL);
}
@@ -660,7 +660,7 @@ agp_i810_alloc_memory(void *softc, int type, vsize_t size)
if ((error = bus_dmamap_create(sc->sc_dmat, size,
size / PAGE_SIZE + 1, size, 0, BUS_DMA_NOWAIT,
&mem->am_dmamap)) != 0) {
- free(mem, M_AGP);
+ free(mem, M_AGP, 0);
printf("agp: bus_dmamap_create(%d)\n", error);
return (NULL);
}
@@ -684,14 +684,14 @@ agp_i810_free_memory(void *softc, struct agp_memory *mem)
if (mem->am_type == 2) {
agp_free_dmamem(sc->sc_dmat, mem->am_size, mem->am_dmamap,
mem->am_dmaseg);
- free(mem->am_dmaseg, M_AGP);
+ free(mem->am_dmaseg, M_AGP, 0);
} else if (mem->am_type != 1) {
bus_dmamap_destroy(sc->sc_dmat, mem->am_dmamap);
}
sc->sc_allocated -= mem->am_size;
TAILQ_REMOVE(&sc->sc_memory, mem, am_link);
- free(mem, M_AGP);
+ free(mem, M_AGP, 0);
return (0);
}
diff --git a/sys/dev/pci/ahd_pci.c b/sys/dev/pci/ahd_pci.c
index a05f87f32c6..0711e3332a1 100644
--- a/sys/dev/pci/ahd_pci.c
+++ b/sys/dev/pci/ahd_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahd_pci.c,v 1.23 2013/11/18 17:40:39 guenther Exp $ */
+/* $OpenBSD: ahd_pci.c,v 1.24 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
@@ -771,7 +771,7 @@ ahd_check_extport(struct ahd_softc *ahd)
ahd->flags |= AHD_USEDEFAULTS;
error = ahd_default_config(ahd);
adapter_control = CFAUTOTERM|CFSEAUTOTERM;
- free(ahd->seep_config, M_DEVBUF);
+ free(ahd->seep_config, M_DEVBUF, 0);
ahd->seep_config = NULL;
} else {
error = ahd_parse_cfgdata(ahd, sc);
diff --git a/sys/dev/pci/arc.c b/sys/dev/pci/arc.c
index 2d9d041d66f..bc569d83b96 100644
--- a/sys/dev/pci/arc.c
+++ b/sys/dev/pci/arc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arc.c,v 1.101 2014/02/08 16:02:42 chris Exp $ */
+/* $OpenBSD: arc.c,v 1.102 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -1935,7 +1935,7 @@ arc_bio_alarm_state(struct arc_softc *sc, struct bioc_alarm *ba)
ba->ba_status = sysinfo->alarm;
out:
- free(sysinfo, M_TEMP);
+ free(sysinfo, M_TEMP, 0);
return (error);
}
@@ -1994,8 +1994,8 @@ arc_bio_inq(struct arc_softc *sc, struct bioc_inq *bi)
DPRINTF("%s: volume set number = %d\n", DEVNAME(sc), nvols);
out:
arc_unlock(sc);
- free(volinfo, M_TEMP);
- free(sysinfo, M_TEMP);
+ free(volinfo, M_TEMP, 0);
+ free(sysinfo, M_TEMP, 0);
return (error);
}
@@ -2078,7 +2078,7 @@ arc_bio_getvol(struct arc_softc *sc, int vol, struct arc_fw_volinfo *volinfo)
}
out:
- free(sysinfo, M_TEMP);
+ free(sysinfo, M_TEMP, 0);
return (error);
}
@@ -2158,7 +2158,7 @@ arc_bio_vol(struct arc_softc *sc, struct bioc_vol *bv)
}
out:
- free(volinfo, M_TEMP);
+ free(volinfo, M_TEMP, 0);
return (error);
}
@@ -2247,9 +2247,9 @@ arc_bio_disk(struct arc_softc *sc, struct bioc_disk *bd)
out:
arc_unlock(sc);
- free(diskinfo, M_TEMP);
- free(raidinfo, M_TEMP);
- free(volinfo, M_TEMP);
+ free(diskinfo, M_TEMP, 0);
+ free(raidinfo, M_TEMP, 0);
+ free(volinfo, M_TEMP, 0);
return (error);
}
@@ -2500,8 +2500,8 @@ arc_msgbuf(struct arc_softc *sc, void *wptr, size_t wbuflen, void *rptr,
}
out:
- free(wbuf, M_TEMP);
- free(rbuf, M_TEMP);
+ free(wbuf, M_TEMP, 0);
+ free(rbuf, M_TEMP, 0);
return (error);
}
@@ -2651,7 +2651,7 @@ arc_create_sensors(void *xsc, void *arg)
return;
bad:
- free(sc->sc_sensors, M_DEVBUF);
+ free(sc->sc_sensors, M_DEVBUF, 0);
}
void
@@ -2855,7 +2855,7 @@ free:
destroy:
bus_dmamap_destroy(sc->sc_dmat, adm->adm_map);
admfree:
- free(adm, M_DEVBUF);
+ free(adm, M_DEVBUF, 0);
return (NULL);
}
@@ -2867,7 +2867,7 @@ arc_dmamem_free(struct arc_softc *sc, struct arc_dmamem *adm)
bus_dmamem_unmap(sc->sc_dmat, adm->adm_kva, adm->adm_size);
bus_dmamem_free(sc->sc_dmat, &adm->adm_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, adm->adm_map);
- free(adm, M_DEVBUF);
+ free(adm, M_DEVBUF, 0);
}
int
@@ -2937,7 +2937,7 @@ free_maps:
arc_dmamem_free(sc, sc->sc_requests);
free_ccbs:
- free(sc->sc_ccbs, M_DEVBUF);
+ free(sc->sc_ccbs, M_DEVBUF, 0);
return (1);
}
@@ -2950,7 +2950,7 @@ arc_free_ccb_src(struct arc_softc *sc)
while ((ccb = arc_get_ccb(sc)) != NULL)
bus_dmamap_destroy(sc->sc_dmat, ccb->ccb_dmamap);
arc_dmamem_free(sc, sc->sc_requests);
- free(sc->sc_ccbs, M_DEVBUF);
+ free(sc->sc_ccbs, M_DEVBUF, 0);
}
struct arc_ccb *
diff --git a/sys/dev/pci/auacer.c b/sys/dev/pci/auacer.c
index 652ac84a05c..c929479cfa5 100644
--- a/sys/dev/pci/auacer.c
+++ b/sys/dev/pci/auacer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auacer.c,v 1.15 2013/12/06 21:03:03 deraadt Exp $ */
+/* $OpenBSD: auacer.c,v 1.16 2014/07/12 18:48:51 tedu Exp $ */
/* $NetBSD: auacer.c,v 1.3 2004/11/10 04:20:26 kent Exp $ */
/*-
@@ -770,7 +770,7 @@ auacer_allocm(void *v, int direction, size_t size, int pool, int flags)
error = auacer_allocmem(sc, size, PAGE_SIZE, p);
if (error) {
- free(p, pool);
+ free(p, pool, 0);
return (NULL);
}
@@ -790,7 +790,7 @@ auacer_freem(void *v, void *ptr, int pool)
if (KERNADDR(p) == ptr) {
auacer_freemem(sc, p);
*pp = p->next;
- free(p, pool);
+ free(p, pool, 0);
return;
}
}
diff --git a/sys/dev/pci/auglx.c b/sys/dev/pci/auglx.c
index 734c7dbf7a1..3b679f1e3e9 100644
--- a/sys/dev/pci/auglx.c
+++ b/sys/dev/pci/auglx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auglx.c,v 1.11 2013/12/06 21:03:03 deraadt Exp $ */
+/* $OpenBSD: auglx.c,v 1.12 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org>
@@ -989,7 +989,7 @@ auglx_allocm(void *v, int direction, size_t size, int pool, int flags)
error = auglx_allocmem(sc, size, PAGE_SIZE, p);
if (error) {
- free(p, pool);
+ free(p, pool, 0);
return NULL;
}
@@ -1010,7 +1010,7 @@ auglx_freem(void *v, void *ptr, int pool)
if (p->addr == ptr) {
auglx_freemem(sc, p);
*pp = p->next;
- free(p, pool);
+ free(p, pool, 0);
return;
}
}
diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c
index 80d59fbfa1c..691d3171b17 100644
--- a/sys/dev/pci/auich.c
+++ b/sys/dev/pci/auich.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auich.c,v 1.100 2014/05/17 12:40:25 ratchov Exp $ */
+/* $OpenBSD: auich.c,v 1.101 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2000,2001 Michael Shalayeff
@@ -1308,7 +1308,7 @@ auich_allocm(void *v, int direction, size_t size, int pool, int flags)
error = auich_allocmem(sc, size, PAGE_SIZE, p);
if (error) {
- free(p, pool);
+ free(p, pool, 0);
return NULL;
}
@@ -1339,7 +1339,7 @@ auich_freem(void *v, void *ptr, int pool)
return;
auich_freemem(sc, p);
- free(p, pool);
+ free(p, pool, 0);
}
size_t
diff --git a/sys/dev/pci/auixp.c b/sys/dev/pci/auixp.c
index 1be68a34e62..f4e30ba11ec 100644
--- a/sys/dev/pci/auixp.c
+++ b/sys/dev/pci/auixp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auixp.c,v 1.32 2013/12/06 21:03:03 deraadt Exp $ */
+/* $OpenBSD: auixp.c,v 1.33 2014/07/12 18:48:51 tedu Exp $ */
/* $NetBSD: auixp.c,v 1.9 2005/06/27 21:13:09 thorpej Exp $ */
/*
@@ -651,7 +651,7 @@ auixp_malloc(void *hdl, int direction, size_t size, int pool, int flags)
/* get us a dma buffer itself */
error = auixp_allocmem(sc, size, 16, dma);
if (error) {
- free(dma, pool);
+ free(dma, pool, 0);
printf("%s: auixp_malloc: not enough memory\n",
sc->sc_dev.dv_xname);
return NULL;
@@ -684,7 +684,7 @@ auixp_free(void *hdl, void *addr, int pool)
SLIST_REMOVE(&sc->sc_dma_list, dma, auixp_dma,
dma_chain);
auixp_freemem(sc, dma);
- free(dma, pool);
+ free(dma, pool, 0);
return;
}
}
@@ -824,7 +824,7 @@ auixp_allocate_dma_chain(struct auixp_softc *sc, struct auixp_dma **dmap)
if (error) {
printf("%s: can't malloc dma descriptor chain\n",
sc->sc_dev.dv_xname);
- free(dma, M_DEVBUF);
+ free(dma, M_DEVBUF, 0);
return ENOMEM;
}
diff --git a/sys/dev/pci/autri.c b/sys/dev/pci/autri.c
index 9650e049ee2..50d11713885 100644
--- a/sys/dev/pci/autri.c
+++ b/sys/dev/pci/autri.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autri.c,v 1.35 2013/12/06 21:03:03 deraadt Exp $ */
+/* $OpenBSD: autri.c,v 1.36 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro.
@@ -1134,7 +1134,7 @@ autri_malloc(void *addr, int direction, size_t size, int pool, int flags)
#endif
error = autri_allocmem(sc, size, 0x10000, p);
if (error) {
- free(p, pool);
+ free(p, pool, 0);
return NULL;
}
@@ -1153,7 +1153,7 @@ autri_free(void *addr, void *ptr, int pool)
if (KERNADDR(p) == ptr) {
autri_freemem(sc, p);
*pp = p->next;
- free(p, pool);
+ free(p, pool, 0);
return;
}
}
diff --git a/sys/dev/pci/auvia.c b/sys/dev/pci/auvia.c
index 196a96d495f..dabd03a72d7 100644
--- a/sys/dev/pci/auvia.c
+++ b/sys/dev/pci/auvia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auvia.c,v 1.52 2013/12/06 21:03:03 deraadt Exp $ */
+/* $OpenBSD: auvia.c,v 1.53 2014/07/12 18:48:51 tedu Exp $ */
/* $NetBSD: auvia.c,v 1.28 2002/11/04 16:38:49 kent Exp $ */
/*-
@@ -914,7 +914,7 @@ fail_create:
fail_map:
bus_dmamem_free(sc->sc_dmat, &p->seg, 1);
fail_alloc:
- free(p, pool);
+ free(p, pool, 0);
return 0;
}
@@ -933,7 +933,7 @@ auvia_free(void *addr, void *ptr, int pool)
bus_dmamem_free(sc->sc_dmat, &p->seg, 1);
*pp = p->next;
- free(p, pool);
+ free(p, pool, 0);
return;
}
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c
index b169827132d..2882f55a622 100644
--- a/sys/dev/pci/azalia.c
+++ b/sys/dev/pci/azalia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.c,v 1.213 2014/07/10 14:21:20 deraadt Exp $ */
+/* $OpenBSD: azalia.c,v 1.214 2014/07/12 18:48:51 tedu Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
@@ -628,7 +628,7 @@ azalia_pci_detach(struct device *self, int flags)
}
az->ncodecs = 0;
if (az->codecs != NULL) {
- free(az->codecs, M_DEVBUF);
+ free(az->codecs, M_DEVBUF, 0);
az->codecs = NULL;
}
@@ -638,7 +638,7 @@ azalia_pci_detach(struct device *self, int flags)
if (az->rirb_dma.addr != NULL)
azalia_free_dmamem(az, &az->rirb_dma);
if (az->unsolq != NULL) {
- free(az->unsolq, M_DEVBUF);
+ free(az->unsolq, M_DEVBUF, 0);
az->unsolq = NULL;
}
@@ -2217,7 +2217,7 @@ azalia_codec_select_dacs(codec_t *this)
}
}
- free(convs, M_DEVBUF);
+ free(convs, M_DEVBUF, 0);
return(err);
}
@@ -2612,43 +2612,43 @@ azalia_codec_delete(codec_t *this)
azalia_mixer_delete(this);
if (this->formats != NULL) {
- free(this->formats, M_DEVBUF);
+ free(this->formats, M_DEVBUF, 0);
this->formats = NULL;
}
this->nformats = 0;
if (this->encs != NULL) {
- free(this->encs, M_DEVBUF);
+ free(this->encs, M_DEVBUF, 0);
this->encs = NULL;
}
this->nencs = 0;
if (this->opins != NULL) {
- free(this->opins, M_DEVBUF);
+ free(this->opins, M_DEVBUF, 0);
this->opins = NULL;
}
this->nopins = 0;
if (this->opins_d != NULL) {
- free(this->opins_d, M_DEVBUF);
+ free(this->opins_d, M_DEVBUF, 0);
this->opins_d = NULL;
}
this->nopins_d = 0;
if (this->ipins != NULL) {
- free(this->ipins, M_DEVBUF);
+ free(this->ipins, M_DEVBUF, 0);
this->ipins = NULL;
}
this->nipins = 0;
if (this->ipins_d != NULL) {
- free(this->ipins_d, M_DEVBUF);
+ free(this->ipins_d, M_DEVBUF, 0);
this->ipins_d = NULL;
}
this->nipins_d = 0;
if (this->w != NULL) {
- free(this->w, M_DEVBUF);
+ free(this->w, M_DEVBUF, 0);
this->w = NULL;
}
@@ -2722,7 +2722,7 @@ azalia_codec_construct_format(codec_t *this, int newdac, int newadc)
}
if (this->formats != NULL)
- free(this->formats, M_DEVBUF);
+ free(this->formats, M_DEVBUF, 0);
this->nformats = 0;
this->formats = malloc(sizeof(struct audio_format) * variation,
M_DEVBUF, M_NOWAIT | M_ZERO);
@@ -4425,7 +4425,7 @@ azalia_create_encodings(codec_t *this)
}
if (this->encs != NULL)
- free(this->encs, M_DEVBUF);
+ free(this->encs, M_DEVBUF, 0);
this->nencs = 0;
this->encs = malloc(sizeof(struct audio_encoding) * nencs,
M_DEVBUF, M_NOWAIT | M_ZERO);
diff --git a/sys/dev/pci/azalia_codec.c b/sys/dev/pci/azalia_codec.c
index 97c9eabb125..f12affe009d 100644
--- a/sys/dev/pci/azalia_codec.c
+++ b/sys/dev/pci/azalia_codec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia_codec.c,v 1.161 2014/07/08 17:19:25 deraadt Exp $ */
+/* $OpenBSD: azalia_codec.c,v 1.162 2014/07/12 18:48:51 tedu Exp $ */
/* $NetBSD: azalia_codec.c,v 1.8 2006/05/10 11:17:27 kent Exp $ */
/*-
@@ -1258,7 +1258,7 @@ azalia_mixer_ensure_capacity(codec_t *this, size_t newsize)
return ENOMEM;
}
bcopy(this->mixers, newbuf, this->maxmixers * sizeof(mixer_item_t));
- free(this->mixers, M_DEVBUF);
+ free(this->mixers, M_DEVBUF, 0);
this->mixers = newbuf;
this->maxmixers = newmax;
return 0;
@@ -1484,7 +1484,7 @@ int
azalia_mixer_delete(codec_t *this)
{
if (this->mixers != NULL) {
- free(this->mixers, M_DEVBUF);
+ free(this->mixers, M_DEVBUF, 0);
this->mixers = NULL;
}
return 0;
diff --git a/sys/dev/pci/cmpci.c b/sys/dev/pci/cmpci.c
index 476a22f2399..b09e5b2dbcf 100644
--- a/sys/dev/pci/cmpci.c
+++ b/sys/dev/pci/cmpci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmpci.c,v 1.36 2013/12/06 21:03:03 deraadt Exp $ */
+/* $OpenBSD: cmpci.c,v 1.37 2014/07/12 18:48:51 tedu Exp $ */
/* $NetBSD: cmpci.c,v 1.25 2004/10/26 06:32:20 xtraeme Exp $ */
/*
@@ -1362,7 +1362,7 @@ cmpci_alloc_dmamem(struct cmpci_softc *sc, size_t size, int type, int flags,
bus_dmamem_free(n->cd_tag,
n->cd_segs, nitems(n->cd_segs));
mfree:
- free(n, type);
+ free(n, type, 0);
quit:
return error;
}
@@ -1380,7 +1380,7 @@ cmpci_free_dmamem(struct cmpci_softc *sc, caddr_t addr, int type)
bus_dmamem_unmap(n->cd_tag, n->cd_addr, n->cd_size);
bus_dmamem_free(n->cd_tag, n->cd_segs,
nitems(n->cd_segs));
- free(n, type);
+ free(n, type, 0);
return 0;
}
}
diff --git a/sys/dev/pci/cs4280.c b/sys/dev/pci/cs4280.c
index 19cf8679052..671e50cc9de 100644
--- a/sys/dev/pci/cs4280.c
+++ b/sys/dev/pci/cs4280.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cs4280.c,v 1.44 2013/12/06 21:03:03 deraadt Exp $ */
+/* $OpenBSD: cs4280.c,v 1.45 2014/07/12 18:48:51 tedu Exp $ */
/* $NetBSD: cs4280.c,v 1.5 2000/06/26 04:56:23 simonb Exp $ */
/*
@@ -1380,7 +1380,7 @@ cs4280_malloc(void *addr, int direction, size_t size, int pool, int flags)
return (0);
p = malloc(sizeof(*p), pool, flags);
if (!p) {
- free(q,pool);
+ free(q,pool, 0);
return (0);
}
/*
@@ -1389,8 +1389,8 @@ cs4280_malloc(void *addr, int direction, size_t size, int pool, int flags)
error = cs4280_allocmem(sc, CS4280_DCHUNK, CS4280_DALIGN, p);
if (error) {
- free(q, pool);
- free(p, pool);
+ free(q, pool, 0);
+ free(p, pool, 0);
return (0);
}
@@ -1411,8 +1411,8 @@ cs4280_free(void *addr, void *ptr, int pool)
if (BUFADDR(p) == ptr) {
cs4280_freemem(sc, p);
*pp = p->next;
- free(p->dum, pool);
- free(p, pool);
+ free(p->dum, pool, 0);
+ free(p, pool, 0);
return;
}
}
diff --git a/sys/dev/pci/cs4281.c b/sys/dev/pci/cs4281.c
index 16a18804175..a78944334fe 100644
--- a/sys/dev/pci/cs4281.c
+++ b/sys/dev/pci/cs4281.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cs4281.c,v 1.30 2013/12/06 21:03:03 deraadt Exp $ */
+/* $OpenBSD: cs4281.c,v 1.31 2014/07/12 18:48:51 tedu Exp $ */
/* $Tera: cs4281.c,v 1.18 2000/12/27 14:24:45 tacha Exp $ */
/*
@@ -1338,7 +1338,7 @@ cs4281_malloc(void *addr, int direction, size_t size, int pool, int flags)
error = cs4281_allocmem(sc, size, pool, flags, p);
if (error) {
- free(p, pool);
+ free(p, pool, 0);
return (0);
}
@@ -1362,9 +1362,9 @@ cs4281_free(void *addr, void *ptr, int pool)
bus_dmamap_destroy(sc->sc_dmatag, p->map);
bus_dmamem_unmap(sc->sc_dmatag, p->addr, p->size);
bus_dmamem_free(sc->sc_dmatag, p->segs, p->nsegs);
- free(p->dum, pool);
+ free(p->dum, pool, 0);
*pp = p->next;
- free(p, pool);
+ free(p, pool, 0);
return;
}
}
diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h
index 94fca1d3174..3133bbcbb33 100644
--- a/sys/dev/pci/drm/drmP.h
+++ b/sys/dev/pci/drm/drmP.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: drmP.h,v 1.177 2014/05/24 21:09:15 miod Exp $ */
+/* $OpenBSD: drmP.h,v 1.178 2014/07/12 18:48:52 tedu Exp $ */
/* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*-
* Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com
*/
@@ -263,7 +263,7 @@ kzalloc(size_t size, int flags)
static inline void
kfree(void *objp)
{
- free(objp, M_DRM);
+ free(objp, M_DRM, 0);
}
static inline void *
@@ -275,7 +275,7 @@ vzalloc(unsigned long size)
static inline void
vfree(void *objp)
{
- free(objp, M_DRM);
+ free(objp, M_DRM, 0);
}
#define min_t(t, a, b) ({ \
diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c
index 5a59329929f..c7266f50d44 100644
--- a/sys/dev/pci/drm/drm_drv.c
+++ b/sys/dev/pci/drm/drm_drv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: drm_drv.c,v 1.128 2014/07/02 06:09:49 matthew Exp $ */
+/* $OpenBSD: drm_drv.c,v 1.129 2014/07/12 18:48:52 tedu Exp $ */
/*-
* Copyright 2007-2009 Owain G. Ainsworth <oga@openbsd.org>
* Copyright © 2008 Intel Corporation
@@ -1155,7 +1155,7 @@ free:
destroy:
bus_dmamap_destroy(dmat, mem->map);
strfree:
- free(mem, M_DRM);
+ free(mem, M_DRM, 0);
return (NULL);
}
@@ -1170,7 +1170,7 @@ drm_dmamem_free(bus_dma_tag_t dmat, struct drm_dmamem *mem)
bus_dmamem_unmap(dmat, mem->kva, mem->size);
bus_dmamem_free(dmat, mem->segs, mem->nsegs);
bus_dmamap_destroy(dmat, mem->map);
- free(mem, M_DRM);
+ free(mem, M_DRM, 0);
}
/**
diff --git a/sys/dev/pci/drm/drm_edid.c b/sys/dev/pci/drm/drm_edid.c
index cf490941d16..4611cbc9e34 100644
--- a/sys/dev/pci/drm/drm_edid.c
+++ b/sys/dev/pci/drm/drm_edid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: drm_edid.c,v 1.9 2014/03/09 11:07:18 jsg Exp $ */
+/* $OpenBSD: drm_edid.c,v 1.10 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2006 Luc Verhaegen (quirks list)
* Copyright (c) 2007-2008 Intel Corporation
@@ -329,7 +329,7 @@ drm_do_get_edid(struct drm_connector *connector, struct i2c_controller *adapter)
if (!new)
goto out;
bcopy(block, new, EDID_LENGTH);
- free(block, M_DRM);
+ free(block, M_DRM, 0);
block = new;
for (j = 1; j <= block[0x7e]; j++) {
@@ -360,7 +360,7 @@ drm_do_get_edid(struct drm_connector *connector, struct i2c_controller *adapter)
if (!new)
goto out;
bcopy(block, new, (valid_extensions + 1) * EDID_LENGTH);
- free(block, M_DRM);
+ free(block, M_DRM, 0);
block = new;
}
diff --git a/sys/dev/pci/drm/drm_mem_util.h b/sys/dev/pci/drm/drm_mem_util.h
index 7348f8911c4..ead94b188a2 100644
--- a/sys/dev/pci/drm/drm_mem_util.h
+++ b/sys/dev/pci/drm/drm_mem_util.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: drm_mem_util.h,v 1.1 2013/08/12 04:11:52 jsg Exp $ */
+/* $OpenBSD: drm_mem_util.h,v 1.2 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright © 2008 Intel Corporation
*
@@ -65,10 +65,10 @@ static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size)
static __inline void drm_free_large(void *ptr)
{
- free(ptr, M_DRM);
+ free(ptr, M_DRM, 0);
#ifdef notyet
if (!is_vmalloc_addr(ptr))
- return free(ptr, M_DRM);
+ return free(ptr, M_DRM, 0);
vfree(ptr);
#endif
diff --git a/sys/dev/pci/drm/drm_memory.c b/sys/dev/pci/drm/drm_memory.c
index 0173c462f4b..5ad6c599cb6 100644
--- a/sys/dev/pci/drm/drm_memory.c
+++ b/sys/dev/pci/drm/drm_memory.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: drm_memory.c,v 1.25 2014/03/09 07:42:29 jsg Exp $ */
+/* $OpenBSD: drm_memory.c,v 1.26 2014/07/12 18:48:52 tedu Exp $ */
/*-
*Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
* Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
@@ -68,7 +68,7 @@ drm_realloc(void *oldpt, size_t oldsize, size_t size)
return NULL;
if (oldpt && oldsize) {
memcpy(pt, oldpt, min(oldsize, size));
- free(oldpt, M_DRM);
+ free(oldpt, M_DRM, 0);
}
return pt;
}
@@ -77,7 +77,7 @@ void
drm_free(void *pt)
{
if (pt != NULL)
- free(pt, M_DRM);
+ free(pt, M_DRM, 0);
}
int
diff --git a/sys/dev/pci/drm/i915/i915_gem.c b/sys/dev/pci/drm/i915/i915_gem.c
index 0e18aa242fb..6ec8b65327c 100644
--- a/sys/dev/pci/drm/i915/i915_gem.c
+++ b/sys/dev/pci/drm/i915/i915_gem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i915_gem.c,v 1.73 2014/05/12 19:29:16 kettenis Exp $ */
+/* $OpenBSD: i915_gem.c,v 1.74 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org>
*
@@ -2036,7 +2036,7 @@ err_pages:
return PTR_ERR(page);
#else
err_pages:
- free(st, M_DRM);
+ free(st, M_DRM, 0);
return -ENOMEM;
#endif
}
diff --git a/sys/dev/pci/drm/i915/i915_gem_context.c b/sys/dev/pci/drm/i915/i915_gem_context.c
index a23553c39ab..66f1c63a48f 100644
--- a/sys/dev/pci/drm/i915/i915_gem_context.c
+++ b/sys/dev/pci/drm/i915/i915_gem_context.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i915_gem_context.c,v 1.8 2014/02/18 02:36:49 jsg Exp $ */
+/* $OpenBSD: i915_gem_context.c,v 1.9 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright © 2011-2012 Intel Corporation
*
@@ -326,7 +326,7 @@ void i915_gem_context_close(struct drm_device *dev, struct drm_file *file)
nxt = SPLAY_NEXT(i915_ctx_tree, &file_priv->ctx_tree, han);
context_idr_cleanup(han->handle, han->ctx, NULL);
SPLAY_REMOVE(i915_ctx_tree, &file_priv->ctx_tree, han);
- free(han, M_DRM);
+ free(han, M_DRM, 0);
}
}
diff --git a/sys/dev/pci/drm/i915/i915_gem_execbuffer.c b/sys/dev/pci/drm/i915/i915_gem_execbuffer.c
index b71beb55710..a3ef3dc6a0f 100644
--- a/sys/dev/pci/drm/i915/i915_gem_execbuffer.c
+++ b/sys/dev/pci/drm/i915/i915_gem_execbuffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i915_gem_execbuffer.c,v 1.28 2014/04/01 20:16:50 kettenis Exp $ */
+/* $OpenBSD: i915_gem_execbuffer.c,v 1.29 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org>
*
@@ -102,8 +102,8 @@ eb_get_object(struct eb_objects *eb, unsigned long handle)
static void
eb_destroy(struct eb_objects *eb)
{
- free(eb->buckets, M_DRM);
- free(eb, M_DRM);
+ free(eb->buckets, M_DRM, 0);
+ free(eb, M_DRM, 0);
}
static inline int use_cpu_reloc(struct drm_i915_gem_object *obj)
diff --git a/sys/dev/pci/drm/i915/i915_irq.c b/sys/dev/pci/drm/i915/i915_irq.c
index a0ed5e718fa..8f959a2a733 100644
--- a/sys/dev/pci/drm/i915/i915_irq.c
+++ b/sys/dev/pci/drm/i915/i915_irq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i915_irq.c,v 1.12 2014/03/24 17:06:49 kettenis Exp $ */
+/* $OpenBSD: i915_irq.c,v 1.13 2014/07/12 18:48:52 tedu Exp $ */
/* i915_irq.c -- IRQ support for the I915 -*- linux-c -*-
*/
/*
@@ -455,9 +455,9 @@ static void ivybridge_parity_work(void *arg1, void *arg2)
row, bank, subbank);
#if 0
- free(parity_event[3], M_DRM);
- free(parity_event[2], M_DRM);
- free(parity_event[1], M_DRM);
+ free(parity_event[3], M_DRM, 0);
+ free(parity_event[2], M_DRM, 0);
+ free(parity_event[1], M_DRM, 0);
#endif
}
diff --git a/sys/dev/pci/drm/i915/intel_hdmi.c b/sys/dev/pci/drm/i915/intel_hdmi.c
index 8e1d8cfa9ad..fd7a92a93c9 100644
--- a/sys/dev/pci/drm/i915/intel_hdmi.c
+++ b/sys/dev/pci/drm/i915/intel_hdmi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_hdmi.c,v 1.9 2014/01/23 10:42:57 jsg Exp $ */
+/* $OpenBSD: intel_hdmi.c,v 1.10 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright 2006 Dave Airlie <airlied@linux.ie>
* Copyright © 2006-2009 Intel Corporation
@@ -792,7 +792,7 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)
drm_detect_hdmi_monitor(edid);
intel_hdmi->has_audio = drm_detect_monitor_audio(edid);
}
- free(edid, M_DRM);
+ free(edid, M_DRM, 0);
}
if (status == connector_status_connected) {
@@ -833,7 +833,7 @@ intel_hdmi_detect_audio(struct drm_connector *connector)
if (edid) {
if (edid->input & DRM_EDID_INPUT_DIGITAL)
has_audio = drm_detect_monitor_audio(edid);
- free(edid, M_DRM);
+ free(edid, M_DRM, 0);
}
return has_audio;
@@ -899,7 +899,7 @@ static void intel_hdmi_destroy(struct drm_connector *connector)
{
drm_sysfs_connector_remove(connector);
drm_connector_cleanup(connector);
- free(connector, M_DRM);
+ free(connector, M_DRM, 0);
}
static const struct drm_encoder_helper_funcs intel_hdmi_helper_funcs = {
diff --git a/sys/dev/pci/drm/i915/intel_modes.c b/sys/dev/pci/drm/i915/intel_modes.c
index f20155bb8a1..08cea41b10a 100644
--- a/sys/dev/pci/drm/i915/intel_modes.c
+++ b/sys/dev/pci/drm/i915/intel_modes.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_modes.c,v 1.4 2014/01/21 04:47:38 kettenis Exp $ */
+/* $OpenBSD: intel_modes.c,v 1.5 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
* Copyright (c) 2007, 2010 Intel Corporation
@@ -67,7 +67,7 @@ int intel_ddc_get_modes(struct drm_connector *connector,
return 0;
ret = intel_connector_update_modes(connector, edid);
- free(edid, M_DRM);
+ free(edid, M_DRM, 0);
return ret;
}
diff --git a/sys/dev/pci/drm/radeon/ni.c b/sys/dev/pci/drm/radeon/ni.c
index b07bd1ac8da..36a644aa825 100644
--- a/sys/dev/pci/drm/radeon/ni.c
+++ b/sys/dev/pci/drm/radeon/ni.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ni.c,v 1.7 2014/04/07 06:43:11 jsg Exp $ */
+/* $OpenBSD: ni.c,v 1.8 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright 2010 Advanced Micro Devices, Inc.
*
@@ -393,19 +393,19 @@ out:
"ni_cp: Failed to load firmware \"%s\"\n",
fw_name);
if (rdev->pfp_fw) {
- free(rdev->pfp_fw, M_DEVBUF);
+ free(rdev->pfp_fw, M_DEVBUF, 0);
rdev->pfp_fw = NULL;
}
if (rdev->me_fw) {
- free(rdev->me_fw, M_DEVBUF);
+ free(rdev->me_fw, M_DEVBUF, 0);
rdev->me_fw = NULL;
}
if (rdev->rlc_fw) {
- free(rdev->rlc_fw, M_DEVBUF);
+ free(rdev->rlc_fw, M_DEVBUF, 0);
rdev->rlc_fw = NULL;
}
if (rdev->mc_fw) {
- free(rdev->mc_fw, M_DEVBUF);
+ free(rdev->mc_fw, M_DEVBUF, 0);
rdev->mc_fw = NULL;
}
}
diff --git a/sys/dev/pci/drm/radeon/r100.c b/sys/dev/pci/drm/radeon/r100.c
index f4eb52968f6..f26029c7ed1 100644
--- a/sys/dev/pci/drm/radeon/r100.c
+++ b/sys/dev/pci/drm/radeon/r100.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: r100.c,v 1.7 2014/04/07 06:43:11 jsg Exp $ */
+/* $OpenBSD: r100.c,v 1.8 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -1057,7 +1057,7 @@ static int r100_cp_init_microcode(struct radeon_device *rdev)
"radeon_cp: Bogus length %zu in firmware \"%s\"\n",
rdev->me_fw_size, fw_name);
err = -EINVAL;
- free(rdev->me_fw, M_DEVBUF);
+ free(rdev->me_fw, M_DEVBUF, 0);
rdev->me_fw = NULL;
}
diff --git a/sys/dev/pci/drm/radeon/r600.c b/sys/dev/pci/drm/radeon/r600.c
index cdd2ad686ff..9dbdaa52e0b 100644
--- a/sys/dev/pci/drm/radeon/r600.c
+++ b/sys/dev/pci/drm/radeon/r600.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: r600.c,v 1.9 2014/03/09 12:32:56 jsg Exp $ */
+/* $OpenBSD: r600.c,v 1.10 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -2116,15 +2116,15 @@ out:
"r600_cp: Failed to load firmware \"%s\"\n",
fw_name);
if (rdev->pfp_fw) {
- free(rdev->pfp_fw, M_DEVBUF);
+ free(rdev->pfp_fw, M_DEVBUF, 0);
rdev->pfp_fw = NULL;
}
if (rdev->me_fw) {
- free(rdev->me_fw, M_DEVBUF);
+ free(rdev->me_fw, M_DEVBUF, 0);
rdev->me_fw = NULL;
}
if (rdev->rlc_fw) {
- free(rdev->rlc_fw, M_DEVBUF);
+ free(rdev->rlc_fw, M_DEVBUF, 0);
rdev->rlc_fw = NULL;
}
}
diff --git a/sys/dev/pci/drm/radeon/radeon_ttm.c b/sys/dev/pci/drm/radeon/radeon_ttm.c
index 53b8ce90b88..ac86db98b0f 100644
--- a/sys/dev/pci/drm/radeon/radeon_ttm.c
+++ b/sys/dev/pci/drm/radeon/radeon_ttm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radeon_ttm.c,v 1.5 2014/04/12 06:03:30 jsg Exp $ */
+/* $OpenBSD: radeon_ttm.c,v 1.6 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright 2009 Jerome Glisse.
* All Rights Reserved.
@@ -590,7 +590,7 @@ radeon_ttm_backend_destroy(struct ttm_tt *ttm)
struct radeon_ttm_tt *gtt = (void *)ttm;
bus_dmamap_destroy(gtt->rdev->dmat, gtt->map);
- free(gtt->segs, M_DRM);
+ free(gtt->segs, M_DRM, 0);
ttm_dma_tt_fini(&gtt->ttm);
kfree(gtt);
}
@@ -631,15 +631,15 @@ struct ttm_tt *radeon_ttm_tt_create(struct ttm_bo_device *bdev,
M_DRM, M_WAITOK | M_ZERO);
if (gtt->segs == NULL) {
ttm_dma_tt_fini(&gtt->ttm);
- free(gtt, M_DRM);
+ free(gtt, M_DRM, 0);
return NULL;
}
if (bus_dmamap_create(rdev->dmat, size, gtt->ttm.ttm.num_pages, size,
0, BUS_DMA_WAITOK, &gtt->map)) {
- free(gtt->segs, M_DRM);
+ free(gtt->segs, M_DRM, 0);
ttm_dma_tt_fini(&gtt->ttm);
- free(gtt, M_DRM);
+ free(gtt, M_DRM, 0);
return NULL;
}
diff --git a/sys/dev/pci/drm/radeon/si.c b/sys/dev/pci/drm/radeon/si.c
index 9904991f384..16edebcbd82 100644
--- a/sys/dev/pci/drm/radeon/si.c
+++ b/sys/dev/pci/drm/radeon/si.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: si.c,v 1.14 2014/06/21 04:47:58 jsg Exp $ */
+/* $OpenBSD: si.c,v 1.15 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright 2011 Advanced Micro Devices, Inc.
*
@@ -388,23 +388,23 @@ out:
"si_cp: Failed to load firmware \"%s\"\n",
fw_name);
if (rdev->pfp_fw) {
- free(rdev->pfp_fw, M_DEVBUF);
+ free(rdev->pfp_fw, M_DEVBUF, 0);
rdev->pfp_fw = NULL;
}
if (rdev->me_fw) {
- free(rdev->pfp_fw, M_DEVBUF);
+ free(rdev->pfp_fw, M_DEVBUF, 0);
rdev->me_fw = NULL;
}
if (rdev->ce_fw) {
- free(rdev->ce_fw, M_DEVBUF);
+ free(rdev->ce_fw, M_DEVBUF, 0);
rdev->ce_fw = NULL;
}
if (rdev->rlc_fw) {
- free(rdev->rlc_fw, M_DEVBUF);
+ free(rdev->rlc_fw, M_DEVBUF, 0);
rdev->rlc_fw = NULL;
}
if (rdev->mc_fw) {
- free(rdev->mc_fw, M_DEVBUF);
+ free(rdev->mc_fw, M_DEVBUF, 0);
rdev->mc_fw = NULL;
}
}
diff --git a/sys/dev/pci/eap.c b/sys/dev/pci/eap.c
index f2372e2125f..b9edb88e808 100644
--- a/sys/dev/pci/eap.c
+++ b/sys/dev/pci/eap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eap.c,v 1.47 2013/12/06 21:03:03 deraadt Exp $ */
+/* $OpenBSD: eap.c,v 1.48 2014/07/12 18:48:51 tedu Exp $ */
/* $NetBSD: eap.c,v 1.46 2001/09/03 15:07:37 reinoud Exp $ */
/*
@@ -1619,7 +1619,7 @@ eap_malloc(void *addr, int direction, size_t size, int pool, int flags)
return (0);
error = eap_allocmem(sc, size, 16, p);
if (error) {
- free(p, pool);
+ free(p, pool, 0);
return (0);
}
p->next = sc->sc_dmas;
@@ -1637,7 +1637,7 @@ eap_free(void *addr, void *ptr, int pool)
if (KERNADDR(p) == ptr) {
eap_freemem(sc, p);
*pp = p->next;
- free(p, pool);
+ free(p, pool, 0);
return;
}
}
diff --git a/sys/dev/pci/emuxki.c b/sys/dev/pci/emuxki.c
index 565922fa1b9..eca0c3cbfd4 100644
--- a/sys/dev/pci/emuxki.c
+++ b/sys/dev/pci/emuxki.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: emuxki.c,v 1.44 2013/12/06 21:03:03 deraadt Exp $ */
+/* $OpenBSD: emuxki.c,v 1.45 2014/07/12 18:48:51 tedu Exp $ */
/* $NetBSD: emuxki.c,v 1.1 2001/10/17 18:39:41 jdolecek Exp $ */
/*-
@@ -273,8 +273,8 @@ static const int emuxki_recbuf_sz[] = {
void
emuxki_dmamem_delete(struct dmamem *mem, int type)
{
- free(mem->segs, type);
- free(mem, type);
+ free(mem->segs, type, 0);
+ free(mem, type, 0);
}
struct dmamem *
@@ -295,7 +295,7 @@ emuxki_dmamem_alloc(bus_dma_tag_t dmat, size_t size, bus_size_t align,
mem->segs = malloc(mem->nsegs * sizeof(*(mem->segs)), type, flags);
if (mem->segs == NULL) {
- free(mem, type);
+ free(mem, type, 0);
return (NULL);
}
@@ -1024,7 +1024,7 @@ emuxki_mem_new(struct emuxki_softc *sc, int ptbidx,
mem->ptbidx = ptbidx;
if ((mem->dmamem = emuxki_dmamem_alloc(sc->sc_dmat, size,
EMU_DMA_ALIGN, EMU_DMAMEM_NSEG, type, flags)) == NULL) {
- free(mem, type);
+ free(mem, type, 0);
return (NULL);
}
return (mem);
@@ -1034,7 +1034,7 @@ void
emuxki_mem_delete(struct emuxki_mem *mem, int type)
{
emuxki_dmamem_free(mem->dmamem, type);
- free(mem, type);
+ free(mem, type, 0);
}
void *
@@ -1188,7 +1188,7 @@ void
emuxki_channel_delete(struct emuxki_channel *chan)
{
chan->voice->sc->channel[chan->num] = NULL;
- free(chan, M_DEVBUF);
+ free(chan, M_DEVBUF, 0);
}
void
@@ -1559,7 +1559,7 @@ emuxki_voice_delete(struct emuxki_voice *voice)
if (lvoice) {
emuxki_voice_dataloc_destroy(lvoice);
- free(lvoice, M_DEVBUF);
+ free(lvoice, M_DEVBUF, 0);
}
}
diff --git a/sys/dev/pci/esa.c b/sys/dev/pci/esa.c
index 045c90e6e37..0c590636bee 100644
--- a/sys/dev/pci/esa.c
+++ b/sys/dev/pci/esa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: esa.c,v 1.27 2013/05/24 07:58:46 ratchov Exp $ */
+/* $OpenBSD: esa.c,v 1.28 2014/07/12 18:48:51 tedu Exp $ */
/* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */
/*
@@ -513,7 +513,7 @@ esa_malloc(void *hdl, int direction, size_t size, int type, int flags)
return (0);
error = esa_allocmem(sc, size, 16, p);
if (error) {
- free(p, type);
+ free(p, type, 0);
printf("%s: esa_malloc: not enough memory\n",
sc->sc_dev.dv_xname);
return (0);
@@ -536,7 +536,7 @@ esa_free(void *hdl, void *addr, int type)
if (KERNADDR(p) == addr) {
esa_freemem(sc, p);
*pp = p->next;
- free(p, type);
+ free(p, type, 0);
return;
}
}
@@ -1125,7 +1125,7 @@ esa_attach(struct device *parent, struct device *self, void *aux)
if (ac97_attach(&sc->host_if) != 0) {
pci_intr_disestablish(pc, sc->sc_ih);
bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_ios);
- free(sc->savemem, M_DEVBUF);
+ free(sc->savemem, M_DEVBUF, 0);
return;
}
@@ -1170,7 +1170,7 @@ esa_detach(struct device *self, int flags)
if (sc->sc_ios)
bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_ios);
- free(sc->savemem, M_DEVBUF);
+ free(sc->savemem, M_DEVBUF, 0);
return (0);
}
diff --git a/sys/dev/pci/eso.c b/sys/dev/pci/eso.c
index 6198f5f86c0..cf78cb92cb7 100644
--- a/sys/dev/pci/eso.c
+++ b/sys/dev/pci/eso.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eso.c,v 1.38 2013/12/06 21:03:03 deraadt Exp $ */
+/* $OpenBSD: eso.c,v 1.39 2014/07/12 18:48:51 tedu Exp $ */
/* $NetBSD: eso.c,v 1.48 2006/12/18 23:13:39 kleink Exp $ */
/*
@@ -1641,7 +1641,7 @@ eso_allocm(void *hdl, int direction, size_t size, int type, int flags)
error = eso_allocmem(sc, size, 32, boundary, flags, direction, ed);
if (error) {
- free(ed, type);
+ free(ed, type, 0);
return (NULL);
}
ed->ed_next = sc->sc_dmas;
@@ -1660,7 +1660,7 @@ eso_freem(void *hdl, void *addr, int type)
if (KVADDR(p) == addr) {
eso_freemem(p);
*pp = p->ed_next;
- free(p, type);
+ free(p, type, 0);
return;
}
}
diff --git a/sys/dev/pci/fms.c b/sys/dev/pci/fms.c
index 1900c5f9996..25b6885f7fd 100644
--- a/sys/dev/pci/fms.c
+++ b/sys/dev/pci/fms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fms.c,v 1.25 2013/11/15 16:46:27 brad Exp $ */
+/* $OpenBSD: fms.c,v 1.26 2014/07/12 18:48:51 tedu Exp $ */
/* $NetBSD: fms.c,v 1.5.4.1 2000/06/30 16:27:50 simonb Exp $ */
/*-
@@ -737,7 +737,7 @@ fail_create:
fail_map:
bus_dmamem_free(sc->sc_dmat, &p->seg, 1);
fail_alloc:
- free(p, pool);
+ free(p, pool, 0);
return 0;
}
@@ -755,7 +755,7 @@ fms_free(void *addr, void *ptr, int pool)
bus_dmamem_free(sc->sc_dmat, &p->seg, 1);
*pp = p->next;
- free(p, pool);
+ free(p, pool, 0);
return;
}
diff --git a/sys/dev/pci/hifn7751.c b/sys/dev/pci/hifn7751.c
index 1bfe3959c5f..766c7117037 100644
--- a/sys/dev/pci/hifn7751.c
+++ b/sys/dev/pci/hifn7751.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hifn7751.c,v 1.167 2012/01/13 09:53:24 mikeb Exp $ */
+/* $OpenBSD: hifn7751.c,v 1.168 2014/07/12 18:48:51 tedu Exp $ */
/*
* Invertex AEON / Hifn 7751 driver
@@ -1853,7 +1853,7 @@ hifn_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++;
@@ -2174,7 +2174,7 @@ hifn_process(struct cryptop *crp)
errout:
if (cmd != NULL) {
explicit_bzero(cmd, sizeof(*cmd));
- free(cmd, M_DEVBUF);
+ free(cmd, M_DEVBUF, 0);
}
if (err == EINVAL)
hifnstats.hst_invalid++;
@@ -2237,7 +2237,7 @@ hifn_abort(struct hifn_softc *sc)
bus_dmamap_destroy(sc->sc_dmat, cmd->src_map);
explicit_bzero(cmd, sizeof(*cmd));
- free(cmd, M_DEVBUF);
+ free(cmd, M_DEVBUF, 0);
if (crp->crp_etype != EAGAIN)
crypto_done(crp);
}
@@ -2366,7 +2366,7 @@ out:
bus_dmamap_unload(sc->sc_dmat, cmd->src_map);
bus_dmamap_destroy(sc->sc_dmat, cmd->src_map);
explicit_bzero(cmd, sizeof(*cmd));
- free(cmd, M_DEVBUF);
+ free(cmd, M_DEVBUF, 0);
crypto_done(crp);
}
@@ -2491,7 +2491,7 @@ fail:
bus_dmamap_destroy(sc->sc_dmat, cmd->src_map);
}
explicit_bzero(cmd, sizeof(*cmd));
- free(cmd, M_DEVBUF);
+ free(cmd, M_DEVBUF, 0);
if (err == EINVAL)
hifnstats.hst_invalid++;
else
@@ -2708,7 +2708,7 @@ hifn_callback_comp(struct hifn_softc *sc, struct hifn_command *cmd,
m_freem(cmd->srcu.src_m);
explicit_bzero(cmd, sizeof(*cmd));
- free(cmd, M_DEVBUF);
+ free(cmd, M_DEVBUF, 0);
crp->crp_etype = 0;
crypto_done(crp);
return;
@@ -2727,7 +2727,7 @@ out:
if (cmd->dstu.dst_m != NULL)
m_freem(cmd->dstu.dst_m);
explicit_bzero(cmd, sizeof(*cmd));
- free(cmd, M_DEVBUF);
+ free(cmd, M_DEVBUF, 0);
crp->crp_etype = err;
crypto_done(crp);
}
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index d5806775977..fad3939f12b 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bge.c,v 1.356 2014/07/08 05:35:18 dlg Exp $ */
+/* $OpenBSD: if_bge.c,v 1.357 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -1478,7 +1478,7 @@ bge_free_tx_ring(struct bge_softc *sc)
while ((dma = SLIST_FIRST(&sc->txdma_list))) {
SLIST_REMOVE_HEAD(&sc->txdma_list, link);
bus_dmamap_destroy(sc->bge_dmatag, dma->dmamap);
- free(dma, M_DEVBUF);
+ free(dma, M_DEVBUF, 0);
}
sc->bge_flags &= ~BGE_TXRING_VALID;
diff --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c
index c98899230a7..0ed224d8de8 100644
--- a/sys/dev/pci/if_bnx.c
+++ b/sys/dev/pci/if_bnx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bnx.c,v 1.105 2014/07/09 00:13:05 dlg Exp $ */
+/* $OpenBSD: if_bnx.c,v 1.106 2014/07/12 18:48:51 tedu Exp $ */
/*-
* Copyright (c) 2006 Broadcom Corporation
@@ -444,7 +444,7 @@ bnx_read_firmware(struct bnx_softc *sc, int idx)
return (error);
if (size < sizeof(struct bnx_firmware_header)) {
- free(p, M_DEVBUF);
+ free(p, M_DEVBUF, 0);
return (EINVAL);
}
@@ -577,7 +577,7 @@ bnx_read_firmware(struct bnx_softc *sc, int idx)
nswaph(bfw->bnx_TXP_FwSbss, hdr->bnx_TXP_FwSbssLen);
if (q - p != size) {
- free(p, M_DEVBUF);
+ free(p, M_DEVBUF, 0);
hdr = NULL;
return EINVAL;
}
@@ -603,7 +603,7 @@ bnx_read_rv2p(struct bnx_softc *sc, int idx)
return (error);
if (size < sizeof(struct bnx_rv2p_header)) {
- free(p, M_DEVBUF);
+ free(p, M_DEVBUF, 0);
return (EINVAL);
}
@@ -622,7 +622,7 @@ bnx_read_rv2p(struct bnx_softc *sc, int idx)
nswaph(rv2p->bnx_rv2p_proc2, hdr->bnx_rv2p_proc2len);
if (q - p != size) {
- free(p, M_DEVBUF);
+ free(p, M_DEVBUF, 0);
return EINVAL;
}
@@ -2090,7 +2090,7 @@ bnx_nvram_write(struct bnx_softc *sc, u_int32_t offset, u_int8_t *data_buf,
nvram_write_end:
if (align_start || align_end)
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return (rc);
}
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index 4c934eb26e8..344087749bb 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.285 2014/07/08 05:35:18 dlg Exp $ */
+/* $OpenBSD: if_em.c,v 1.286 2014/07/12 18:48:51 tedu Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -2297,7 +2297,7 @@ em_free_transmit_structures(struct em_softc *sc)
}
}
if (sc->tx_buffer_area != NULL) {
- free(sc->tx_buffer_area, M_DEVBUF);
+ free(sc->tx_buffer_area, M_DEVBUF, 0);
sc->tx_buffer_area = NULL;
}
if (sc->txtag != NULL)
@@ -2747,7 +2747,7 @@ em_free_receive_structures(struct em_softc *sc)
}
}
if (sc->rx_buffer_area != NULL) {
- free(sc->rx_buffer_area, M_DEVBUF);
+ free(sc->rx_buffer_area, M_DEVBUF, 0);
sc->rx_buffer_area = NULL;
}
if (sc->rxtag != NULL)
diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c
index 62bc5188bb5..35d22a08832 100644
--- a/sys/dev/pci/if_ipw.c
+++ b/sys/dev/pci/if_ipw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ipw.c,v 1.99 2014/03/27 11:32:29 daniel Exp $ */
+/* $OpenBSD: if_ipw.c,v 1.100 2014/07/12 18:48:51 tedu Exp $ */
/*-
* Copyright (c) 2004-2008
@@ -1690,7 +1690,7 @@ ipw_read_firmware(struct ipw_softc *sc, struct ipw_firmware *fw)
return 0;
-fail: free(fw->data, M_DEVBUF);
+fail: free(fw->data, M_DEVBUF, 0);
return error;
}
@@ -2031,7 +2031,7 @@ ipw_init(struct ifnet *ifp)
goto fail2;
}
sc->sc_flags |= IPW_FLAG_FW_INITED;
- free(fw.data, M_DEVBUF);
+ free(fw.data, M_DEVBUF, 0);
fw.data = NULL;
/* retrieve information tables base addresses */
@@ -2056,7 +2056,7 @@ ipw_init(struct ifnet *ifp)
return 0;
-fail2: free(fw.data, M_DEVBUF);
+fail2: free(fw.data, M_DEVBUF, 0);
fw.data = NULL;
fail1: ipw_stop(ifp, 0);
return error;
diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c
index dcd2b963996..9766ba969e2 100644
--- a/sys/dev/pci/if_iwi.c
+++ b/sys/dev/pci/if_iwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwi.c,v 1.116 2013/12/06 21:03:04 deraadt Exp $ */
+/* $OpenBSD: if_iwi.c,v 1.117 2014/07/12 18:48:51 tedu Exp $ */
/*-
* Copyright (c) 2004-2008
@@ -2311,7 +2311,7 @@ iwi_init(struct ifnet *ifp)
goto fail2;
}
- free(data, M_DEVBUF);
+ free(data, M_DEVBUF, 0);
sc->sc_flags |= IWI_FLAG_FW_INITED;
if ((error = iwi_config(sc)) != 0) {
@@ -2330,7 +2330,7 @@ iwi_init(struct ifnet *ifp)
return 0;
-fail2: free(data, M_DEVBUF);
+fail2: free(data, M_DEVBUF, 0);
fail1: iwi_stop(ifp, 0);
return error;
}
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c
index 10f09259788..8e9b1a86087 100644
--- a/sys/dev/pci/if_iwn.c
+++ b/sys/dev/pci/if_iwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwn.c,v 1.131 2014/03/19 10:09:19 mpi Exp $ */
+/* $OpenBSD: if_iwn.c,v 1.132 2014/07/12 18:48:51 tedu Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -2160,7 +2160,7 @@ iwn5000_rx_calib_results(struct iwn_softc *sc, struct iwn_rx_desc *desc,
/* Save calibration result. */
if (sc->calibcmd[idx].buf != NULL)
- free(sc->calibcmd[idx].buf, M_DEVBUF);
+ free(sc->calibcmd[idx].buf, M_DEVBUF, 0);
sc->calibcmd[idx].buf = malloc(len, M_DEVBUF, M_NOWAIT);
if (sc->calibcmd[idx].buf == NULL) {
DPRINTF(("not enough memory for calibration result %d\n",
@@ -4556,7 +4556,7 @@ iwn_scan(struct iwn_softc *sc, uint16_t flags)
DPRINTF(("sending scan command nchan=%d\n", hdr->nchan));
error = iwn_cmd(sc, IWN_CMD_SCAN, buf, buflen, 1);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return error;
}
@@ -5619,7 +5619,7 @@ iwn_read_firmware(struct iwn_softc *sc)
if (fw->size < sizeof (uint32_t)) {
printf("%s: firmware too short: %zu bytes\n",
sc->sc_dev.dv_xname, fw->size);
- free(fw->data, M_DEVBUF);
+ free(fw->data, M_DEVBUF, 0);
return EINVAL;
}
@@ -5631,7 +5631,7 @@ iwn_read_firmware(struct iwn_softc *sc)
if (error != 0) {
printf("%s: could not read firmware sections\n",
sc->sc_dev.dv_xname);
- free(fw->data, M_DEVBUF);
+ free(fw->data, M_DEVBUF, 0);
return error;
}
@@ -5644,7 +5644,7 @@ iwn_read_firmware(struct iwn_softc *sc)
(fw->boot.textsz & 3) != 0) {
printf("%s: firmware sections too large\n",
sc->sc_dev.dv_xname);
- free(fw->data, M_DEVBUF);
+ free(fw->data, M_DEVBUF, 0);
return EINVAL;
}
@@ -6047,7 +6047,7 @@ iwn_init(struct ifnet *ifp)
/* Initialize hardware and upload firmware. */
error = iwn_hw_init(sc);
- free(sc->fw.data, M_DEVBUF);
+ free(sc->fw.data, M_DEVBUF, 0);
if (error != 0) {
printf("%s: could not initialize hardware\n",
sc->sc_dev.dv_xname);
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c
index 1d0618b8338..500c15578cb 100644
--- a/sys/dev/pci/if_ix.c
+++ b/sys/dev/pci/if_ix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ix.c,v 1.94 2014/07/08 05:35:18 dlg Exp $ */
+/* $OpenBSD: if_ix.c,v 1.95 2014/07/12 18:48:51 tedu Exp $ */
/******************************************************************************
@@ -302,7 +302,7 @@ err_late:
ixgbe_free_receive_structures(sc);
err_out:
ixgbe_free_pci_resources(sc);
- free(sc->mta, M_DEVBUF);
+ free(sc->mta, M_DEVBUF, 0);
}
/*********************************************************************
@@ -340,7 +340,7 @@ ixgbe_detach(struct device *self, int flags)
ixgbe_free_transmit_structures(sc);
ixgbe_free_receive_structures(sc);
- free(sc->mta, M_DEVBUF);
+ free(sc->mta, M_DEVBUF, 0);
return (0);
}
@@ -1790,10 +1790,10 @@ err_rx_desc:
err_tx_desc:
for (txr = sc->tx_rings; txconf > 0; txr++, txconf--)
ixgbe_dma_free(sc, &txr->txdma);
- free(sc->rx_rings, M_DEVBUF);
+ free(sc->rx_rings, M_DEVBUF, 0);
sc->rx_rings = NULL;
rx_fail:
- free(sc->tx_rings, M_DEVBUF);
+ free(sc->tx_rings, M_DEVBUF, 0);
sc->tx_rings = NULL;
fail:
return (ENOMEM);
@@ -2028,7 +2028,7 @@ ixgbe_free_transmit_buffers(struct tx_ring *txr)
}
if (txr->tx_buffers != NULL)
- free(txr->tx_buffers, M_DEVBUF);
+ free(txr->tx_buffers, M_DEVBUF, 0);
txr->tx_buffers = NULL;
txr->txtag = NULL;
}
@@ -2773,7 +2773,7 @@ ixgbe_free_receive_buffers(struct rx_ring *rxr)
bus_dmamap_destroy(rxr->rxdma.dma_tag, rxbuf->map);
rxbuf->map = NULL;
}
- free(rxr->rx_buffers, M_DEVBUF);
+ free(rxr->rx_buffers, M_DEVBUF, 0);
rxr->rx_buffers = NULL;
}
}
diff --git a/sys/dev/pci/if_ixgb.c b/sys/dev/pci/if_ixgb.c
index 9886d39bd40..01177056862 100644
--- a/sys/dev/pci/if_ixgb.c
+++ b/sys/dev/pci/if_ixgb.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_ixgb.c,v 1.60 2013/11/26 09:50:33 mpi Exp $ */
+/* $OpenBSD: if_ixgb.c,v 1.61 2014/07/12 18:48:51 tedu Exp $ */
#include <dev/pci/if_ixgb.h>
@@ -1273,7 +1273,7 @@ ixgb_free_transmit_structures(struct ixgb_softc *sc)
}
}
if (sc->tx_buffer_area != NULL) {
- free(sc->tx_buffer_area, M_DEVBUF);
+ free(sc->tx_buffer_area, M_DEVBUF, 0);
sc->tx_buffer_area = NULL;
}
if (sc->txtag != NULL) {
@@ -1686,7 +1686,7 @@ ixgb_free_receive_structures(struct ixgb_softc *sc)
}
}
if (sc->rx_buffer_area != NULL) {
- free(sc->rx_buffer_area, M_DEVBUF);
+ free(sc->rx_buffer_area, M_DEVBUF, 0);
sc->rx_buffer_area = NULL;
}
if (sc->rxtag != NULL)
diff --git a/sys/dev/pci/if_msk.c b/sys/dev/pci/if_msk.c
index 9c1e74eb0b9..c4e460af451 100644
--- a/sys/dev/pci/if_msk.c
+++ b/sys/dev/pci/if_msk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_msk.c,v 1.104 2014/07/09 00:15:20 dlg Exp $ */
+/* $OpenBSD: if_msk.c,v 1.105 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -2140,7 +2140,7 @@ msk_stop(struct sk_if_softc *sc_if, int softonly)
while ((dma = SIMPLEQ_FIRST(&sc_if->sk_txmap_head))) {
SIMPLEQ_REMOVE_HEAD(&sc_if->sk_txmap_head, link);
bus_dmamap_destroy(sc->sc_dmatag, dma->dmamap);
- free(dma, M_DEVBUF);
+ free(dma, M_DEVBUF, 0);
}
}
diff --git a/sys/dev/pci/if_myx.c b/sys/dev/pci/if_myx.c
index 30e46b52350..a2ecd730bc1 100644
--- a/sys/dev/pci/if_myx.c
+++ b/sys/dev/pci/if_myx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_myx.c,v 1.60 2014/07/10 07:02:50 dlg Exp $ */
+/* $OpenBSD: if_myx.c,v 1.61 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2007 Reyk Floeter <reyk@openbsd.org>
@@ -462,7 +462,7 @@ myx_loadfirmware(struct myx_softc *sc, const char *filename)
ret = 0;
err:
- free(fw, M_DEVBUF);
+ free(fw, M_DEVBUF, 0);
return (ret);
}
diff --git a/sys/dev/pci/if_nxe.c b/sys/dev/pci/if_nxe.c
index c33346a98fe..6258787258f 100644
--- a/sys/dev/pci/if_nxe.c
+++ b/sys/dev/pci/if_nxe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nxe.c,v 1.64 2013/11/21 19:08:14 gsoares Exp $ */
+/* $OpenBSD: if_nxe.c,v 1.65 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -1651,7 +1651,7 @@ nxe_board_info(struct nxe_softc *sc)
rv = 0;
out:
- free(ni, M_TEMP);
+ free(ni, M_TEMP, 0);
return (rv);
}
@@ -1693,7 +1693,7 @@ nxe_user_info(struct nxe_softc *sc)
rv = 0;
out:
- free(nu, M_TEMP);
+ free(nu, M_TEMP, 0);
return (rv);
}
@@ -1852,7 +1852,7 @@ nxe_ring_alloc(struct nxe_softc *sc, size_t desclen, u_int nentries)
nr->nr_dmamem = nxe_dmamem_alloc(sc, desclen * nentries, PAGE_SIZE);
if (nr->nr_dmamem == NULL) {
- free(nr, M_DEVBUF);
+ free(nr, M_DEVBUF, 0);
return (NULL);
}
@@ -1875,7 +1875,7 @@ void
nxe_ring_free(struct nxe_softc *sc, struct nxe_ring *nr)
{
nxe_dmamem_free(sc, nr->nr_dmamem);
- free(nr, M_DEVBUF);
+ free(nr, M_DEVBUF, 0);
}
int
@@ -1956,8 +1956,8 @@ nxe_pkt_free(struct nxe_softc *sc, struct nxe_pkt_list *npl)
while ((pkt = nxe_pkt_get(npl)) != NULL)
bus_dmamap_destroy(sc->sc_dmat, pkt->pkt_dmap);
- free(npl->npl_pkts, M_DEVBUF);
- free(npl, M_DEVBUF);
+ free(npl->npl_pkts, M_DEVBUF, 0);
+ free(npl, M_DEVBUF, 0);
}
struct nxe_pkt *
@@ -2022,7 +2022,7 @@ free:
destroy:
bus_dmamap_destroy(sc->sc_dmat, ndm->ndm_map);
ndmfree:
- free(ndm, M_DEVBUF);
+ free(ndm, M_DEVBUF, 0);
return (NULL);
}
@@ -2033,7 +2033,7 @@ nxe_dmamem_free(struct nxe_softc *sc, struct nxe_dmamem *ndm)
bus_dmamem_unmap(sc->sc_dmat, ndm->ndm_kva, ndm->ndm_size);
bus_dmamem_free(sc->sc_dmat, &ndm->ndm_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, ndm->ndm_map);
- free(ndm, M_DEVBUF);
+ free(ndm, M_DEVBUF, 0);
}
u_int32_t
diff --git a/sys/dev/pci/if_oce.c b/sys/dev/pci/if_oce.c
index 4e08eb2b947..a34e5a35cb7 100644
--- a/sys/dev/pci/if_oce.c
+++ b/sys/dev/pci/if_oce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_oce.c,v 1.75 2014/07/08 05:35:18 dlg Exp $ */
+/* $OpenBSD: if_oce.c,v 1.76 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2012 Mike Belopuhov
@@ -1987,7 +1987,7 @@ oce_create_wq(struct oce_softc *sc, struct oce_eq *eq)
wq->ring = oce_create_ring(sc, sc->sc_tx_ring_size, NIC_WQE_SIZE, 8);
if (!wq->ring) {
- free(wq, M_DEVBUF);
+ free(wq, M_DEVBUF, 0);
return (NULL);
}
@@ -1995,7 +1995,7 @@ oce_create_wq(struct oce_softc *sc, struct oce_eq *eq)
1, 0, 3);
if (!cq) {
oce_destroy_ring(sc, wq->ring);
- free(wq, M_DEVBUF);
+ free(wq, M_DEVBUF, 0);
return (NULL);
}
@@ -2066,7 +2066,7 @@ oce_destroy_wq(struct oce_wq *wq)
oce_destroy_ring(sc, wq->ring);
while ((pkt = oce_pkt_get(&wq->pkt_free)) != NULL)
oce_pkt_free(sc, pkt);
- free(wq, M_DEVBUF);
+ free(wq, M_DEVBUF, 0);
}
/**
@@ -2095,7 +2095,7 @@ oce_create_rq(struct oce_softc *sc, struct oce_eq *eq, int rss)
rq->ring = oce_create_ring(sc, sc->sc_rx_ring_size,
sizeof(struct oce_nic_rqe), 2);
if (!rq->ring) {
- free(rq, M_DEVBUF);
+ free(rq, M_DEVBUF, 0);
return (NULL);
}
@@ -2103,7 +2103,7 @@ oce_create_rq(struct oce_softc *sc, struct oce_eq *eq, int rss)
1, 0, 3);
if (!cq) {
oce_destroy_ring(sc, rq->ring);
- free(rq, M_DEVBUF);
+ free(rq, M_DEVBUF, 0);
return (NULL);
}
@@ -2172,7 +2172,7 @@ oce_destroy_rq(struct oce_rq *rq)
oce_destroy_ring(sc, rq->ring);
while ((pkt = oce_pkt_get(&rq->pkt_free)) != NULL)
oce_pkt_free(sc, pkt);
- free(rq, M_DEVBUF);
+ free(rq, M_DEVBUF, 0);
}
struct oce_eq *
@@ -2187,7 +2187,7 @@ oce_create_eq(struct oce_softc *sc)
eq->ring = oce_create_ring(sc, EQ_LEN_1024, EQE_SIZE_4, 8);
if (!eq->ring) {
- free(eq, M_DEVBUF);
+ free(eq, M_DEVBUF, 0);
return (NULL);
}
@@ -2199,7 +2199,7 @@ oce_create_eq(struct oce_softc *sc)
if (oce_new_eq(sc, eq)) {
oce_destroy_ring(sc, eq->ring);
- free(eq, M_DEVBUF);
+ free(eq, M_DEVBUF, 0);
return (NULL);
}
@@ -2250,7 +2250,7 @@ oce_destroy_eq(struct oce_eq *eq)
}
if (eq->ring != NULL)
oce_destroy_ring(sc, eq->ring);
- free(eq, M_DEVBUF);
+ free(eq, M_DEVBUF, 0);
}
struct oce_mq *
@@ -2266,7 +2266,7 @@ oce_create_mq(struct oce_softc *sc, struct oce_eq *eq)
mq->ring = oce_create_ring(sc, 128, sizeof(struct oce_mbx), 8);
if (!mq->ring) {
- free(mq, M_DEVBUF);
+ free(mq, M_DEVBUF, 0);
return (NULL);
}
@@ -2274,7 +2274,7 @@ oce_create_mq(struct oce_softc *sc, struct oce_eq *eq)
1, 0, 0);
if (!cq) {
oce_destroy_ring(sc, mq->ring);
- free(mq, M_DEVBUF);
+ free(mq, M_DEVBUF, 0);
return (NULL);
}
@@ -2287,7 +2287,7 @@ oce_create_mq(struct oce_softc *sc, struct oce_eq *eq)
if (oce_new_mq(sc, mq)) {
oce_destroy_cq(mq->cq);
oce_destroy_ring(sc, mq->ring);
- free(mq, M_DEVBUF);
+ free(mq, M_DEVBUF, 0);
return (NULL);
}
@@ -2332,7 +2332,7 @@ oce_destroy_mq(struct oce_mq *mq)
oce_destroy_ring(sc, mq->ring);
if (mq->cq != NULL)
oce_destroy_cq(mq->cq);
- free(mq, M_DEVBUF);
+ free(mq, M_DEVBUF, 0);
}
/**
@@ -2358,7 +2358,7 @@ oce_create_cq(struct oce_softc *sc, struct oce_eq *eq, int nitems, int isize,
cq->ring = oce_create_ring(sc, nitems, isize, 4);
if (!cq->ring) {
- free(cq, M_DEVBUF);
+ free(cq, M_DEVBUF, 0);
return (NULL);
}
@@ -2371,7 +2371,7 @@ oce_create_cq(struct oce_softc *sc, struct oce_eq *eq, int nitems, int isize,
if (oce_new_cq(sc, cq)) {
oce_destroy_ring(sc, cq->ring);
- free(cq, M_DEVBUF);
+ free(cq, M_DEVBUF, 0);
return (NULL);
}
@@ -2394,7 +2394,7 @@ oce_destroy_cq(struct oce_cq *cq)
}
if (cq->ring != NULL)
oce_destroy_ring(sc, cq->ring);
- free(cq, M_DEVBUF);
+ free(cq, M_DEVBUF, 0);
}
/**
@@ -2561,7 +2561,7 @@ fail_2:
fail_1:
bus_dmamap_destroy(dma->tag, dma->map);
fail_0:
- free(ring, M_DEVBUF);
+ free(ring, M_DEVBUF, 0);
return (NULL);
}
@@ -2569,7 +2569,7 @@ void
oce_destroy_ring(struct oce_softc *sc, struct oce_ring *ring)
{
oce_dma_free(sc, &ring->dma);
- free(ring, M_DEVBUF);
+ free(ring, M_DEVBUF, 0);
}
int
diff --git a/sys/dev/pci/if_san_common.c b/sys/dev/pci/if_san_common.c
index 97520328402..a4c4e2e4409 100644
--- a/sys/dev/pci/if_san_common.c
+++ b/sys/dev/pci/if_san_common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_san_common.c,v 1.16 2013/08/07 01:06:37 bluhm Exp $ */
+/* $OpenBSD: if_san_common.c,v 1.17 2014/07/12 18:48:52 tedu Exp $ */
/*-
* Copyright (c) 2001-2004 Sangoma Technologies (SAN)
@@ -123,7 +123,7 @@ static san_detach(void)
tmp_card = card;
card = LIST_NEXT(card, next);
LIST_REMOVE(tmp_card, next);
- free(tmp_card, M_DEVBUF);
+ free(tmp_card, M_DEVBUF, 0);
}
log(LOG_INFO, "\n");
@@ -354,7 +354,7 @@ wan_ioctl_dump(sdla_t *card, void *u_dump)
log(LOG_INFO, "%s: Failed to copy to user space (%d)\n",
card->devname, __LINE__);
}
- free(data, M_DEVBUF);
+ free(data, M_DEVBUF, 0);
return err;
}
diff --git a/sys/dev/pci/if_san_xilinx.c b/sys/dev/pci/if_san_xilinx.c
index baa7d429d43..7cba72e04ea 100644
--- a/sys/dev/pci/if_san_xilinx.c
+++ b/sys/dev/pci/if_san_xilinx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_san_xilinx.c,v 1.28 2013/08/07 01:06:37 bluhm Exp $ */
+/* $OpenBSD: if_san_xilinx.c,v 1.29 2014/07/12 18:48:52 tedu Exp $ */
/*-
* Copyright (c) 2001-2004 Sangoma Technologies (SAN)
@@ -352,7 +352,7 @@ wan_xilinx_init(sdla_t *card)
ifp->if_softc = sc;
sc->common.card = card;
if (wanpipe_generic_register(card, ifp, card->devname)) {
- free(sc, M_DEVBUF);
+ free(sc, M_DEVBUF, 0);
return (NULL);
}
@@ -427,7 +427,7 @@ wan_xilinx_release(sdla_t* card, struct ifnet* ifp)
wanpipe_generic_unregister(ifp);
ifp->if_softc = NULL;
- free(sc, M_DEVBUF);
+ free(sc, M_DEVBUF, 0);
return (0);
}
@@ -2418,7 +2418,7 @@ aft_release_rx_buffers(xilinx_softc_t *sc)
aft_release_rx_dma_buff(sc, buf);
}
- free(sc->wp_rx_buffers, M_DEVBUF);
+ free(sc->wp_rx_buffers, M_DEVBUF, 0);
sc->wp_rx_buffers = NULL;
sc->wp_rx_buffer_last = NULL;
diff --git a/sys/dev/pci/if_sandrv.c b/sys/dev/pci/if_sandrv.c
index 57c8df4dc98..520b54ee5bc 100644
--- a/sys/dev/pci/if_sandrv.c
+++ b/sys/dev/pci/if_sandrv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sandrv.c,v 1.15 2013/11/11 03:08:20 dlg Exp $ */
+/* $OpenBSD: if_sandrv.c,v 1.16 2014/07/12 18:48:52 tedu Exp $ */
/*-
* Copyright (c) 2001-2004 Sangoma Technologies (SAN)
@@ -385,7 +385,7 @@ sdladrv_exit(void)
return EBUSY;
}
LIST_REMOVE(tmp, next);
- free(tmp, M_DEVBUF);
+ free(tmp, M_DEVBUF, 0);
}
#endif
return (0);
@@ -632,7 +632,7 @@ sdla_card_unregister(u_int16_t atype, int slot_no, int bus_no, int ioport)
return (EBUSY);
}
LIST_REMOVE(tmp_card, next);
- free(tmp_card, M_DEVBUF);
+ free(tmp_card, M_DEVBUF, 0);
return 0;
}
#endif
@@ -723,7 +723,7 @@ sdla_hw_unregister(sdlahw_card_t* hwcard, int cpu_no)
tmp_hw->hwcard = NULL;
hwcard->used--; /* Decrement card usage */
LIST_REMOVE(tmp_hw, next);
- free(tmp_hw, M_DEVBUF);
+ free(tmp_hw, M_DEVBUF, 0);
return (0);
}
diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c
index 9606e386bd8..d4a50c63b67 100644
--- a/sys/dev/pci/if_sk.c
+++ b/sys/dev/pci/if_sk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sk.c,v 1.168 2014/04/19 18:29:39 henning Exp $ */
+/* $OpenBSD: if_sk.c,v 1.169 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -2682,7 +2682,7 @@ sk_stop(struct sk_if_softc *sc_if, int softonly)
while ((dma = SIMPLEQ_FIRST(&sc_if->sk_txmap_head))) {
SIMPLEQ_REMOVE_HEAD(&sc_if->sk_txmap_head, link);
bus_dmamap_destroy(sc->sc_dmatag, dma->dmamap);
- free(dma, M_DEVBUF);
+ free(dma, M_DEVBUF, 0);
}
}
diff --git a/sys/dev/pci/if_tht.c b/sys/dev/pci/if_tht.c
index dad29074220..e8928f84196 100644
--- a/sys/dev/pci/if_tht.c
+++ b/sys/dev/pci/if_tht.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tht.c,v 1.126 2013/04/02 13:43:40 brad Exp $ */
+/* $OpenBSD: if_tht.c,v 1.127 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -1728,7 +1728,7 @@ tht_fw_load(struct tht_softc *sc)
tht_write(sc, THT_REG_INIT_SEMAPHORE, 0x1);
err:
- free(fw, M_DEVBUF);
+ free(fw, M_DEVBUF, 0);
return (error);
}
@@ -1854,7 +1854,7 @@ free:
destroy:
bus_dmamap_destroy(dmat, tdm->tdm_map);
tdmfree:
- free(tdm, M_DEVBUF);
+ free(tdm, M_DEVBUF, 0);
return (NULL);
}
@@ -1868,7 +1868,7 @@ tht_dmamem_free(struct tht_softc *sc, struct tht_dmamem *tdm)
bus_dmamem_unmap(dmat, tdm->tdm_kva, tdm->tdm_size);
bus_dmamem_free(dmat, &tdm->tdm_seg, 1);
bus_dmamap_destroy(dmat, tdm->tdm_map);
- free(tdm, M_DEVBUF);
+ free(tdm, M_DEVBUF, 0);
}
int
@@ -1909,7 +1909,7 @@ tht_pkt_free(struct tht_softc *sc, struct tht_pkt_list *tpl)
while ((pkt = tht_pkt_get(tpl)) != NULL)
bus_dmamap_destroy(dmat, pkt->tp_dmap);
- free(tpl->tpl_pkts, M_DEVBUF);
+ free(tpl->tpl_pkts, M_DEVBUF, 0);
tpl->tpl_pkts = NULL;
}
diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c
index c9126fa65e9..726fe0dcc12 100644
--- a/sys/dev/pci/if_txp.c
+++ b/sys/dev/pci/if_txp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_txp.c,v 1.108 2013/11/26 09:50:33 mpi Exp $ */
+/* $OpenBSD: if_txp.c,v 1.109 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2001
@@ -436,10 +436,10 @@ txp_download_fw(struct txp_softc *sc)
WRITE_REG(sc, TXP_IER, ier);
WRITE_REG(sc, TXP_IMR, imr);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return (0);
fail:
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return (-1);
}
@@ -639,7 +639,7 @@ txp_rx_reclaim(struct txp_softc *sc, struct txp_rx_ring *r,
bus_dmamap_unload(sc->sc_dmat, sd->sd_map);
bus_dmamap_destroy(sc->sc_dmat, sd->sd_map);
m = sd->sd_mbuf;
- free(sd, M_DEVBUF);
+ free(sd, M_DEVBUF, 0);
m->m_pkthdr.len = m->m_len = letoh16(rxd->rx_len);
#ifdef __STRICT_ALIGNMENT
@@ -806,7 +806,7 @@ txp_rxbuf_reclaim(struct txp_softc *sc)
err_mbuf:
m_freem(sd->sd_mbuf);
err_sd:
- free(sd, M_DEVBUF);
+ free(sd, M_DEVBUF, 0);
}
/*
@@ -1105,7 +1105,7 @@ bail_rxbufring:
for (i = 0; i < RXBUF_ENTRIES; i++) {
bcopy((u_long *)&sc->sc_rxbufs[i].rb_vaddrlo, &sd, sizeof(sd));
if (sd)
- free(sd, M_DEVBUF);
+ free(sd, M_DEVBUF, 0);
}
txp_dma_free(sc, &sc->sc_rxbufring_dma);
bail_rspring:
@@ -1289,7 +1289,7 @@ txp_tick(void *vsc)
out:
if (rsp != NULL)
- free(rsp, M_DEVBUF);
+ free(rsp, M_DEVBUF, 0);
splx(s);
timeout_add_sec(&sc->sc_tick, 1);
@@ -1495,7 +1495,7 @@ txp_command(struct txp_softc *sc, u_int16_t id, u_int16_t in1,
*out2 = letoh32(rsp->rsp_par2);
if (out3 != NULL)
*out3 = letoh32(rsp->rsp_par3);
- free(rsp, M_DEVBUF);
+ free(rsp, M_DEVBUF, 0);
return (0);
}
@@ -1956,5 +1956,5 @@ txp_capabilities(struct txp_softc *sc)
out:
if (rsp != NULL)
- free(rsp, M_DEVBUF);
+ free(rsp, M_DEVBUF, 0);
}
diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c
index 5e7fa4d1ad5..747be9a9efe 100644
--- a/sys/dev/pci/if_vic.c
+++ b/sys/dev/pci/if_vic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vic.c,v 1.79 2014/07/10 11:15:52 dlg Exp $ */
+/* $OpenBSD: if_vic.c,v 1.80 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2006 Reyk Floeter <reyk@openbsd.org>
@@ -627,11 +627,11 @@ vic_alloc_data(struct vic_softc *sc)
return (0);
freetx:
- free(sc->sc_txbuf, M_DEVBUF);
+ free(sc->sc_txbuf, M_DEVBUF, 0);
q = VIC_NRXRINGS;
freerx:
while (q--)
- free(sc->sc_rxq[q].bufs, M_DEVBUF);
+ free(sc->sc_rxq[q].bufs, M_DEVBUF, 0);
return (1);
}
diff --git a/sys/dev/pci/if_vio.c b/sys/dev/pci/if_vio.c
index fb22fd2dd6f..91b505904b3 100644
--- a/sys/dev/pci/if_vio.c
+++ b/sys/dev/pci/if_vio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vio.c,v 1.17 2014/07/08 05:35:19 dlg Exp $ */
+/* $OpenBSD: if_vio.c,v 1.18 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2012 Stefan Fritsch, Alexander Fiveg.
@@ -473,7 +473,7 @@ err_reqs:
bus_dmamap_destroy(vsc->sc_dmat, sc->sc_rx_dmamaps[i]);
}
if (sc->sc_arrays) {
- free(sc->sc_arrays, M_DEVBUF);
+ free(sc->sc_arrays, M_DEVBUF, 0);
sc->sc_arrays = 0;
}
err_hdr:
diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c
index e0da804d2a9..f2195884529 100644
--- a/sys/dev/pci/if_wpi.c
+++ b/sys/dev/pci/if_wpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wpi.c,v 1.118 2014/03/19 10:09:19 mpi Exp $ */
+/* $OpenBSD: if_wpi.c,v 1.119 2014/07/12 18:48:52 tedu Exp $ */
/*-
* Copyright (c) 2006-2008
@@ -2643,7 +2643,7 @@ wpi_scan(struct wpi_softc *sc, uint16_t flags)
DPRINTF(("sending scan command nchan=%d\n", hdr->nchan));
error = wpi_cmd(sc, WPI_CMD_SCAN, buf, buflen, 1);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return error;
}
@@ -3000,7 +3000,7 @@ wpi_read_firmware(struct wpi_softc *sc)
if (size < sizeof (*hdr)) {
printf("%s: truncated firmware header: %zu bytes\n",
sc->sc_dev.dv_xname, size);
- free(fw->data, M_DEVBUF);
+ free(fw->data, M_DEVBUF, 0);
return EINVAL;
}
/* Extract firmware header information. */
@@ -3020,7 +3020,7 @@ wpi_read_firmware(struct wpi_softc *sc)
fw->boot.textsz > WPI_FW_BOOT_TEXT_MAXSZ ||
(fw->boot.textsz & 3) != 0) {
printf("%s: invalid firmware header\n", sc->sc_dev.dv_xname);
- free(fw->data, M_DEVBUF);
+ free(fw->data, M_DEVBUF, 0);
return EINVAL;
}
@@ -3029,7 +3029,7 @@ wpi_read_firmware(struct wpi_softc *sc)
fw->init.textsz + fw->init.datasz + fw->boot.textsz) {
printf("%s: firmware file too short: %zu bytes\n",
sc->sc_dev.dv_xname, size);
- free(fw->data, M_DEVBUF);
+ free(fw->data, M_DEVBUF, 0);
return EINVAL;
}
@@ -3321,7 +3321,7 @@ wpi_init(struct ifnet *ifp)
/* Initialize hardware and upload firmware. */
error = wpi_hw_init(sc);
- free(sc->fw.data, M_DEVBUF);
+ free(sc->fw.data, M_DEVBUF, 0);
if (error != 0) {
printf("%s: could not initialize hardware\n",
sc->sc_dev.dv_xname);
diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c
index 11582a6bc9e..9a2b5fc75cc 100644
--- a/sys/dev/pci/ips.c
+++ b/sys/dev/pci/ips.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ips.c,v 1.108 2011/07/17 22:46:48 matthew Exp $ */
+/* $OpenBSD: ips.c,v 1.109 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2006, 2007, 2009 Alexander Yurchenko <grange@openbsd.org>
@@ -815,7 +815,7 @@ ips_attach(struct device *parent, struct device *self, void *aux)
}
if (sensor_task_register(sc, ips_sensors, 10) == NULL) {
printf(": no sensors support\n");
- free(sc->sc_sensors, M_DEVBUF);
+ free(sc->sc_sensors, M_DEVBUF, 0);
return;
}
sensordev_install(&sc->sc_sensordev);
@@ -2002,7 +2002,7 @@ ips_ccb_alloc(struct ips_softc *sc, int n)
fail:
for (; i > 0; i--)
bus_dmamap_destroy(sc->sc_dmat, ccb[i - 1].c_dmam);
- free(ccb, M_DEVBUF);
+ free(ccb, M_DEVBUF, 0);
return (NULL);
}
@@ -2013,7 +2013,7 @@ ips_ccb_free(struct ips_softc *sc, struct ips_ccb *ccb, int n)
for (i = 0; i < n; i++)
bus_dmamap_destroy(sc->sc_dmat, ccb[i - 1].c_dmam);
- free(ccb, M_DEVBUF);
+ free(ccb, M_DEVBUF, 0);
}
void *
diff --git a/sys/dev/pci/isp_pci.c b/sys/dev/pci/isp_pci.c
index 73bddd64e1a..16e057ba912 100644
--- a/sys/dev/pci/isp_pci.c
+++ b/sys/dev/pci/isp_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isp_pci.c,v 1.59 2014/02/14 05:17:05 jmatthew Exp $ */
+/* $OpenBSD: isp_pci.c,v 1.60 2014/07/12 18:48:52 tedu Exp $ */
/* $FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.148 2007/06/26 23:08:57 mjacob Exp $*/
/*-
* Copyright (c) 1997-2006 by Matthew Jacob
@@ -752,7 +752,7 @@ isp_pci_attach(struct device *parent, struct device *self, void *aux)
if (pci_intr_map(pa, &ih)) {
printf(": couldn't map interrupt\n");
- free(isp->isp_param, M_DEVBUF);
+ free(isp->isp_param, M_DEVBUF, 0);
return;
}
intrstr = pci_intr_string(pa->pa_pc, ih);
@@ -763,7 +763,7 @@ isp_pci_attach(struct device *parent, struct device *self, void *aux)
if (pcs->pci_ih == NULL) {
printf(": couldn't establish interrupt at %s\n",
intrstr);
- free(isp->isp_param, M_DEVBUF);
+ free(isp->isp_param, M_DEVBUF, 0);
return;
}
@@ -783,7 +783,7 @@ isp_pci_attach(struct device *parent, struct device *self, void *aux)
isp_reset(isp);
if (isp->isp_state != ISP_RESETSTATE) {
ISP_UNLOCK(isp);
- free(isp->isp_param, M_DEVBUF);
+ free(isp->isp_param, M_DEVBUF, 0);
return;
}
ISP_ENABLE_INTS(isp);
@@ -791,7 +791,7 @@ isp_pci_attach(struct device *parent, struct device *self, void *aux)
if (isp->isp_state != ISP_INITSTATE) {
isp_uninit(isp);
ISP_UNLOCK(isp);
- free(isp->isp_param, M_DEVBUF);
+ free(isp->isp_param, M_DEVBUF, 0);
return;
}
/*
@@ -801,7 +801,7 @@ isp_pci_attach(struct device *parent, struct device *self, void *aux)
if (isp->isp_state != ISP_RUNSTATE) {
isp_uninit(isp);
ISP_UNLOCK(isp);
- free(isp->isp_param, M_DEVBUF);
+ free(isp->isp_param, M_DEVBUF, 0);
} else {
ISP_UNLOCK(isp);
}
@@ -1084,7 +1084,7 @@ isp_pci_mbxdma(struct ispsoftc *isp)
len = isp->isp_maxcmds * sizeof (bus_dmamap_t);
pcs->pci_xfer_dmap = (bus_dmamap_t *) malloc(len, M_DEVBUF, M_NOWAIT);
if (pcs->pci_xfer_dmap == NULL) {
- free(isp->isp_xflist, M_DEVBUF);
+ free(isp->isp_xflist, M_DEVBUF, 0);
isp->isp_xflist = NULL;
isp_prt(isp, ISP_LOGERR, "cannot malloc dma map array");
return (1);
@@ -1102,8 +1102,8 @@ isp_pci_mbxdma(struct ispsoftc *isp)
while (--i >= 0) {
bus_dmamap_destroy(dmat, pcs->pci_xfer_dmap[i]);
}
- free(isp->isp_xflist, M_DEVBUF);
- free(pcs->pci_xfer_dmap, M_DEVBUF);
+ free(isp->isp_xflist, M_DEVBUF, 0);
+ free(pcs->pci_xfer_dmap, M_DEVBUF, 0);
isp->isp_xflist = NULL;
pcs->pci_xfer_dmap = NULL;
return (1);
@@ -1165,8 +1165,8 @@ dmafail:
for (i = 0; i < isp->isp_maxcmds; i++) {
bus_dmamap_destroy(dmat, pcs->pci_xfer_dmap[i]);
}
- free(isp->isp_xflist, M_DEVBUF);
- free(pcs->pci_xfer_dmap, M_DEVBUF);
+ free(isp->isp_xflist, M_DEVBUF, 0);
+ free(pcs->pci_xfer_dmap, M_DEVBUF, 0);
isp->isp_xflist = NULL;
pcs->pci_xfer_dmap = NULL;
return (1);
diff --git a/sys/dev/pci/lofn.c b/sys/dev/pci/lofn.c
index 212c79316dd..1a4de67f640 100644
--- a/sys/dev/pci/lofn.c
+++ b/sys/dev/pci/lofn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lofn.c,v 1.29 2011/01/12 17:01:26 deraadt Exp $ */
+/* $OpenBSD: lofn.c,v 1.30 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2001-2002 Jason L. Wright (jason@thought.net)
@@ -200,7 +200,7 @@ lofn_intr(vsc)
q = sc->sc_current;
sc->sc_current = NULL;
q->q_finish(sc, q);
- free(q, M_DEVBUF);
+ free(q, M_DEVBUF, 0);
lofn_feed(sc);
}
}
@@ -317,7 +317,7 @@ lofn_kprocess(krp)
sc->sc_dv.dv_xname, krp->krp_op);
krp->krp_status = EOPNOTSUPP;
crypto_kdone(krp);
- free(q, M_DEVBUF);
+ free(q, M_DEVBUF, 0);
return (0);
}
}
@@ -540,7 +540,7 @@ lofn_feed(sc)
break;
} else {
SIMPLEQ_REMOVE_HEAD(&sc->sc_queue, q_next);
- free(q, M_DEVBUF);
+ free(q, M_DEVBUF, 0);
}
}
}
diff --git a/sys/dev/pci/maestro.c b/sys/dev/pci/maestro.c
index 7b964bdde04..c949f493dc6 100644
--- a/sys/dev/pci/maestro.c
+++ b/sys/dev/pci/maestro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: maestro.c,v 1.36 2013/11/15 16:46:27 brad Exp $ */
+/* $OpenBSD: maestro.c,v 1.37 2014/07/12 18:48:52 tedu Exp $ */
/* $FreeBSD: /c/ncvs/src/sys/dev/sound/pci/maestro.c,v 1.3 2000/11/21 12:22:11 julian Exp $ */
/*
* FreeBSD's ESS Agogo/Maestro driver
@@ -1776,7 +1776,7 @@ salloc_new(caddr_t addr, size_t size, int nzones)
void
salloc_destroy(salloc_t pool)
{
- free(pool, M_TEMP);
+ free(pool, M_TEMP, 0);
}
void
diff --git a/sys/dev/pci/mfii.c b/sys/dev/pci/mfii.c
index 9fc64e2c884..72e736afaed 100644
--- a/sys/dev/pci/mfii.c
+++ b/sys/dev/pci/mfii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfii.c,v 1.15 2014/03/28 22:25:49 dlg Exp $ */
+/* $OpenBSD: mfii.c,v 1.16 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2012 David Gwynne <dlg@openbsd.org>
@@ -476,7 +476,7 @@ free:
destroy:
bus_dmamap_destroy(sc->sc_dmat, m->mdm_map);
mdmfree:
- free(m, M_DEVBUF);
+ free(m, M_DEVBUF, 0);
return (NULL);
}
@@ -488,7 +488,7 @@ mfii_dmamem_free(struct mfii_softc *sc, struct mfii_dmamem *m)
bus_dmamem_unmap(sc->sc_dmat, m->mdm_kva, m->mdm_size);
bus_dmamem_free(sc->sc_dmat, &m->mdm_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, m->mdm_map);
- free(m, M_DEVBUF);
+ free(m, M_DEVBUF, 0);
}
@@ -1430,7 +1430,7 @@ destroy:
while ((ccb = mfii_get_ccb(sc)) != NULL)
bus_dmamap_destroy(sc->sc_dmat, ccb->ccb_dmamap);
- free(sc->sc_ccb, M_DEVBUF);
+ free(sc->sc_ccb, M_DEVBUF, 0);
return (1);
}
diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c
index c268604a4c9..d521b461d87 100644
--- a/sys/dev/pci/mpii.c
+++ b/sys/dev/pci/mpii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpii.c,v 1.94 2014/05/04 17:34:17 sf Exp $ */
+/* $OpenBSD: mpii.c,v 1.95 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2010, 2012 Mike Belopuhov
* Copyright (c) 2009 James Giannoules
@@ -609,7 +609,7 @@ mpii_attach(struct device *parent, struct device *self, void *aux)
return;
free_devs:
- free(sc->sc_devs, M_DEVBUF);
+ free(sc->sc_devs, M_DEVBUF, 0);
sc->sc_devs = NULL;
free_queues:
@@ -630,7 +630,7 @@ free_ccbs:
while ((ccb = mpii_get_ccb(sc)) != NULL)
bus_dmamap_destroy(sc->sc_dmat, ccb->ccb_dmamap);
mpii_dmamem_free(sc, sc->sc_requests);
- free(sc->sc_ccbs, M_DEVBUF);
+ free(sc->sc_ccbs, M_DEVBUF, 0);
unmap:
bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_ios);
@@ -1649,7 +1649,7 @@ mpii_event_raid(struct mpii_softc *sc, struct mpii_msg_event_reply *enp)
dev->slot = sc->sc_vd_id_low;
dev->dev_handle = lemtoh16(&ce->vol_dev_handle);
if (mpii_insert_dev(sc, dev)) {
- free(dev, M_DEVBUF);
+ free(dev, M_DEVBUF, 0);
break;
}
sc->sc_vd_count++;
@@ -1743,7 +1743,7 @@ mpii_event_sas(void *xsc, void *x)
dev->expander = lemtoh16(&tcl->expander_handle);
if (mpii_insert_dev(sc, dev)) {
- free(dev, M_DEVBUF);
+ free(dev, M_DEVBUF, 0);
break;
}
@@ -1766,7 +1766,7 @@ mpii_event_sas(void *xsc, void *x)
DETACH_FORCE);
}
- free(dev, M_DEVBUF);
+ free(dev, M_DEVBUF, 0);
break;
}
}
@@ -2277,7 +2277,7 @@ free:
destroy:
bus_dmamap_destroy(sc->sc_dmat, mdm->mdm_map);
mdmfree:
- free(mdm, M_DEVBUF);
+ free(mdm, M_DEVBUF, 0);
return (NULL);
}
@@ -2291,7 +2291,7 @@ mpii_dmamem_free(struct mpii_softc *sc, struct mpii_dmamem *mdm)
bus_dmamem_unmap(sc->sc_dmat, mdm->mdm_kva, mdm->mdm_size);
bus_dmamem_free(sc->sc_dmat, &mdm->mdm_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, mdm->mdm_map);
- free(mdm, M_DEVBUF);
+ free(mdm, M_DEVBUF, 0);
}
int
@@ -2423,7 +2423,7 @@ free_maps:
mpii_dmamem_free(sc, sc->sc_requests);
free_ccbs:
- free(sc->sc_ccbs, M_DEVBUF);
+ free(sc->sc_ccbs, M_DEVBUF, 0);
return (1);
}
@@ -2479,7 +2479,7 @@ mpii_alloc_replies(struct mpii_softc *sc)
sc->sc_replies = mpii_dmamem_alloc(sc, sc->sc_reply_size *
sc->sc_num_reply_frames);
if (sc->sc_replies == NULL) {
- free(sc->sc_rcbs, M_DEVBUF);
+ free(sc->sc_rcbs, M_DEVBUF, 0);
return (1);
}
@@ -3081,7 +3081,7 @@ mpii_ioctl_cache(struct scsi_link *link, u_long cmd, struct dk_cache *dc)
scsi_io_put(&sc->sc_iopool, ccb);
done:
- free(vpg, M_TEMP);
+ free(vpg, M_TEMP, 0);
return (rv);
}
@@ -3168,7 +3168,7 @@ mpii_ioctl_vol(struct mpii_softc *sc, struct bioc_vol *bv)
&hdr, 1, vpg, pagelen) != 0) {
printf("%s: unable to fetch raid volume page 0\n",
DEVNAME(sc));
- free(vpg, M_TEMP);
+ free(vpg, M_TEMP, 0);
return (EINVAL);
}
@@ -3213,7 +3213,7 @@ mpii_ioctl_vol(struct mpii_softc *sc, struct bioc_vol *bv)
}
if ((rv = mpii_bio_hs(sc, NULL, 0, vpg->hot_spare_pool, &hcnt)) != 0) {
- free(vpg, M_TEMP);
+ free(vpg, M_TEMP, 0);
return (rv);
}
@@ -3227,7 +3227,7 @@ mpii_ioctl_vol(struct mpii_softc *sc, struct bioc_vol *bv)
strlcpy(bv->bv_dev, scdev->dv_xname, sizeof(bv->bv_dev));
}
- free(vpg, M_TEMP);
+ free(vpg, M_TEMP, 0);
return (0);
}
@@ -3268,7 +3268,7 @@ mpii_ioctl_disk(struct mpii_softc *sc, struct bioc_disk *bd)
&hdr, 1, vpg, pagelen) != 0) {
printf("%s: unable to fetch raid volume page 0\n",
DEVNAME(sc));
- free(vpg, M_TEMP);
+ free(vpg, M_TEMP, 0);
return (EINVAL);
}
@@ -3276,7 +3276,7 @@ mpii_ioctl_disk(struct mpii_softc *sc, struct bioc_disk *bd)
int nvdsk = vpg->num_phys_disks;
int hsmap = vpg->hot_spare_pool;
- free(vpg, M_TEMP);
+ free(vpg, M_TEMP, 0);
return (mpii_bio_hs(sc, bd, nvdsk, hsmap, NULL));
}
@@ -3284,7 +3284,7 @@ mpii_ioctl_disk(struct mpii_softc *sc, struct bioc_disk *bd)
bd->bd_diskid;
dn = pd->phys_disk_num;
- free(vpg, M_TEMP);
+ free(vpg, M_TEMP, 0);
return (mpii_bio_disk(sc, bd, dn));
}
@@ -3324,7 +3324,7 @@ mpii_bio_hs(struct mpii_softc *sc, struct bioc_disk *bd, int nvdsk,
MPII_PG_EXTENDED, &ehdr, 1, cpg, pagelen) != 0) {
printf("%s: unable to fetch raid config page 0\n",
DEVNAME(sc));
- free(cpg, M_TEMP);
+ free(cpg, M_TEMP, 0);
return (EINVAL);
}
@@ -3343,7 +3343,7 @@ mpii_bio_hs(struct mpii_softc *sc, struct bioc_disk *bd, int nvdsk,
if (bd != NULL && bd->bd_diskid == nhs + nvdsk) {
u_int8_t dn = el->phys_disk_num;
- free(cpg, M_TEMP);
+ free(cpg, M_TEMP, 0);
return (mpii_bio_disk(sc, bd, dn));
}
nhs++;
@@ -3353,7 +3353,7 @@ mpii_bio_hs(struct mpii_softc *sc, struct bioc_disk *bd, int nvdsk,
if (hscnt)
*hscnt = nhs;
- free(cpg, M_TEMP);
+ free(cpg, M_TEMP, 0);
return (0);
}
@@ -3384,7 +3384,7 @@ mpii_bio_disk(struct mpii_softc *sc, struct bioc_disk *bd, u_int8_t dn)
&hdr, 1, ppg, sizeof(*ppg)) != 0) {
printf("%s: unable to fetch raid drive page 0\n",
DEVNAME(sc));
- free(ppg, M_TEMP);
+ free(ppg, M_TEMP, 0);
return (EINVAL);
}
@@ -3392,7 +3392,7 @@ mpii_bio_disk(struct mpii_softc *sc, struct bioc_disk *bd, u_int8_t dn)
if ((dev = mpii_find_dev(sc, lemtoh16(&ppg->dev_handle))) == NULL) {
bd->bd_status = BIOC_SDINVALID;
- free(ppg, M_TEMP);
+ free(ppg, M_TEMP, 0);
return (0);
}
@@ -3437,7 +3437,7 @@ mpii_bio_disk(struct mpii_softc *sc, struct bioc_disk *bd, u_int8_t dn)
sizeof(ppg->product_id));
scsi_strvis(bd->bd_serial, ppg->serial, sizeof(ppg->serial));
- free(ppg, M_TEMP);
+ free(ppg, M_TEMP, 0);
return (0);
}
@@ -3490,7 +3490,7 @@ mpii_bio_volstate(struct mpii_softc *sc, struct bioc_vol *bv)
MPII_PG_POLL, &hdr, 1, vpg, pagelen) != 0) {
DNPRINTF(MPII_D_MISC, "%s: unable to fetch raid volume "
"page 0\n", DEVNAME(sc));
- free(vpg, M_TEMP);
+ free(vpg, M_TEMP, 0);
return (EINVAL);
}
@@ -3518,7 +3518,7 @@ mpii_bio_volstate(struct mpii_softc *sc, struct bioc_vol *bv)
break;
}
- free(vpg, M_TEMP);
+ free(vpg, M_TEMP, 0);
return (0);
}
@@ -3563,7 +3563,7 @@ mpii_create_sensors(struct mpii_softc *sc)
return (0);
bad:
- free(sc->sc_sensors, M_DEVBUF);
+ free(sc->sc_sensors, M_DEVBUF, 0);
return (1);
}
diff --git a/sys/dev/pci/nofn.c b/sys/dev/pci/nofn.c
index 1ca24142fab..490850c8162 100644
--- a/sys/dev/pci/nofn.c
+++ b/sys/dev/pci/nofn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nofn.c,v 1.18 2011/01/12 17:01:26 deraadt Exp $ */
+/* $OpenBSD: nofn.c,v 1.19 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -201,7 +201,7 @@ nofn_intr(vsc)
q = sc->sc_pk_current;
sc->sc_pk_current = NULL;
q->q_finish(sc, q);
- free(q, M_DEVBUF);
+ free(q, M_DEVBUF, 0);
nofn_pk_feed(sc);
}
}
@@ -409,7 +409,7 @@ nofn_pk_feed(sc)
break;
} else {
SIMPLEQ_REMOVE_HEAD(&sc->sc_pk_queue, q_next);
- free(q, M_DEVBUF);
+ free(q, M_DEVBUF, 0);
}
}
}
@@ -452,7 +452,7 @@ nofn_pk_process(krp)
sc->sc_dev.dv_xname, krp->krp_op);
krp->krp_status = EOPNOTSUPP;
crypto_kdone(krp);
- free(q, M_DEVBUF);
+ free(q, M_DEVBUF, 0);
return (0);
}
}
diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c
index 48d7d125918..5b50113818c 100644
--- a/sys/dev/pci/pccbb.c
+++ b/sys/dev/pci/pccbb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pccbb.c,v 1.91 2013/12/06 21:03:04 deraadt Exp $ */
+/* $OpenBSD: pccbb.c,v 1.92 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: pccbb.c,v 1.96 2004/03/28 09:49:31 nakayama Exp $ */
/*
@@ -1565,7 +1565,7 @@ pccbb_intr_disestablish(struct pccbb_softc *sc, void *ih)
if (pil == ih) {
evcount_detach(&pil->pil_count);
*pil_prev = pil->pil_next;
- free(pil, M_DEVBUF);
+ free(pil, M_DEVBUF, 0);
DPRINTF(("pccbb_intr_disestablish frees one pil\n"));
break;
}
@@ -2670,7 +2670,7 @@ pccbb_winlist_delete(struct pccbb_win_chain_head *head, bus_space_handle_t bsh,
}
TAILQ_REMOVE(head, chainp, wc_list);
- free(chainp, M_DEVBUF);
+ free(chainp, M_DEVBUF, 0);
return 0;
}
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 80265afb75e..4a226d4f968 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci.c,v 1.102 2014/05/04 20:09:15 sf Exp $ */
+/* $OpenBSD: pci.c,v 1.103 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: pci.c,v 1.31 1997/06/06 23:48:04 thorpej Exp $ */
/*
@@ -577,7 +577,7 @@ pci_detach_devices(struct pci_softc *sc, int flags)
for (pd = LIST_FIRST(&sc->sc_devs);
pd != LIST_END(&sc->sc_devs); pd = next) {
next = LIST_NEXT(pd, pd_next);
- free(pd, M_DEVBUF);
+ free(pd, M_DEVBUF, 0);
}
LIST_INIT(&sc->sc_devs);
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c
index 18cf49e2184..e141c3c36cd 100644
--- a/sys/dev/pci/pciide.c
+++ b/sys/dev/pci/pciide.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pciide.c,v 1.345 2014/04/24 15:38:25 jsg Exp $ */
+/* $OpenBSD: pciide.c,v 1.346 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */
/*
@@ -2532,7 +2532,7 @@ default_chip_unmap(struct pciide_softc *sc, int flags)
pciide_unmapreg_dma(sc);
if (sc->sc_cookie)
- free(sc->sc_cookie, M_DEVBUF);
+ free(sc->sc_cookie, M_DEVBUF, 0);
}
void
diff --git a/sys/dev/pci/ppb.c b/sys/dev/pci/ppb.c
index b846fd44487..b95b780b4fe 100644
--- a/sys/dev/pci/ppb.c
+++ b/sys/dev/pci/ppb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ppb.c,v 1.57 2014/01/29 18:30:39 kettenis Exp $ */
+/* $OpenBSD: ppb.c,v 1.58 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: ppb.c,v 1.16 1997/06/06 23:48:05 thorpej Exp $ */
/*
@@ -337,19 +337,19 @@ ppbdetach(struct device *self, int flags)
if (sc->sc_ioex) {
name = sc->sc_ioex->ex_name;
extent_destroy(sc->sc_ioex);
- free(name, M_DEVBUF);
+ free(name, M_DEVBUF, 0);
}
if (sc->sc_memex) {
name = sc->sc_memex->ex_name;
extent_destroy(sc->sc_memex);
- free(name, M_DEVBUF);
+ free(name, M_DEVBUF, 0);
}
if (sc->sc_pmemex) {
name = sc->sc_pmemex->ex_name;
extent_destroy(sc->sc_pmemex);
- free(name, M_DEVBUF);
+ free(name, M_DEVBUF, 0);
}
return (rv);
diff --git a/sys/dev/pci/qle.c b/sys/dev/pci/qle.c
index 3ab2e5f6578..91a1f6691d1 100644
--- a/sys/dev/pci/qle.c
+++ b/sys/dev/pci/qle.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qle.c,v 1.29 2014/05/21 22:59:26 jmatthew Exp $ */
+/* $OpenBSD: qle.c,v 1.30 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2013, 2014 Jonathan Matthew <jmatthew@openbsd.org>
@@ -902,11 +902,11 @@ qle_add_loop_port(struct qle_softc *sc, struct qle_fc_port *port)
sc->sc_targets[port->loopid] = port;
break;
case QLE_PORT_DISP_DUP:
- free(port, M_DEVBUF);
+ free(port, M_DEVBUF, 0);
break;
case QLE_PORT_DISP_SAME:
TAILQ_REMOVE(&sc->sc_ports_gone, pport, update);
- free(port, M_DEVBUF);
+ free(port, M_DEVBUF, 0);
break;
}
mtx_leave(&sc->sc_port_mtx);
@@ -932,7 +932,7 @@ qle_add_fabric_port(struct qle_softc *sc, struct qle_fc_port *port)
struct qle_get_port_db *pdb;
if (qle_get_port_db(sc, port->loopid, sc->sc_scratch) != 0) {
- free(port, M_DEVBUF);
+ free(port, M_DEVBUF, 0);
return (1);
}
pdb = QLE_DMA_KVA(sc->sc_scratch);
@@ -1619,13 +1619,13 @@ qle_clear_port_lists(struct qle_softc *sc)
while (!TAILQ_EMPTY(&sc->sc_ports_found)) {
p = TAILQ_FIRST(&sc->sc_ports_found);
TAILQ_REMOVE(&sc->sc_ports_found, p, update);
- free(p, M_DEVBUF);
+ free(p, M_DEVBUF, 0);
}
while (!TAILQ_EMPTY(&sc->sc_ports_new)) {
p = TAILQ_FIRST(&sc->sc_ports_new);
TAILQ_REMOVE(&sc->sc_ports_new, p, update);
- free(p, M_DEVBUF);
+ free(p, M_DEVBUF, 0);
}
while (!TAILQ_EMPTY(&sc->sc_ports_gone)) {
@@ -2115,7 +2115,7 @@ qle_do_update(void *xsc, void *x)
if (port->location & QLE_LOCATION_FABRIC)
qle_fabric_plogo(sc, port);
- free(port, M_DEVBUF);
+ free(port, M_DEVBUF, 0);
}
qle_update_done(sc, QLE_UPDATE_TASK_CLEAR_ALL);
@@ -2207,12 +2207,12 @@ qle_do_update(void *xsc, void *x)
DPRINTF(QLE_D_PORT, "%s: loop port %04x\n",
DEVNAME(sc), fport->loopid);
if (qle_add_loop_port(sc, fport) != 0)
- free(fport, M_DEVBUF);
+ free(fport, M_DEVBUF, 0);
} else if (fport->location & QLE_LOCATION_FABRIC) {
qle_add_fabric_port(sc, fport);
} else {
/* already processed */
- free(fport, M_DEVBUF);
+ free(fport, M_DEVBUF, 0);
}
continue;
}
@@ -2250,7 +2250,7 @@ qle_do_update(void *xsc, void *x)
fport, update);
break;
case QLE_PORT_DISP_DUP:
- free(fport, M_DEVBUF);
+ free(fport, M_DEVBUF, 0);
break;
case QLE_PORT_DISP_SAME:
DPRINTF(QLE_D_PORT, "%s: existing port "
@@ -2258,7 +2258,7 @@ qle_do_update(void *xsc, void *x)
fport->portid);
TAILQ_REMOVE(&sc->sc_ports_gone, port,
update);
- free(fport, M_DEVBUF);
+ free(fport, M_DEVBUF, 0);
break;
}
mtx_leave(&sc->sc_port_mtx);
@@ -2291,7 +2291,7 @@ qle_do_update(void *xsc, void *x)
DPRINTF(QLE_D_PORT, "%s: plogi %06x "
"failed\n", DEVNAME(sc),
port->portid);
- free(port, M_DEVBUF);
+ free(port, M_DEVBUF, 0);
}
} else {
DPRINTF(QLE_D_PORT, "%s: done with logins\n",
@@ -2339,7 +2339,7 @@ qle_do_update(void *xsc, void *x)
if (port->location & QLE_LOCATION_FABRIC)
qle_fabric_plogo(sc, port);
- free(port, M_DEVBUF);
+ free(port, M_DEVBUF, 0);
} else {
DPRINTF(QLE_D_PORT, "%s: nothing to detach\n",
DEVNAME(sc));
@@ -2816,7 +2816,7 @@ free:
destroy:
bus_dmamap_destroy(sc->sc_dmat, m->qdm_map);
qdmfree:
- free(m, M_DEVBUF);
+ free(m, M_DEVBUF, 0);
return (NULL);
}
@@ -2828,7 +2828,7 @@ qle_dmamem_free(struct qle_softc *sc, struct qle_dmamem *m)
bus_dmamem_unmap(sc->sc_dmat, m->qdm_kva, m->qdm_size);
bus_dmamem_free(sc->sc_dmat, &m->qdm_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, m->qdm_map);
- free(m, M_DEVBUF);
+ free(m, M_DEVBUF, 0);
}
int
@@ -2923,7 +2923,7 @@ free_res:
free_req:
qle_dmamem_free(sc, sc->sc_requests);
free_ccbs:
- free(sc->sc_ccbs, M_DEVBUF);
+ free(sc->sc_ccbs, M_DEVBUF, 0);
return (1);
}
@@ -2939,7 +2939,7 @@ qle_free_ccbs(struct qle_softc *sc)
qle_dmamem_free(sc, sc->sc_segments);
qle_dmamem_free(sc, sc->sc_responses);
qle_dmamem_free(sc, sc->sc_requests);
- free(sc->sc_ccbs, M_DEVBUF);
+ free(sc->sc_ccbs, M_DEVBUF, 0);
}
void *
diff --git a/sys/dev/pci/safe.c b/sys/dev/pci/safe.c
index 451648e2e89..25359933fd0 100644
--- a/sys/dev/pci/safe.c
+++ b/sys/dev/pci/safe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: safe.c,v 1.35 2012/12/05 23:20:20 deraadt Exp $ */
+/* $OpenBSD: safe.c,v 1.36 2014/07/12 18:48:52 tedu Exp $ */
/*-
* Copyright (c) 2003 Sam Leffler, Errno Consulting
@@ -1352,7 +1352,7 @@ safe_newsession(u_int32_t *sidp, struct cryptoini *cri)
sizeof(struct safe_session));
explicit_bzero(sc->sc_sessions, sesn *
sizeof(struct safe_session));
- 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++;
@@ -1949,7 +1949,7 @@ safe_kfeed(struct safe_softc *sc)
SIMPLEQ_REMOVE_HEAD(&sc->sc_pkq, pkq_next);
if (safe_kstart(sc) != 0) {
crypto_kdone(q->pkq_krp);
- free(q, M_DEVBUF);
+ free(q, M_DEVBUF, 0);
sc->sc_pkq_cur = NULL;
} else {
/* op started, start polling */
@@ -1993,7 +1993,7 @@ safe_kpoll(void *vsc)
explicit_bzero(&buf, sizeof(buf));
crypto_kdone(q->pkq_krp);
- free(q, M_DEVBUF);
+ free(q, M_DEVBUF, 0);
sc->sc_pkq_cur = NULL;
safe_kfeed(sc);
diff --git a/sys/dev/pci/sv.c b/sys/dev/pci/sv.c
index c39fc48c489..5fef1c652cb 100644
--- a/sys/dev/pci/sv.c
+++ b/sys/dev/pci/sv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sv.c,v 1.30 2013/11/15 16:46:27 brad Exp $ */
+/* $OpenBSD: sv.c,v 1.31 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 1998 Constantine Paul Sapuntzakis
@@ -1395,7 +1395,7 @@ sv_malloc(void *addr, int direction, size_t size, int pool, int flags)
return (0);
error = sv_allocmem(sc, size, 16, p);
if (error) {
- free(p, pool);
+ free(p, pool, 0);
return (0);
}
p->next = sc->sc_dmas;
@@ -1413,7 +1413,7 @@ sv_free(void *addr, void *ptr, int pool)
if (KERNADDR(*p) == ptr) {
sv_freemem(sc, *p);
*p = (*p)->next;
- free(*p, pool);
+ free(*p, pool, 0);
return;
}
}
diff --git a/sys/dev/pci/ubsec.c b/sys/dev/pci/ubsec.c
index e9f765e6719..20f36157f2b 100644
--- a/sys/dev/pci/ubsec.c
+++ b/sys/dev/pci/ubsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsec.c,v 1.157 2014/05/04 20:09:15 sf Exp $ */
+/* $OpenBSD: ubsec.c,v 1.158 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2000 Jason L. Wright (jason@thought.net)
@@ -271,7 +271,7 @@ ubsec_attach(struct device *parent, struct device *self, void *aux)
if (ubsec_dma_malloc(sc, sizeof(struct ubsec_dmachunk),
&dmap->d_alloc, 0)) {
printf(": can't allocate dma buffers\n");
- free(q, M_DEVBUF);
+ free(q, M_DEVBUF, 0);
break;
}
dmap->d_dma = (struct ubsec_dmachunk *)dmap->d_alloc.dma_vaddr;
@@ -701,7 +701,7 @@ ubsec_newsession(u_int32_t *sidp, struct cryptoini *cri)
sizeof(struct ubsec_session));
explicit_bzero(sc->sc_sessions, sesn *
sizeof(struct ubsec_session));
- 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++;
@@ -1880,7 +1880,7 @@ ubsec_kfree(struct ubsec_softc *sc, struct ubsec_q2 *q)
ubsec_dma_free(sc, &me->me_E);
ubsec_dma_free(sc, &me->me_C);
ubsec_dma_free(sc, &me->me_epb);
- free(me, M_DEVBUF);
+ free(me, M_DEVBUF, 0);
break;
}
case UBS_CTXOP_RSAPRIV: {
@@ -1890,7 +1890,7 @@ ubsec_kfree(struct ubsec_softc *sc, struct ubsec_q2 *q)
ubsec_dma_free(sc, &rp->rpr_q.q_ctx);
ubsec_dma_free(sc, &rp->rpr_msgin);
ubsec_dma_free(sc, &rp->rpr_msgout);
- free(rp, M_DEVBUF);
+ free(rp, M_DEVBUF, 0);
break;
}
default:
@@ -2131,7 +2131,7 @@ errout:
}
if (me->me_epb.dma_map != NULL)
ubsec_dma_free(sc, &me->me_epb);
- free(me, M_DEVBUF);
+ free(me, M_DEVBUF, 0);
}
krp->krp_status = err;
crypto_kdone(krp);
@@ -2330,7 +2330,7 @@ errout:
}
if (me->me_epb.dma_map != NULL)
ubsec_dma_free(sc, &me->me_epb);
- free(me, M_DEVBUF);
+ free(me, M_DEVBUF, 0);
}
krp->krp_status = err;
crypto_kdone(krp);
@@ -2516,7 +2516,7 @@ errout:
rp->rpr_msgout.dma_size);
ubsec_dma_free(sc, &rp->rpr_msgout);
}
- free(rp, M_DEVBUF);
+ free(rp, M_DEVBUF, 0);
}
krp->krp_status = err;
crypto_kdone(krp);
diff --git a/sys/dev/pci/vga_pci_common.c b/sys/dev/pci/vga_pci_common.c
index bf692827133..9f4567bb38a 100644
--- a/sys/dev/pci/vga_pci_common.c
+++ b/sys/dev/pci/vga_pci_common.c
@@ -73,7 +73,7 @@ vga_pci_bar_init(struct vga_pci_softc *dev, struct pci_attach_args *pa)
if (pci_mapreg_info(pa->pa_pc, pa->pa_tag, addr,
dev->bars[i]->maptype, &dev->bars[i]->base,
&dev->bars[i]->maxsize, &dev->bars[i]->flags) != 0) {
- free(dev->bars[i], M_DEVBUF);
+ free(dev->bars[i], M_DEVBUF, 0);
dev->bars[i] = NULL;
}
diff --git a/sys/dev/pci/virtio.c b/sys/dev/pci/virtio.c
index 257b23180c5..d353b15d401 100644
--- a/sys/dev/pci/virtio.c
+++ b/sys/dev/pci/virtio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: virtio.c,v 1.7 2014/06/26 07:46:17 jasper Exp $ */
+/* $OpenBSD: virtio.c,v 1.8 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: virtio.c,v 1.3 2011/11/02 23:05:52 njoly Exp $ */
/*
@@ -430,7 +430,7 @@ virtio_free_vq(struct virtio_softc *sc, struct virtqueue *vq)
/* tell device that there's no virtqueue any longer */
virtio_setup_queue(sc, vq->vq_index, 0);
- free(vq->vq_entries, M_DEVBUF);
+ free(vq->vq_entries, M_DEVBUF, 0);
bus_dmamap_unload(sc->sc_dmat, vq->vq_dmamap);
bus_dmamap_destroy(sc->sc_dmat, vq->vq_dmamap);
bus_dmamem_unmap(sc->sc_dmat, vq->vq_vaddr, vq->vq_bytesize);
diff --git a/sys/dev/pci/vmwpvs.c b/sys/dev/pci/vmwpvs.c
index 57fd0f6175f..a1a90a17eef 100644
--- a/sys/dev/pci/vmwpvs.c
+++ b/sys/dev/pci/vmwpvs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmwpvs.c,v 1.8 2013/10/30 02:11:32 dlg Exp $ */
+/* $OpenBSD: vmwpvs.c,v 1.9 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2013 David Gwynne <dlg@openbsd.org>
@@ -581,7 +581,7 @@ vmwpvs_attach(struct device *parent, struct device *self, void *aux)
free_ccbs:
while ((ccb = vmwpvs_ccb_get(sc)) != NULL)
bus_dmamap_destroy(sc->sc_dmat, ccb->ccb_dmamap);
- free(sc->sc_ccbs, M_DEVBUF);
+ free(sc->sc_ccbs, M_DEVBUF, 0);
/* free_sense: */
vmwpvs_dmamem_free(sc, sc->sc_sense);
free_sgl:
@@ -1138,7 +1138,7 @@ free:
destroy:
bus_dmamap_destroy(sc->sc_dmat, dm->dm_map);
dmfree:
- free(dm, M_DEVBUF);
+ free(dm, M_DEVBUF, 0);
return (NULL);
}
@@ -1164,5 +1164,5 @@ vmwpvs_dmamem_free(struct vmwpvs_softc *sc, struct vmwpvs_dmamem *dm)
bus_dmamem_unmap(sc->sc_dmat, dm->dm_kva, dm->dm_size);
bus_dmamem_free(sc->sc_dmat, &dm->dm_seg, 1);
bus_dmamap_destroy(sc->sc_dmat, dm->dm_map);
- free(dm, M_DEVBUF);
+ free(dm, M_DEVBUF, 0);
}
diff --git a/sys/dev/pci/yds.c b/sys/dev/pci/yds.c
index 8cce53f4637..61158ea5e26 100644
--- a/sys/dev/pci/yds.c
+++ b/sys/dev/pci/yds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: yds.c,v 1.46 2014/05/17 12:19:36 ratchov Exp $ */
+/* $OpenBSD: yds.c,v 1.47 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: yds.c,v 1.5 2001/05/21 23:55:04 minoura Exp $ */
/*
@@ -367,19 +367,19 @@ yds_download_mcode(struct yds_softc *sc)
p = (u_int32_t *)&yf->data[ntohl(yf->dsplen) + ntohl(yf->ds1len)];
size = ntohl(yf->ds1elen);
} else {
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return 1; /* unknown */
}
if (size > buflen) {
printf("%s: old firmware file, update please\n",
sc->sc_dev.dv_xname);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return 1;
}
if (yds_disable_dsp(sc)) {
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return 1;
}
@@ -409,7 +409,7 @@ yds_download_mcode(struct yds_softc *sc)
yds_enable_dsp(sc);
delay(10*1000); /* neccesary on my 724F (??) */
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return 0;
}
@@ -458,7 +458,7 @@ yds_allocate_slots(struct yds_softc *sc, int resuming)
if (i) {
printf("%s: couldn't alloc/map DSP DMA buffer, reason %d\n",
sc->sc_dev.dv_xname, i);
- free(p, M_DEVBUF);
+ free(p, M_DEVBUF, 0);
return 1;
}
}
@@ -1660,7 +1660,7 @@ yds_malloc(void *addr, int direction, size_t size, int pool, int flags)
return (0);
error = yds_allocmem(sc, size, 16, p);
if (error) {
- free(p, pool);
+ free(p, pool, 0);
return (0);
}
p->next = sc->sc_dmas;
@@ -1678,7 +1678,7 @@ yds_free(void *addr, void *ptr, int pool)
if (KERNADDR(p) == ptr) {
yds_freemem(sc, p);
*pp = p->next;
- free(p, pool);
+ free(p, pool, 0);
return;
}
}
diff --git a/sys/dev/pckbc/pms.c b/sys/dev/pckbc/pms.c
index 4799c8c7438..77904ae771e 100644
--- a/sys/dev/pckbc/pms.c
+++ b/sys/dev/pckbc/pms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pms.c,v 1.51 2014/05/18 15:27:28 stsp Exp $ */
+/* $OpenBSD: pms.c,v 1.52 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: psm.c,v 1.11 2000/06/05 22:20:57 sommerfeld Exp $ */
/*-
@@ -992,7 +992,7 @@ pms_enable_synaptics(struct pms_softc *sc)
}
if (synaptics_get_hwinfo(sc)) {
- free(sc->synaptics, M_DEVBUF);
+ free(sc->synaptics, M_DEVBUF, 0);
sc->synaptics = NULL;
goto err;
}
@@ -1273,7 +1273,7 @@ pms_enable_alps(struct pms_softc *sc)
}
if (alps_get_hwinfo(sc)) {
- free(sc->alps, M_DEVBUF);
+ free(sc->alps, M_DEVBUF, 0);
sc->alps = NULL;
goto err;
}
@@ -1828,7 +1828,7 @@ pms_enable_elantech_v1(struct pms_softc *sc)
}
if (elantech_get_hwinfo_v1(sc)) {
- free(sc->elantech, M_DEVBUF);
+ free(sc->elantech, M_DEVBUF, 0);
sc->elantech = NULL;
goto err;
}
@@ -1867,7 +1867,7 @@ pms_enable_elantech_v2(struct pms_softc *sc)
}
if (elantech_get_hwinfo_v2(sc)) {
- free(sc->elantech, M_DEVBUF);
+ free(sc->elantech, M_DEVBUF, 0);
sc->elantech = NULL;
goto err;
}
@@ -1903,7 +1903,7 @@ pms_enable_elantech_v3(struct pms_softc *sc)
}
if (elantech_get_hwinfo_v3(sc)) {
- free(sc->elantech, M_DEVBUF);
+ free(sc->elantech, M_DEVBUF, 0);
sc->elantech = NULL;
goto err;
}
@@ -1939,7 +1939,7 @@ pms_enable_elantech_v4(struct pms_softc *sc)
}
if (elantech_get_hwinfo_v4(sc)) {
- free(sc->elantech, M_DEVBUF);
+ free(sc->elantech, M_DEVBUF, 0);
sc->elantech = NULL;
goto err;
}
diff --git a/sys/dev/pcmcia/cfxga.c b/sys/dev/pcmcia/cfxga.c
index e9f041f0f27..88593d1fd33 100644
--- a/sys/dev/pcmcia/cfxga.c
+++ b/sys/dev/pcmcia/cfxga.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cfxga.c,v 1.27 2014/01/22 02:58:35 jsg Exp $ */
+/* $OpenBSD: cfxga.c,v 1.28 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2005, 2006, Matthieu Herrb and Miodrag Vallat
@@ -254,7 +254,7 @@ cfxga_remove_function(struct pcmcia_function *pf)
/* we are the first and only entry... */
cfe = SIMPLEQ_FIRST(&pf->cfe_head);
SIMPLEQ_REMOVE_HEAD(&pf->cfe_head, cfe_list);
- free(cfe, M_DEVBUF);
+ free(cfe, M_DEVBUF, 0);
/* And we're a figment of the kernel's imagination again. */
pf->pf_flags |= PFF_FAKE;
@@ -505,7 +505,7 @@ cfxga_alloc_screen(void *v, const struct wsscreen_descr *type, void **cookiep,
scr->scr_mem = malloc(scrsize, M_DEVBUF,
(cold ? M_NOWAIT : M_WAITOK) | M_ZERO);
if (scr->scr_mem == NULL) {
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
return (ENOMEM);
}
@@ -572,8 +572,8 @@ cfxga_free_screen(void *v, void *cookie)
cfxga_burner(sc, 0, 0);
}
- free(scr->scr_mem, M_DEVBUF);
- free(scr, M_DEVBUF);
+ free(scr->scr_mem, M_DEVBUF, 0);
+ free(scr, M_DEVBUF, 0);
}
int
diff --git a/sys/dev/pcmcia/if_malo.c b/sys/dev/pcmcia/if_malo.c
index 2f9808994be..7767e016211 100644
--- a/sys/dev/pcmcia/if_malo.c
+++ b/sys/dev/pcmcia/if_malo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_malo.c,v 1.77 2014/05/04 20:09:15 sf Exp $ */
+/* $OpenBSD: if_malo.c,v 1.78 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org>
@@ -456,7 +456,7 @@ cmalo_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
}
if (nr)
- free(nr, M_DEVBUF);
+ free(nr, M_DEVBUF, 0);
break;
default:
error = ieee80211_ioctl(ifp, cmd, data);
@@ -510,12 +510,12 @@ void
cmalo_fw_free(struct malo_softc *sc)
{
if (sc->sc_fw_h != NULL) {
- free(sc->sc_fw_h, M_DEVBUF);
+ free(sc->sc_fw_h, M_DEVBUF, 0);
sc->sc_fw_h = NULL;
}
if (sc->sc_fw_m != NULL) {
- free(sc->sc_fw_m, M_DEVBUF);
+ free(sc->sc_fw_m, M_DEVBUF, 0);
sc->sc_fw_m = NULL;
}
}
@@ -839,11 +839,11 @@ cmalo_detach(void *arg)
/* free command buffer */
if (sc->sc_cmd != NULL)
- free(sc->sc_cmd, M_DEVBUF);
+ free(sc->sc_cmd, M_DEVBUF, 0);
/* free data buffer */
if (sc->sc_data != NULL)
- free(sc->sc_data, M_DEVBUF);
+ free(sc->sc_data, M_DEVBUF, 0);
/* free firmware */
cmalo_fw_free(sc);
diff --git a/sys/dev/pcmcia/if_xe.c b/sys/dev/pcmcia/if_xe.c
index 2417b08fe16..6f48ccf51e3 100644
--- a/sys/dev/pcmcia/if_xe.c
+++ b/sys/dev/pcmcia/if_xe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_xe.c,v 1.43 2013/11/26 09:50:33 mpi Exp $ */
+/* $OpenBSD: if_xe.c,v 1.44 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 1999 Niklas Hallqvist, Brandon Creighton, Job de Haas
@@ -428,7 +428,7 @@ bad:
pcmcia_io_free(pf, &psc->sc_pcioh);
if (state > 0)
pcmcia_function_disable(pa->pf);
- free(cfe, M_DEVBUF);
+ free(cfe, M_DEVBUF, 0);
}
int
diff --git a/sys/dev/pcmcia/pcmcia_cis.c b/sys/dev/pcmcia/pcmcia_cis.c
index f1e8df5477b..86677f8119b 100644
--- a/sys/dev/pcmcia/pcmcia_cis.c
+++ b/sys/dev/pcmcia/pcmcia_cis.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcmcia_cis.c,v 1.19 2013/07/10 05:36:40 brad Exp $ */
+/* $OpenBSD: pcmcia_cis.c,v 1.20 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: pcmcia_cis.c,v 1.9 1998/08/22 23:41:48 msaitoh Exp $ */
/*
@@ -725,7 +725,7 @@ pcmcia_parse_cis_tuple(tuple, arg)
for (pf = SIMPLEQ_FIRST(&state->card->pf_head);
pf != NULL; pf = pfnext) {
pfnext = SIMPLEQ_NEXT(pf, pf_list);
- free(pf, M_DEVBUF);
+ free(pf, M_DEVBUF, 0);
}
SIMPLEQ_INIT(&state->card->pf_head);
diff --git a/sys/dev/pcmcia/pcmcia_cis_quirks.c b/sys/dev/pcmcia/pcmcia_cis_quirks.c
index 93789b7aa24..05e4d00f923 100644
--- a/sys/dev/pcmcia/pcmcia_cis_quirks.c
+++ b/sys/dev/pcmcia/pcmcia_cis_quirks.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcmcia_cis_quirks.c,v 1.9 2011/03/31 13:05:27 jasper Exp $ */
+/* $OpenBSD: pcmcia_cis_quirks.c,v 1.10 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: pcmcia_cis_quirks.c,v 1.3 1998/12/29 09:00:28 marc Exp $ */
/*
@@ -252,10 +252,10 @@ void pcmcia_check_cis_quirks(sc)
for (cfe = SIMPLEQ_FIRST(&pf->cfe_head); cfe != NULL;
cfe = cfe_next) {
cfe_next = SIMPLEQ_NEXT(cfe, cfe_list);
- free(cfe, M_DEVBUF);
+ free(cfe, M_DEVBUF, 0);
}
pf_next = SIMPLEQ_NEXT(pf, pf_list);
- free(pf, M_DEVBUF);
+ free(pf, M_DEVBUF, 0);
}
SIMPLEQ_INIT(&sc->card.pf_head);
diff --git a/sys/dev/rasops/rasops.c b/sys/dev/rasops/rasops.c
index 1d561e6a23b..66e9c1d95f7 100644
--- a/sys/dev/rasops/rasops.c
+++ b/sys/dev/rasops/rasops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rasops.c,v 1.30 2013/10/20 21:24:00 miod Exp $ */
+/* $OpenBSD: rasops.c,v 1.31 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: rasops.c,v 1.35 2001/02/02 06:01:01 marcus Exp $ */
/*-
@@ -1380,7 +1380,7 @@ rasops_alloc_screen(void *v, void **cookiep,
size = ri->ri_rows * ri->ri_cols * sizeof(struct wsdisplay_charcell);
scr->rs_bs = malloc(size, M_DEVBUF, M_NOWAIT);
if (scr->rs_bs == NULL) {
- free(scr, M_DEVBUF);
+ free(scr, M_DEVBUF, 0);
return (ENOMEM);
}
@@ -1414,8 +1414,8 @@ rasops_free_screen(void *v, void *cookie)
LIST_REMOVE(scr, rs_next);
ri->ri_nscreens--;
- free(scr->rs_bs, M_DEVBUF);
- free(scr, M_DEVBUF);
+ free(scr->rs_bs, M_DEVBUF, 0);
+ free(scr, M_DEVBUF, 0);
}
int
diff --git a/sys/dev/rd.c b/sys/dev/rd.c
index 6e626b05dfc..bf2f63715e8 100644
--- a/sys/dev/rd.c
+++ b/sys/dev/rd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rd.c,v 1.6 2013/06/11 16:42:13 deraadt Exp $ */
+/* $OpenBSD: rd.c,v 1.7 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2011 Matthew Dempsky <matthew@dempsky.org>
@@ -265,7 +265,7 @@ rdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)
lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
rdgetdisklabel(dev, sc, lp, 0);
bcopy(lp, sc->sc_dk.dk_label, sizeof(*lp));
- free(lp, M_TEMP);
+ free(lp, M_TEMP, 0);
goto done;
case DIOCGPDINFO:
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c
index d6414b6de34..a6afe5d1be5 100644
--- a/sys/dev/rnd.c
+++ b/sys/dev/rnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rnd.c,v 1.157 2014/06/14 18:01:42 deraadt Exp $ */
+/* $OpenBSD: rnd.c,v 1.158 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2011 Theo de Raadt.
@@ -842,7 +842,7 @@ randomread(dev_t dev, struct uio *uio, int ioflag)
if (myctx)
explicit_bzero(&lctx, sizeof(lctx));
explicit_bzero(buf, POOLBYTES);
- free(buf, M_TEMP);
+ free(buf, M_TEMP, 0);
return ret;
}
@@ -875,7 +875,7 @@ randomwrite(dev_t dev, struct uio *uio, int flags)
arc4_init(NULL, NULL);
explicit_bzero(buf, POOLBYTES);
- free(buf, M_TEMP);
+ free(buf, M_TEMP, 0);
return ret;
}
diff --git a/sys/dev/sbus/cs4231.c b/sys/dev/sbus/cs4231.c
index d569da895cc..e8d2cb1940c 100644
--- a/sys/dev/sbus/cs4231.c
+++ b/sys/dev/sbus/cs4231.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cs4231.c,v 1.32 2013/05/15 08:29:24 ratchov Exp $ */
+/* $OpenBSD: cs4231.c,v 1.33 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
@@ -1469,7 +1469,7 @@ fail2:
fail1:
bus_dmamap_destroy(dmat, p->dmamap);
fail:
- free(p, pool);
+ free(p, pool, 0);
return (NULL);
}
@@ -1488,7 +1488,7 @@ cs4231_free(void *vsc, void *ptr, int 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/dev/sbus/isp_sbus.c b/sys/dev/sbus/isp_sbus.c
index 378740e47c0..45d380baa23 100644
--- a/sys/dev/sbus/isp_sbus.c
+++ b/sys/dev/sbus/isp_sbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isp_sbus.c,v 1.20 2014/02/14 14:00:08 jmatthew Exp $ */
+/* $OpenBSD: isp_sbus.c,v 1.21 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: isp_sbus.c,v 1.46 2001/09/26 20:53:14 eeh Exp $ */
/*
* SBus specific probe and attach routines for QLogic ISP SCSI adapters.
@@ -462,7 +462,7 @@ isp_sbus_mbxdma(struct ispsoftc *isp)
n = sizeof (bus_dmamap_t) * isp->isp_maxcmds;
sbc->sbus_dmamap = (bus_dmamap_t *) malloc(n, M_DEVBUF, M_WAITOK);
if (sbc->sbus_dmamap == NULL) {
- free(isp->isp_xflist, M_DEVBUF);
+ free(isp->isp_xflist, M_DEVBUF, 0);
isp->isp_xflist = NULL;
isp_prt(isp, ISP_LOGERR, "cannot alloc dmamap array");
return (1);
@@ -480,8 +480,8 @@ isp_sbus_mbxdma(struct ispsoftc *isp)
bus_dmamap_destroy(isp->isp_dmatag,
sbc->sbus_dmamap[i]);
}
- free(isp->isp_xflist, M_DEVBUF);
- free(sbc->sbus_dmamap, M_DEVBUF);
+ free(isp->isp_xflist, M_DEVBUF, 0);
+ free(sbc->sbus_dmamap, M_DEVBUF, 0);
isp->isp_xflist = NULL;
sbc->sbus_dmamap = NULL;
return (1);
@@ -555,8 +555,8 @@ dmafail:
for (i = 0; i < isp->isp_maxcmds; i++) {
bus_dmamap_destroy(isp->isp_dmatag, sbc->sbus_dmamap[i]);
}
- free(sbc->sbus_dmamap, M_DEVBUF);
- free(isp->isp_xflist, M_DEVBUF);
+ free(sbc->sbus_dmamap, M_DEVBUF, 0);
+ free(isp->isp_xflist, M_DEVBUF, 0);
isp->isp_xflist = NULL;
sbc->sbus_dmamap = NULL;
return (1);
diff --git a/sys/dev/sbus/magma.c b/sys/dev/sbus/magma.c
index 063a10f7a95..41de56dfee2 100644
--- a/sys/dev/sbus/magma.c
+++ b/sys/dev/sbus/magma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: magma.c,v 1.23 2010/07/02 17:27:01 nicm Exp $ */
+/* $OpenBSD: magma.c,v 1.24 2014/07/12 18:48:52 tedu Exp $ */
/*-
* Copyright (c) 1998 Iain Hibbert
@@ -1627,7 +1627,7 @@ mbpp_rw(dev_t dev, struct uio *uio)
uio->uio_resid += (len - cnt);
}
- free(buffer, M_DEVBUF);
+ free(buffer, M_DEVBUF, 0);
return (error);
}
diff --git a/sys/dev/sbus/qla_sbus.c b/sys/dev/sbus/qla_sbus.c
index 4f2904de902..c36382f5c95 100644
--- a/sys/dev/sbus/qla_sbus.c
+++ b/sys/dev/sbus/qla_sbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qla_sbus.c,v 1.1 2014/02/02 13:01:58 kettenis Exp $ */
+/* $OpenBSD: qla_sbus.c,v 1.2 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2014 Mark Kettenis
*
@@ -152,5 +152,5 @@ qla_sbus_attach(struct device *parent, struct device *self, void *aux)
unmap:
bus_space_unmap(iot, ioh, sa->sa_size);
free:
- free(iot, M_DEVBUF);
+ free(iot, M_DEVBUF, 0);
}
diff --git a/sys/dev/sdmmc/sdhc.c b/sys/dev/sdmmc/sdhc.c
index 25af0462d7e..d3c79248ef5 100644
--- a/sys/dev/sdmmc/sdhc.c
+++ b/sys/dev/sdmmc/sdhc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdhc.c,v 1.37 2013/12/06 21:03:04 deraadt Exp $ */
+/* $OpenBSD: sdhc.c,v 1.38 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -242,7 +242,7 @@ sdhc_host_found(struct sdhc_softc *sc, bus_space_tag_t iot,
return 0;
err:
- free(hp, M_DEVBUF);
+ free(hp, M_DEVBUF, 0);
sc->sc_host[sc->sc_nhosts - 1] = NULL;
sc->sc_nhosts--;
return (error);
diff --git a/sys/dev/sdmmc/sdmmc.c b/sys/dev/sdmmc/sdmmc.c
index fa962a717c9..ec14e473002 100644
--- a/sys/dev/sdmmc/sdmmc.c
+++ b/sys/dev/sdmmc/sdmmc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdmmc.c,v 1.33 2014/03/05 21:35:21 sthen Exp $ */
+/* $OpenBSD: sdmmc.c,v 1.34 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -487,7 +487,7 @@ sdmmc_function_alloc(struct sdmmc_softc *sc)
void
sdmmc_function_free(struct sdmmc_function *sf)
{
- free(sf, M_DEVBUF);
+ free(sf, M_DEVBUF, 0);
}
/*
@@ -810,7 +810,7 @@ sdmmc_ioctl(struct device *self, u_long request, caddr_t addr)
return EFAULT;
if (ucmd->c_data)
- free(data, M_TEMP);
+ free(data, M_TEMP, 0);
break;
default:
diff --git a/sys/dev/sdmmc/sdmmc_io.c b/sys/dev/sdmmc/sdmmc_io.c
index b7137efb08e..4f8244d5fd3 100644
--- a/sys/dev/sdmmc/sdmmc_io.c
+++ b/sys/dev/sdmmc/sdmmc_io.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdmmc_io.c,v 1.19 2010/08/24 14:52:23 blambert Exp $ */
+/* $OpenBSD: sdmmc_io.c,v 1.20 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -682,7 +682,7 @@ sdmmc_intr_disestablish(void *cookie)
}
splx(s);
- free(ih, M_DEVBUF);
+ free(ih, M_DEVBUF, 0);
}
/*
diff --git a/sys/dev/sdmmc/sdmmc_mem.c b/sys/dev/sdmmc/sdmmc_mem.c
index f06f5ac2d15..3d4d9d25c6a 100644
--- a/sys/dev/sdmmc/sdmmc_mem.c
+++ b/sys/dev/sdmmc/sdmmc_mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdmmc_mem.c,v 1.18 2013/10/22 16:49:27 syl Exp $ */
+/* $OpenBSD: sdmmc_mem.c,v 1.19 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -370,7 +370,7 @@ sdmmc_mem_send_cxd_data(struct sdmmc_softc *sc, int opcode, void *data,
out:
if (ptr != NULL)
- free(ptr, M_DEVBUF);
+ free(ptr, M_DEVBUF, 0);
return error;
}
diff --git a/sys/dev/sdmmc/sdmmc_scsi.c b/sys/dev/sdmmc/sdmmc_scsi.c
index b27f5d45086..1332a7f3d79 100644
--- a/sys/dev/sdmmc/sdmmc_scsi.c
+++ b/sys/dev/sdmmc/sdmmc_scsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdmmc_scsi.c,v 1.30 2011/07/17 22:46:48 matthew Exp $ */
+/* $OpenBSD: sdmmc_scsi.c,v 1.31 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -152,8 +152,8 @@ sdmmc_scsi_attach(struct sdmmc_softc *sc)
sc->sc_scsibus = NULL;
sdmmc_free_ccbs(scbus);
free_sctgt:
- free(scbus->sc_tgt, M_DEVBUF);
- free(scbus, M_DEVBUF);
+ free(scbus->sc_tgt, M_DEVBUF, 0);
+ free(scbus, M_DEVBUF, 0);
}
void
@@ -180,10 +180,10 @@ sdmmc_scsi_detach(struct sdmmc_softc *sc)
config_detach(scbus->sc_child, DETACH_FORCE);
if (scbus->sc_tgt != NULL)
- free(scbus->sc_tgt, M_DEVBUF);
+ free(scbus->sc_tgt, M_DEVBUF, 0);
sdmmc_free_ccbs(scbus);
- free(scbus, M_DEVBUF);
+ free(scbus, M_DEVBUF, 0);
sc->sc_scsibus = NULL;
}
@@ -224,7 +224,7 @@ void
sdmmc_free_ccbs(struct sdmmc_scsi_softc *scbus)
{
if (scbus->sc_ccbs != NULL) {
- free(scbus->sc_ccbs, M_DEVBUF);
+ free(scbus->sc_ccbs, M_DEVBUF, 0);
scbus->sc_ccbs = NULL;
}
}
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index a6ffba7f70d..042c3e7b208 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.333 2014/07/12 07:39:11 blambert Exp $ */
+/* $OpenBSD: softraid.c,v 1.334 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -523,7 +523,7 @@ sr_meta_clear(struct sr_discipline *sd)
bzero(sd->sd_meta, SR_META_SIZE * 512);
- free(m, M_DEVBUF);
+ free(m, M_DEVBUF, 0);
rv = 0;
done:
return (rv);
@@ -726,7 +726,7 @@ restart:
wu.swu_dis = sd;
sd->sd_scsi_sync(&wu);
}
- free(m, M_DEVBUF);
+ free(m, M_DEVBUF, 0);
return (0);
bad:
return (1);
@@ -797,9 +797,9 @@ sr_meta_read(struct sr_discipline *sd)
cp++;
}
- free(sm, M_DEVBUF);
+ free(sm, M_DEVBUF, 0);
if (fm)
- free(fm, M_DEVBUF);
+ free(fm, M_DEVBUF, 0);
done:
DNPRINTF(SR_D_META, "%s: sr_meta_read found %d parts\n", DEVNAME(sc),
@@ -1129,9 +1129,9 @@ sr_meta_native_bootprobe(struct sr_softc *sc, dev_t devno,
done:
if (fake_sd)
- free(fake_sd, M_DEVBUF);
+ free(fake_sd, M_DEVBUF, 0);
if (md)
- free(md, M_DEVBUF);
+ free(md, M_DEVBUF, 0);
return (rv);
}
@@ -1467,36 +1467,36 @@ unwind:
bc1 != SLIST_END(&bv1->sbv_chunks); bc1 = bc2) {
bc2 = SLIST_NEXT(bc1, sbc_link);
if (bc1->sbc_metadata)
- free(bc1->sbc_metadata, M_DEVBUF);
- free(bc1, M_DEVBUF);
+ free(bc1->sbc_metadata, M_DEVBUF, 0);
+ free(bc1, M_DEVBUF, 0);
}
- free(bv1, M_DEVBUF);
+ free(bv1, M_DEVBUF, 0);
}
/* Free keydisks chunks. */
for (bc1 = SLIST_FIRST(&kdh); bc1 != SLIST_END(&kdh); bc1 = bc2) {
bc2 = SLIST_NEXT(bc1, sbc_link);
if (bc1->sbc_metadata)
- free(bc1->sbc_metadata, M_DEVBUF);
- free(bc1, M_DEVBUF);
+ free(bc1->sbc_metadata, M_DEVBUF, 0);
+ free(bc1, M_DEVBUF, 0);
}
/* Free unallocated chunks. */
for (bc1 = SLIST_FIRST(&bch); bc1 != SLIST_END(&bch); bc1 = bc2) {
bc2 = SLIST_NEXT(bc1, sbc_link);
if (bc1->sbc_metadata)
- free(bc1->sbc_metadata, M_DEVBUF);
- free(bc1, M_DEVBUF);
+ free(bc1->sbc_metadata, M_DEVBUF, 0);
+ free(bc1, M_DEVBUF, 0);
}
while (!SLIST_EMPTY(&sdklist)) {
sdk = SLIST_FIRST(&sdklist);
SLIST_REMOVE_HEAD(&sdklist, sdk_link);
- free(sdk, M_DEVBUF);
+ free(sdk, M_DEVBUF, 0);
}
if (devs)
- free(devs, M_DEVBUF);
+ free(devs, M_DEVBUF, 0);
if (ondisk)
- free(ondisk, M_DEVBUF);
+ free(ondisk, M_DEVBUF, 0);
return (rv);
}
@@ -1693,7 +1693,7 @@ sr_meta_native_attach(struct sr_discipline *sd, int force)
rv = 0;
bad:
if (md)
- free(md, M_DEVBUF);
+ free(md, M_DEVBUF, 0);
return (rv);
}
@@ -1758,7 +1758,7 @@ sr_hotplug_unregister(struct sr_discipline *sd, void *func)
if (mhe->sh_hotplug == func) {
SLIST_REMOVE(&sr_hotplug_callbacks, mhe,
sr_hotplug_list, shl_link);
- free(mhe, M_DEVBUF);
+ free(mhe, M_DEVBUF, 0);
if (SLIST_EMPTY(&sr_hotplug_callbacks))
SLIST_INIT(&sr_hotplug_callbacks);
return;
@@ -1963,7 +1963,7 @@ sr_ccb_free(struct sr_discipline *sd)
TAILQ_REMOVE(&sd->sd_ccb_freeq, ccb, ccb_link);
if (sd->sd_ccb)
- free(sd->sd_ccb, M_DEVBUF);
+ free(sd->sd_ccb, M_DEVBUF, 0);
}
struct sr_ccb *
@@ -2142,7 +2142,7 @@ sr_wu_free(struct sr_discipline *sd)
while ((wu = TAILQ_FIRST(&sd->sd_wu)) != NULL) {
TAILQ_REMOVE(&sd->sd_wu, wu, swu_next);
- free(wu, M_DEVBUF);
+ free(wu, M_DEVBUF, 0);
}
}
@@ -2962,15 +2962,15 @@ sr_hotspare(struct sr_softc *sc, dev_t dev)
fail:
if (hotspare)
- free(hotspare, M_DEVBUF);
+ free(hotspare, M_DEVBUF, 0);
done:
if (sd && sd->sd_vol.sv_chunks)
- free(sd->sd_vol.sv_chunks, M_DEVBUF);
+ free(sd->sd_vol.sv_chunks, M_DEVBUF, 0);
if (sd)
- free(sd, M_DEVBUF);
+ free(sd, M_DEVBUF, 0);
if (sm)
- free(sm, M_DEVBUF);
+ free(sm, M_DEVBUF, 0);
if (open) {
VOP_CLOSE(vn, FREAD | FWRITE, NOCRED, curproc);
vput(vn);
@@ -3076,7 +3076,7 @@ sr_hotspare_rebuild(struct sr_discipline *sd)
/* Remove hotspare from available list. */
sc->sc_hotspare_no--;
SLIST_REMOVE(cl, hotspare, sr_chunk, src_link);
- free(hotspare, M_DEVBUF);
+ free(hotspare, M_DEVBUF, 0);
}
rw_exit_write(&sc->sc_lock);
@@ -3342,7 +3342,7 @@ sr_ioctl_createraid(struct sr_softc *sc, struct bioc_createraid *bc,
&sd->sd_meta->ssdi.ssd_uuid);
sr_error(sc, "disk %s is currently in use; "
"cannot force create", uuid);
- free(uuid, M_DEVBUF);
+ free(uuid, M_DEVBUF, 0);
goto unwind;
}
@@ -3399,7 +3399,7 @@ sr_ioctl_createraid(struct sr_softc *sc, struct bioc_createraid *bc,
if (sr_already_assembled(sd)) {
uuid = sr_uuid_format(&sd->sd_meta->ssdi.ssd_uuid);
sr_error(sc, "disk %s already assembled", uuid);
- free(uuid, M_DEVBUF);
+ free(uuid, M_DEVBUF, 0);
goto unwind;
}
@@ -3758,9 +3758,9 @@ sr_ioctl_installboot(struct sr_softc *sc, struct bioc_installboot *bb)
done:
if (bootblk)
- free(bootblk, M_DEVBUF);
+ free(bootblk, M_DEVBUF, 0);
if (bootldr)
- free(bootldr, M_DEVBUF);
+ free(bootldr, M_DEVBUF, 0);
return (rv);
}
@@ -3793,7 +3793,7 @@ sr_chunks_unwind(struct sr_softc *sc, struct sr_chunk_head *cl)
curproc);
vput(ch_entry->src_vn);
}
- free(ch_entry, M_DEVBUF);
+ free(ch_entry, M_DEVBUF, 0);
}
SLIST_INIT(cl);
}
@@ -3817,18 +3817,18 @@ sr_discipline_free(struct sr_discipline *sd)
if (sd->sd_free_resources)
sd->sd_free_resources(sd);
if (sd->sd_vol.sv_chunks)
- free(sd->sd_vol.sv_chunks, M_DEVBUF);
+ free(sd->sd_vol.sv_chunks, M_DEVBUF, 0);
if (sd->sd_meta)
- free(sd->sd_meta, M_DEVBUF);
+ free(sd->sd_meta, M_DEVBUF, 0);
if (sd->sd_meta_foreign)
- free(sd->sd_meta_foreign, M_DEVBUF);
+ free(sd->sd_meta_foreign, M_DEVBUF, 0);
som = &sd->sd_meta_opt;
for (omi = SLIST_FIRST(som); omi != SLIST_END(som); omi = omi_next) {
omi_next = SLIST_NEXT(omi, omi_link);
if (omi->omi_som)
- free(omi->omi_som, M_DEVBUF);
- free(omi, M_DEVBUF);
+ free(omi->omi_som, M_DEVBUF, 0);
+ free(omi, M_DEVBUF, 0);
}
if (sd->sd_target != 0) {
@@ -3844,7 +3844,7 @@ sr_discipline_free(struct sr_discipline *sd)
}
explicit_bzero(sd, sizeof *sd);
- free(sd, M_DEVBUF);
+ free(sd, M_DEVBUF, 0);
}
void
@@ -4458,7 +4458,7 @@ sr_uuid_print(struct sr_uuid *uuid, int cr)
uuidstr = sr_uuid_format(uuid);
printf("%s%s", uuidstr, (cr ? "\n" : ""));
- free(uuidstr, M_DEVBUF);
+ free(uuidstr, M_DEVBUF, 0);
}
int
diff --git a/sys/dev/softraid_aoe.c b/sys/dev/softraid_aoe.c
index 95a7cb805b2..423d6edf147 100644
--- a/sys/dev/softraid_aoe.c
+++ b/sys/dev/softraid_aoe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_aoe.c,v 1.36 2014/01/21 04:23:14 jsing Exp $ */
+/* $OpenBSD: softraid_aoe.c,v 1.37 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2008 Ted Unangst <tedu@openbsd.org>
* Copyright (c) 2008 Marco Peereboom <marco@openbsd.org>
@@ -215,7 +215,7 @@ sr_aoe_assemble(struct sr_discipline *sd, struct bioc_createraid *bc,
s = splnet();
TAILQ_REMOVE(&aoe_handlers, ah, next);
splx(s);
- free(ah, M_DEVBUF);
+ free(ah, M_DEVBUF, 0);
return rv;
}
#endif
@@ -268,11 +268,11 @@ sr_aoe_free_resources(struct sr_discipline *sd)
s = splnet();
TAILQ_REMOVE(&aoe_handlers, ah, next);
splx(s);
- free(ah, M_DEVBUF);
+ free(ah, M_DEVBUF, 0);
}
if (sd->sd_meta)
- free(sd->sd_meta, M_DEVBUF);
+ free(sd->sd_meta, M_DEVBUF, 0);
sr_wu_free(sd);
sr_ccb_free(sd);
@@ -328,7 +328,7 @@ sr_send_aoe_chunk(struct sr_workunit *wu, daddr_t blk, int i)
s = splbio();
TAILQ_REMOVE(&ah->reqs, ar, next);
splx(s);
- free(ar, M_DEVBUF);
+ free(ar, M_DEVBUF, 0);
return ENOMEM;
}
@@ -370,7 +370,7 @@ sr_send_aoe_chunk(struct sr_workunit *wu, daddr_t blk, int i)
s = splbio();
TAILQ_REMOVE(&ah->reqs, ar, next);
splx(s);
- free(ar, M_DEVBUF);
+ free(ar, M_DEVBUF, 0);
}
return rv;
@@ -498,7 +498,7 @@ sr_aoe_request_done(struct aoe_req *ar, struct aoe_packet *ap)
}
splx(s);
- free(ar, M_DEVBUF);
+ free(ar, M_DEVBUF, 0);
}
void
@@ -650,7 +650,7 @@ sr_aoe_server_free_resources(struct sr_discipline *sd)
s = splnet();
if (sd->mds.mdd_aoe.sra_ah) {
TAILQ_REMOVE(&aoe_handlers, sd->mds.mdd_aoe.sra_ah, next);
- free(sd->mds.mdd_aoe.sra_ah, M_DEVBUF);
+ free(sd->mds.mdd_aoe.sra_ah, M_DEVBUF, 0);
}
splx(s);
diff --git a/sys/dev/softraid_crypto.c b/sys/dev/softraid_crypto.c
index d33390cac72..3d7a6368bdf 100644
--- a/sys/dev/softraid_crypto.c
+++ b/sys/dev/softraid_crypto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_crypto.c,v 1.109 2014/01/22 01:46:08 jsing Exp $ */
+/* $OpenBSD: softraid_crypto.c,v 1.110 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Hans-Joerg Hoexer <hshoexer@openbsd.org>
@@ -357,7 +357,7 @@ sr_crypto_get_kdf(struct bioc_createraid *bc, struct sr_discipline *sd)
rv = 0;
out:
explicit_bzero(kdfinfo, bc->bc_opaque_size);
- free(kdfinfo, M_DEVBUF);
+ free(kdfinfo, M_DEVBUF, 0);
return (rv);
}
@@ -591,7 +591,7 @@ sr_crypto_change_maskkey(struct sr_discipline *sd,
out:
if (p) {
explicit_bzero(p, ksz);
- free(p, M_DEVBUF);
+ free(p, M_DEVBUF, 0);
}
explicit_bzero(check_digest, sizeof(check_digest));
@@ -753,18 +753,18 @@ sr_crypto_create_key_disk(struct sr_discipline *sd, dev_t dev)
fail:
if (key_disk)
- free(key_disk, M_DEVBUF);
+ free(key_disk, M_DEVBUF, 0);
key_disk = NULL;
done:
if (omi)
- free(omi, M_DEVBUF);
+ free(omi, M_DEVBUF, 0);
if (fakesd && fakesd->sd_vol.sv_chunks)
- free(fakesd->sd_vol.sv_chunks, M_DEVBUF);
+ free(fakesd->sd_vol.sv_chunks, M_DEVBUF, 0);
if (fakesd)
- free(fakesd, M_DEVBUF);
+ free(fakesd, M_DEVBUF, 0);
if (sm)
- free(sm, M_DEVBUF);
+ free(sm, M_DEVBUF, 0);
if (open) {
VOP_CLOSE(vn, FREAD | FWRITE, NOCRED, curproc);
vput(vn);
@@ -890,12 +890,12 @@ done:
for (omi = SLIST_FIRST(&som); omi != SLIST_END(&som); omi = omi_next) {
omi_next = SLIST_NEXT(omi, omi_link);
if (omi->omi_som)
- free(omi->omi_som, M_DEVBUF);
- free(omi, M_DEVBUF);
+ free(omi->omi_som, M_DEVBUF, 0);
+ free(omi, M_DEVBUF, 0);
}
if (sm)
- free(sm, M_DEVBUF);
+ free(sm, M_DEVBUF, 0);
if (vn && open) {
VOP_CLOSE(vn, FREAD, NOCRED, curproc);
@@ -1002,7 +1002,7 @@ sr_crypto_free_resources(struct sr_discipline *sd)
if (sd->mds.mdd_crypto.key_disk != NULL) {
explicit_bzero(sd->mds.mdd_crypto.key_disk, sizeof
sd->mds.mdd_crypto.key_disk);
- free(sd->mds.mdd_crypto.key_disk, M_DEVBUF);
+ free(sd->mds.mdd_crypto.key_disk, M_DEVBUF, 0);
}
sr_hotplug_unregister(sd, sr_crypto_hotplug);
diff --git a/sys/dev/softraid_raid6.c b/sys/dev/softraid_raid6.c
index ba84873e757..b188164b015 100644
--- a/sys/dev/softraid_raid6.c
+++ b/sys/dev/softraid_raid6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raid6.c,v 1.61 2014/01/22 05:11:36 jsing Exp $ */
+/* $OpenBSD: softraid_raid6.c,v 1.62 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org>
@@ -684,7 +684,7 @@ sr_raid6_intr(struct buf *bp)
/* Calculate q-parity */
sr_raid6_xorq(pq->qbuf, ccb->ccb_buf.b_data,
ccb->ccb_buf.b_bcount, pq->gn);
- free(pq, M_DEVBUF);
+ free(pq, M_DEVBUF, 0);
ccb->ccb_opaque = NULL;
}
diff --git a/sys/dev/systrace.c b/sys/dev/systrace.c
index ab9c0e6e0ae..67f83d9fc26 100644
--- a/sys/dev/systrace.c
+++ b/sys/dev/systrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: systrace.c,v 1.69 2014/06/17 03:49:03 guenther Exp $ */
+/* $OpenBSD: systrace.c,v 1.70 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -458,7 +458,7 @@ systracef_close(struct file *fp, struct proc *p)
vrele(fst->fd_rdir);
rw_exit_write(&fst->lock);
- free(fp->f_data, M_XDATA);
+ free(fp->f_data, M_XDATA, 0);
fp->f_data = NULL;
return (0);
@@ -511,7 +511,7 @@ systraceioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
error = falloc(p, &f, &fd);
fdpunlock(p->p_fd);
if (error) {
- free(fst, M_XDATA);
+ free(fst, M_XDATA, 0);
return (error);
}
f->f_flag = FREAD | FWRITE;
@@ -929,7 +929,7 @@ systrace_inject(struct str_process *strp, int docopy)
if (!ret && docopy &&
copyout(inject->kaddr, inject->uaddr, inject->len))
ret = EINVAL;
- free(inject->kaddr, M_XDATA);
+ free(inject->kaddr, M_XDATA, 0);
}
strp->injectind = 0;
@@ -958,7 +958,7 @@ systrace_prepinject(struct str_process *strp, struct systrace_inject *inj)
kaddr = malloc(inj->stri_len, M_XDATA, M_WAITOK);
ret = copyin(inj->stri_addr, kaddr, inj->stri_len);
if (ret) {
- free(kaddr, M_XDATA);
+ free(kaddr, M_XDATA, 0);
return (ret);
}
@@ -1322,7 +1322,7 @@ systrace_preprepl(struct str_process *strp, struct systrace_replace *repl)
return (ret);
if (strp->replace != NULL) {
- free(strp->replace, M_XDATA);
+ free(strp->replace, M_XDATA, 0);
strp->replace = NULL;
}
@@ -1358,7 +1358,7 @@ systrace_preprepl(struct str_process *strp, struct systrace_replace *repl)
memcpy(strp->replace, repl, sizeof(struct systrace_replace));
ret = copyin(repl->strr_base, strp->replace + 1, len);
if (ret) {
- free(strp->replace, M_XDATA);
+ free(strp->replace, M_XDATA, 0);
strp->replace = NULL;
return (ret);
}
@@ -1437,7 +1437,7 @@ void
systrace_replacefree(struct str_process *strp)
{
if (strp->replace != NULL) {
- free(strp->replace, M_XDATA);
+ free(strp->replace, M_XDATA, 0);
strp->replace = NULL;
}
while (strp->nfname > 0) {
@@ -1585,7 +1585,7 @@ systrace_closepolicy(struct fsystrace *fst, struct str_policy *policy)
fst->npolicies--;
if (policy->nsysent)
- free(policy->sysent, M_XDATA);
+ free(policy->sysent, M_XDATA, 0);
TAILQ_REMOVE(&fst->policies, policy, next);
diff --git a/sys/dev/tc/bba.c b/sys/dev/tc/bba.c
index 2b234462cd9..e1d0373c8cf 100644
--- a/sys/dev/tc/bba.c
+++ b/sys/dev/tc/bba.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bba.c,v 1.3 2013/05/15 08:29:26 ratchov Exp $ */
+/* $OpenBSD: bba.c,v 1.4 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: bba.c,v 1.38 2011/06/04 01:27:57 tsutsui Exp $ */
/*
* Copyright (c) 2011 Miodrag Vallat.
@@ -358,7 +358,7 @@ bba_freem(void *v, void *ptr, int mtype)
seg.ds_addr = m->addr;
seg.ds_len = m->size;
bus_dmamem_free(sc->sc_dmat, &seg, 1);
- free(m, mtype);
+ free(m, mtype, 0);
}
size_t
diff --git a/sys/dev/usb/ezload.c b/sys/dev/usb/ezload.c
index 84ee1efa03f..ec30279fed8 100644
--- a/sys/dev/usb/ezload.c
+++ b/sys/dev/usb/ezload.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ezload.c,v 1.12 2013/04/15 09:23:01 mglocker Exp $ */
+/* $OpenBSD: ezload.c,v 1.13 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: ezload.c,v 1.5 2002/07/11 21:14:25 augustss Exp $ */
/*
@@ -164,7 +164,7 @@ ezload_downloads_and_reset(struct usbd_device *dev, char **names)
return (error);
err = ezload_download(dev, *names, buf, buflen);
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
if (err)
return (err);
names++;
diff --git a/sys/dev/usb/hid.c b/sys/dev/usb/hid.c
index 12c6111a22a..bae5cb23720 100644
--- a/sys/dev/usb/hid.c
+++ b/sys/dev/usb/hid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hid.c,v 1.27 2014/05/18 21:43:11 jca Exp $ */
+/* $OpenBSD: hid.c,v 1.28 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: hid.c,v 1.23 2002/07/11 21:14:25 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/hid.c,v 1.11 1999/11/17 22:33:39 n_hibma Exp $ */
@@ -160,7 +160,7 @@ hid_end_parse(struct hid_data *s)
if (s == NULL)
return;
- free(s, M_TEMP);
+ free(s, M_TEMP, 0);
}
static uint8_t
diff --git a/sys/dev/usb/hidkbd.c b/sys/dev/usb/hidkbd.c
index d060bbbbfa4..a8fd748e803 100644
--- a/sys/dev/usb/hidkbd.c
+++ b/sys/dev/usb/hidkbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hidkbd.c,v 1.12 2014/05/12 09:50:44 mpi Exp $ */
+/* $OpenBSD: hidkbd.c,v 1.13 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: ukbd.c,v 1.85 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -249,7 +249,7 @@ hidkbd_detach(struct hidkbd *kbd, int flags)
rv = config_detach(kbd->sc_wskbddev, flags);
if (kbd->sc_var != NULL)
- free(kbd->sc_var, M_DEVBUF);
+ free(kbd->sc_var, M_DEVBUF, 0);
return (rv);
}
diff --git a/sys/dev/usb/if_athn_usb.c b/sys/dev/usb/if_athn_usb.c
index 67f1dd12fe9..26cd14ce98b 100644
--- a/sys/dev/usb/if_athn_usb.c
+++ b/sys/dev/usb/if_athn_usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_athn_usb.c,v 1.20 2014/07/12 07:59:23 mpi Exp $ */
+/* $OpenBSD: if_athn_usb.c,v 1.21 2014/07/12 18:48:52 tedu Exp $ */
/*-
* Copyright (c) 2011 Damien Bergamini <damien.bergamini@free.fr>
@@ -447,7 +447,7 @@ athn_usb_close_pipes(struct athn_usb_softc *usc)
usbd_close_pipe(usc->rx_intr_pipe);
}
if (usc->ibuf != NULL)
- free(usc->ibuf, M_USBDEV);
+ free(usc->ibuf, M_USBDEV, 0);
}
int
@@ -664,14 +664,14 @@ athn_usb_load_firmware(struct athn_usb_softc *usc)
USETW(req.wLength, mlen);
error = usbd_do_request(usc->sc_udev, &req, ptr);
if (error != 0) {
- free(fw, M_DEVBUF);
+ free(fw, M_DEVBUF, 0);
return (error);
}
addr += mlen >> 8;
ptr += mlen;
size -= mlen;
}
- free(fw, M_DEVBUF);
+ free(fw, M_DEVBUF, 0);
/* Start firmware. */
if (usc->flags & ATHN_USB_FLAG_AR7010)
diff --git a/sys/dev/usb/if_atu.c b/sys/dev/usb/if_atu.c
index dad17a87a72..66c9491406a 100644
--- a/sys/dev/usb/if_atu.c
+++ b/sys/dev/usb/if_atu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_atu.c,v 1.107 2014/07/12 07:59:23 mpi Exp $ */
+/* $OpenBSD: if_atu.c,v 1.108 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2003, 2004
* Daan Vreeken <Danovitsch@Vitsch.net>. All rights reserved.
@@ -908,7 +908,7 @@ atu_internal_firmware(void *arg)
if (err) {
DPRINTF(("%s: dfu_getstatus failed!\n",
sc->atu_dev.dv_xname));
- free(firm, M_DEVBUF);
+ free(firm, M_DEVBUF, 0);
goto fail;
}
/* success means state => DnLoadIdle */
@@ -930,7 +930,7 @@ atu_internal_firmware(void *arg)
if (err) {
DPRINTF(("%s: dfu_dnload failed\n",
sc->atu_dev.dv_xname));
- free(firm, M_DEVBUF);
+ free(firm, M_DEVBUF, 0);
goto fail;
}
@@ -949,7 +949,7 @@ atu_internal_firmware(void *arg)
state = atu_get_dfu_state(sc);
}
- free(firm, M_DEVBUF);
+ free(firm, M_DEVBUF, 0);
if (state != DFUState_ManifestSync) {
DPRINTF(("%s: state != manifestsync... eek!\n",
@@ -1021,7 +1021,7 @@ atu_external_firmware(void *arg)
if (err) {
DPRINTF(("%s: could not load external firmware "
"block\n", sc->atu_dev.dv_xname));
- free(firm, M_DEVBUF);
+ free(firm, M_DEVBUF, 0);
return;
}
@@ -1029,7 +1029,7 @@ atu_external_firmware(void *arg)
block++;
bytes_left -= block_size;
}
- free(firm, M_DEVBUF);
+ free(firm, M_DEVBUF, 0);
err = atu_usb_request(sc, UT_WRITE_VENDOR_DEVICE, 0x0e, 0x0802,
block, 0, NULL);
diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c
index 635f14959b3..b902d61de3d 100644
--- a/sys/dev/usb/if_kue.c
+++ b/sys/dev/usb/if_kue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_kue.c,v 1.72 2014/07/12 07:59:23 mpi Exp $ */
+/* $OpenBSD: if_kue.c,v 1.73 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: if_kue.c,v 1.50 2002/07/16 22:00:31 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -275,7 +275,7 @@ kue_load_fw(struct kue_softc *sc)
if (err) {
printf("%s: failed to load code segment: %s\n",
sc->kue_dev.dv_xname, usbd_errstr(err));
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return (EIO);
}
@@ -287,7 +287,7 @@ kue_load_fw(struct kue_softc *sc)
if (err) {
printf("%s: failed to load fixup segment: %s\n",
sc->kue_dev.dv_xname, usbd_errstr(err));
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return (EIO);
}
@@ -300,10 +300,10 @@ kue_load_fw(struct kue_softc *sc)
if (err) {
printf("%s: failed to load trigger segment: %s\n",
sc->kue_dev.dv_xname, usbd_errstr(err));
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return (EIO);
}
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
usbd_delay_ms(sc->kue_udev, 10);
@@ -551,7 +551,7 @@ kue_detach(struct device *self, int flags)
s = splusb(); /* XXX why? */
if (sc->kue_mcfilters != NULL) {
- free(sc->kue_mcfilters, M_USBDEV);
+ free(sc->kue_mcfilters, M_USBDEV, 0);
sc->kue_mcfilters = NULL;
}
diff --git a/sys/dev/usb/if_otus.c b/sys/dev/usb/if_otus.c
index 44788fe9bf0..5d6cf8e1fd1 100644
--- a/sys/dev/usb/if_otus.c
+++ b/sys/dev/usb/if_otus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_otus.c,v 1.40 2014/07/12 07:59:23 mpi Exp $ */
+/* $OpenBSD: if_otus.c,v 1.41 2014/07/12 18:48:52 tedu Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -459,7 +459,7 @@ otus_load_firmware(struct otus_softc *sc, const char *name, uint32_t addr)
ptr += mlen;
size -= mlen;
}
- free(fw, M_DEVBUF);
+ free(fw, M_DEVBUF, 0);
return error;
}
@@ -571,7 +571,7 @@ otus_close_pipes(struct otus_softc *sc)
usbd_close_pipe(sc->cmd_rx_pipe);
}
if (sc->ibuf != NULL)
- free(sc->ibuf, M_USBDEV);
+ free(sc->ibuf, M_USBDEV, 0);
if (sc->data_tx_pipe != NULL)
usbd_close_pipe(sc->data_tx_pipe);
if (sc->cmd_tx_pipe != NULL)
diff --git a/sys/dev/usb/if_rsu.c b/sys/dev/usb/if_rsu.c
index d5f5c30ea6e..54bf9f537f4 100644
--- a/sys/dev/usb/if_rsu.c
+++ b/sys/dev/usb/if_rsu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rsu.c,v 1.20 2014/07/12 07:59:23 mpi Exp $ */
+/* $OpenBSD: if_rsu.c,v 1.21 2014/07/12 18:48:52 tedu Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -2171,7 +2171,7 @@ rsu_load_firmware(struct rsu_softc *sc)
goto fail;
}
fail:
- free(fw, M_DEVBUF);
+ free(fw, M_DEVBUF, 0);
return (error);
}
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c
index 53dfb0bda9c..549d3d4c04a 100644
--- a/sys/dev/usb/if_rum.c
+++ b/sys/dev/usb/if_rum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rum.c,v 1.104 2014/07/12 07:59:23 mpi Exp $ */
+/* $OpenBSD: if_rum.c,v 1.105 2014/07/12 18:48:52 tedu Exp $ */
/*-
* Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini@free.fr>
@@ -259,7 +259,7 @@ rum_attachhook(void *xsc)
sc->sc_dev.dv_xname);
}
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
}
void
diff --git a/sys/dev/usb/if_run.c b/sys/dev/usb/if_run.c
index 7d4f81496f0..dcefd38cd69 100644
--- a/sys/dev/usb/if_run.c
+++ b/sys/dev/usb/if_run.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_run.c,v 1.101 2014/07/12 07:59:23 mpi Exp $ */
+/* $OpenBSD: if_run.c,v 1.102 2014/07/12 18:48:52 tedu Exp $ */
/*-
* Copyright (c) 2008-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -860,14 +860,14 @@ run_load_microcode(struct run_softc *sc)
if (size != 4096) {
printf("%s: invalid firmware size (should be 4KB)\n",
sc->sc_dev.dv_xname);
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
return EINVAL;
}
run_read(sc, RT2860_ASIC_VER_ID, &tmp);
/* write microcode image */
run_write_region_1(sc, RT2870_FW_BASE, ucode, size);
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
run_write(sc, RT2860_H2M_MAILBOX_CID, 0xffffffff);
run_write(sc, RT2860_H2M_MAILBOX_STATUS, 0xffffffff);
diff --git a/sys/dev/usb/if_uath.c b/sys/dev/usb/if_uath.c
index fd8c22e7925..b3a5547bd5c 100644
--- a/sys/dev/usb/if_uath.c
+++ b/sys/dev/usb/if_uath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_uath.c,v 1.59 2014/07/12 07:59:23 mpi Exp $ */
+/* $OpenBSD: if_uath.c,v 1.60 2014/07/12 18:48:52 tedu Exp $ */
/*-
* Copyright (c) 2006
@@ -217,7 +217,7 @@ uath_attachhook(void *xsc)
}
error = uath_loadfirmware(sc, fw, size);
- free(fw, M_DEVBUF);
+ free(fw, M_DEVBUF, 0);
if (error == 0) {
usb_port_status_t status;
diff --git a/sys/dev/usb/if_upgt.c b/sys/dev/usb/if_upgt.c
index e418924b412..8da85504011 100644
--- a/sys/dev/usb/if_upgt.c
+++ b/sys/dev/usb/if_upgt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_upgt.c,v 1.62 2014/07/12 07:59:23 mpi Exp $ */
+/* $OpenBSD: if_upgt.c,v 1.63 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org>
@@ -628,7 +628,7 @@ void
upgt_fw_free(struct upgt_softc *sc)
{
if (sc->sc_fw != NULL) {
- free(sc->sc_fw, M_DEVBUF);
+ free(sc->sc_fw, M_DEVBUF, 0);
sc->sc_fw = NULL;
DPRINTF(1, "%s: firmware freed\n", sc->sc_dev.dv_xname);
}
diff --git a/sys/dev/usb/if_urndis.c b/sys/dev/usb/if_urndis.c
index 9cc6d7e1017..d142364aa44 100644
--- a/sys/dev/usb/if_urndis.c
+++ b/sys/dev/usb/if_urndis.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urndis.c,v 1.47 2014/07/12 07:59:23 mpi Exp $ */
+/* $OpenBSD: if_urndis.c,v 1.48 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2010 Jonathan Armani <armani@openbsd.org>
@@ -186,7 +186,7 @@ urndis_ctrl_recv(struct urndis_softc *sc)
if (err != USBD_NORMAL_COMPLETION && err != USBD_SHORT_XFER) {
printf("%s: %s\n", DEVNAME(sc), usbd_errstr(err));
- free(buf, M_TEMP);
+ free(buf, M_TEMP, 0);
return NULL;
}
@@ -201,7 +201,7 @@ urndis_ctrl_recv(struct urndis_softc *sc)
DEVNAME(sc),
letoh32(hdr->rm_len),
RNDIS_RESPONSE_LEN);
- free(buf, M_TEMP);
+ free(buf, M_TEMP, 0);
return NULL;
}
@@ -245,7 +245,7 @@ urndis_ctrl_handle(struct urndis_softc *sc, struct urndis_comp_hdr *hdr,
rval = RNDIS_STATUS_FAILURE;
}
- free(hdr, M_TEMP);
+ free(hdr, M_TEMP, 0);
return rval;
}
@@ -436,7 +436,7 @@ urndis_ctrl_init(struct urndis_softc *sc)
letoh32(msg->rm_max_xfersz)));
rval = urndis_ctrl_send(sc, msg, sizeof(*msg));
- free(msg, M_TEMP);
+ free(msg, M_TEMP, 0);
if (rval != RNDIS_STATUS_SUCCESS) {
printf("%s: init failed\n", DEVNAME(sc));
@@ -475,7 +475,7 @@ urndis_ctrl_halt(struct urndis_softc *sc)
letoh32(msg->rm_rid)));
rval = urndis_ctrl_send(sc, msg, sizeof(*msg));
- free(msg, M_TEMP);
+ free(msg, M_TEMP, 0);
if (rval != RNDIS_STATUS_SUCCESS)
printf("%s: halt failed\n", DEVNAME(sc));
@@ -522,7 +522,7 @@ urndis_ctrl_query(struct urndis_softc *sc, u_int32_t oid,
letoh32(msg->rm_devicevchdl)));
rval = urndis_ctrl_send(sc, msg, sizeof(*msg));
- free(msg, M_TEMP);
+ free(msg, M_TEMP, 0);
if (rval != RNDIS_STATUS_SUCCESS) {
printf("%s: query failed\n", DEVNAME(sc));
@@ -575,7 +575,7 @@ urndis_ctrl_set(struct urndis_softc *sc, u_int32_t oid, void *buf, size_t len)
letoh32(msg->rm_devicevchdl)));
rval = urndis_ctrl_send(sc, msg, sizeof(*msg));
- free(msg, M_TEMP);
+ free(msg, M_TEMP, 0);
if (rval != RNDIS_STATUS_SUCCESS) {
printf("%s: set failed\n", DEVNAME(sc));
@@ -639,7 +639,7 @@ urndis_ctrl_set_param(struct urndis_softc *sc,
letoh32(param->rm_valuelen)));
rval = urndis_ctrl_set(sc, OID_GEN_RNDIS_CONFIG_PARAMETER, param, tlen);
- free(param, M_TEMP);
+ free(param, M_TEMP, 0);
if (rval != RNDIS_STATUS_SUCCESS)
printf("%s: set param failed 0x%x\n", DEVNAME(sc), rval);
@@ -672,7 +672,7 @@ urndis_ctrl_reset(struct urndis_softc *sc)
letoh32(reset->rm_rid)));
rval = urndis_ctrl_send(sc, reset, sizeof(*reset));
- free(reset, M_TEMP);
+ free(reset, M_TEMP, 0);
if (rval != RNDIS_STATUS_SUCCESS) {
printf("%s: reset failed\n", DEVNAME(sc));
@@ -712,7 +712,7 @@ urndis_ctrl_keepalive(struct urndis_softc *sc)
letoh32(keep->rm_rid)));
rval = urndis_ctrl_send(sc, keep, sizeof(*keep));
- free(keep, M_TEMP);
+ free(keep, M_TEMP, 0);
if (rval != RNDIS_STATUS_SUCCESS) {
printf("%s: keepalive failed\n", DEVNAME(sc));
@@ -1446,10 +1446,10 @@ urndis_attach(struct device *parent, struct device *self, void *aux)
if (bufsz == ETHER_ADDR_LEN) {
memcpy(eaddr, buf, ETHER_ADDR_LEN);
printf(", address %s\n", ether_sprintf(eaddr));
- free(buf, M_TEMP);
+ free(buf, M_TEMP, 0);
} else {
printf(", invalid address\n");
- free(buf, M_TEMP);
+ free(buf, M_TEMP, 0);
splx(s);
return;
}
diff --git a/sys/dev/usb/if_urtwn.c b/sys/dev/usb/if_urtwn.c
index a3c4c28ead0..a0c73240186 100644
--- a/sys/dev/usb/if_urtwn.c
+++ b/sys/dev/usb/if_urtwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urtwn.c,v 1.36 2014/07/12 07:59:23 mpi Exp $ */
+/* $OpenBSD: if_urtwn.c,v 1.37 2014/07/12 18:48:52 tedu Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -2277,7 +2277,7 @@ urtwn_load_firmware(struct urtwn_softc *sc)
goto fail;
}
fail:
- free(fw, M_DEVBUF);
+ free(fw, M_DEVBUF, 0);
return (error);
}
diff --git a/sys/dev/usb/if_wi_usb.c b/sys/dev/usb/if_wi_usb.c
index e1460c6be16..255879a5517 100644
--- a/sys/dev/usb/if_wi_usb.c
+++ b/sys/dev/usb/if_wi_usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi_usb.c,v 1.61 2014/07/12 07:59:23 mpi Exp $ */
+/* $OpenBSD: if_wi_usb.c,v 1.62 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2003 Dale Rahn. All rights reserved.
@@ -432,7 +432,7 @@ wi_usb_detach(struct device *self, int flags)
while (sc->wi_usb_nummem) {
sc->wi_usb_nummem--;
if (sc->wi_usb_txmem[sc->wi_usb_nummem] != NULL)
- free(sc->wi_usb_txmem[sc->wi_usb_nummem], M_DEVBUF);
+ free(sc->wi_usb_txmem[sc->wi_usb_nummem], M_DEVBUF, 0);
sc->wi_usb_txmem[sc->wi_usb_nummem] = NULL;
}
@@ -563,7 +563,7 @@ wi_cmd_usb(struct wi_softc *wsc, int cmd, int val0, int val1, int val2)
/* free alloc_nicmem regions */
while (sc->wi_usb_nummem) {
sc->wi_usb_nummem--;
- free(sc->wi_usb_txmem[sc->wi_usb_nummem], M_DEVBUF);
+ free(sc->wi_usb_txmem[sc->wi_usb_nummem], M_DEVBUF, 0);
sc->wi_usb_txmem[sc->wi_usb_nummem] = NULL;
}
diff --git a/sys/dev/usb/if_zyd.c b/sys/dev/usb/if_zyd.c
index e2245dc5f42..f2a00065096 100644
--- a/sys/dev/usb/if_zyd.c
+++ b/sys/dev/usb/if_zyd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_zyd.c,v 1.102 2014/07/12 15:26:54 stsp Exp $ */
+/* $OpenBSD: if_zyd.c,v 1.103 2014/07/12 18:48:52 tedu Exp $ */
/*-
* Copyright (c) 2006 by Damien Bergamini <damien.bergamini@free.fr>
@@ -270,7 +270,7 @@ zyd_attachhook(void *xsc)
}
error = zyd_loadfirmware(sc, fw, size);
- free(fw, M_DEVBUF);
+ free(fw, M_DEVBUF, 0);
if (error != 0) {
printf("%s: could not load firmware (error=%d)\n",
sc->sc_dev.dv_xname, error);
@@ -534,7 +534,7 @@ zyd_close_pipes(struct zyd_softc *sc)
}
}
if (sc->ibuf != NULL) {
- free(sc->ibuf, M_USBDEV);
+ free(sc->ibuf, M_USBDEV, 0);
sc->ibuf = NULL;
}
}
diff --git a/sys/dev/usb/uaudio.c b/sys/dev/usb/uaudio.c
index cc2a43e9aa5..23ba515feb8 100644
--- a/sys/dev/usb/uaudio.c
+++ b/sys/dev/usb/uaudio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uaudio.c,v 1.103 2014/06/04 08:01:25 ratchov Exp $ */
+/* $OpenBSD: uaudio.c,v 1.104 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: uaudio.c,v 1.90 2004/10/29 17:12:53 kent Exp $ */
/*
@@ -682,7 +682,7 @@ uaudio_mixer_add_ctl(struct uaudio_softc *sc, struct mixerctl *mc)
/* Copy old data, if there was any */
if (sc->sc_nctls != 0) {
bcopy(sc->sc_ctls, nmc, sizeof(*mc) * (sc->sc_nctls));
- free(sc->sc_ctls, M_USBDEV);
+ free(sc->sc_ctls, M_USBDEV, 0);
}
sc->sc_ctls = nmc;
@@ -1402,13 +1402,13 @@ uaudio_io_terminaltype(int outtype, struct io_terminal *iot, int id)
memcpy(tml, it->output, TERMINAL_LIST_SIZE(it->output->size));
tml->terminals[it->output->size] = outtype;
tml->size++;
- free(it->output, M_TEMP);
+ free(it->output, M_TEMP, 0);
it->output = tml;
if (it->inputs != NULL) {
for (i = 0; i < it->inputs_size; i++)
if (it->inputs[i] != NULL)
- free(it->inputs[i], M_TEMP);
- free(it->inputs, M_TEMP);
+ free(it->inputs[i], M_TEMP, 0);
+ free(it->inputs, M_TEMP, 0);
}
it->inputs_size = 0;
it->inputs = NULL;
@@ -1435,7 +1435,7 @@ uaudio_io_terminaltype(int outtype, struct io_terminal *iot, int id)
tml = malloc(TERMINAL_LIST_SIZE(1), M_TEMP, M_NOWAIT);
if (tml == NULL) {
printf("uaudio_io_terminaltype: no memory\n");
- free(it->inputs, M_TEMP);
+ free(it->inputs, M_TEMP, 0);
it->inputs = NULL;
return NULL;
}
@@ -1557,7 +1557,7 @@ uaudio_add_alt(struct uaudio_softc *sc, const struct as_info *ai)
/* Copy old data, if there was any */
if (sc->sc_nalts != 0) {
bcopy(sc->sc_alts, nai, sizeof(*ai) * (sc->sc_nalts));
- free(sc->sc_alts, M_USBDEV);
+ free(sc->sc_alts, M_USBDEV, 0);
}
sc->sc_alts = nai;
DPRINTFN(2,("uaudio_add_alt: adding alt=%d, enc=%d\n",
@@ -1973,7 +1973,7 @@ uaudio_identify_ac(struct uaudio_softc *sc, const usb_config_descriptor_t *cdesc
break;
dp = (const usb_descriptor_t *)ibuf;
if (ibuf + dp->bLength > ibufend) {
- free(iot, M_TEMP);
+ free(iot, M_TEMP, 0);
return (USBD_INVAL);
}
if (dp->bDescriptorType != UDESC_CS_INTERFACE) {
@@ -1998,7 +1998,7 @@ uaudio_identify_ac(struct uaudio_softc *sc, const usb_config_descriptor_t *cdesc
pot = iot[i].d.ot;
tml = uaudio_io_terminaltype(UGETW(pot->wTerminalType), iot, i);
if (tml != NULL)
- free(tml, M_TEMP);
+ free(tml, M_TEMP, 0);
}
#ifdef UAUDIO_DEBUG
@@ -2113,15 +2113,15 @@ uaudio_identify_ac(struct uaudio_softc *sc, const usb_config_descriptor_t *cdesc
if (iot[i].inputs != NULL) {
for (j = 0; j < iot[i].inputs_size; j++) {
if (iot[i].inputs[j] != NULL)
- free(iot[i].inputs[j], M_TEMP);
+ free(iot[i].inputs[j], M_TEMP, 0);
}
- free(iot[i].inputs, M_TEMP);
+ free(iot[i].inputs, M_TEMP, 0);
}
if (iot[i].output != NULL)
- free(iot[i].output, M_TEMP);
+ free(iot[i].output, M_TEMP, 0);
iot[i].d.desc = NULL;
}
- free(iot, M_TEMP);
+ free(iot, M_TEMP, 0);
return (USBD_NORMAL_COMPLETION);
}
diff --git a/sys/dev/usb/ubcmtp.c b/sys/dev/usb/ubcmtp.c
index 3b706d54512..e0ee7b085a7 100644
--- a/sys/dev/usb/ubcmtp.c
+++ b/sys/dev/usb/ubcmtp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubcmtp.c,v 1.5 2014/02/06 16:43:04 jcs Exp $ */
+/* $OpenBSD: ubcmtp.c,v 1.6 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2013-2014, joshua stein <jcs@openbsd.org>
@@ -538,11 +538,11 @@ ubcmtp_disable(void *v)
}
if (sc->tp_pkt != NULL) {
- free(sc->tp_pkt, M_USBDEV);
+ free(sc->tp_pkt, M_USBDEV, 0);
sc->tp_pkt = NULL;
}
if (sc->bt_pkt != NULL) {
- free(sc->bt_pkt, M_USBDEV);
+ free(sc->bt_pkt, M_USBDEV, 0);
sc->bt_pkt = NULL;
}
}
@@ -718,14 +718,14 @@ fail2:
usbd_close_pipe(sc->sc_tp_pipe);
}
if (sc->tp_pkt != NULL)
- free(sc->tp_pkt, M_USBDEV);
+ free(sc->tp_pkt, M_USBDEV, 0);
fail1:
if (sc->sc_bt_pipe != NULL) {
usbd_abort_pipe(sc->sc_bt_pipe);
usbd_close_pipe(sc->sc_bt_pipe);
}
if (sc->bt_pkt != NULL)
- free(sc->bt_pkt, M_USBDEV);
+ free(sc->bt_pkt, M_USBDEV, 0);
return (1);
}
diff --git a/sys/dev/usb/ubsa.c b/sys/dev/usb/ubsa.c
index a071565b264..fbce92dc083 100644
--- a/sys/dev/usb/ubsa.c
+++ b/sys/dev/usb/ubsa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsa.c,v 1.61 2014/03/07 18:39:02 mpi Exp $ */
+/* $OpenBSD: ubsa.c,v 1.62 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: ubsa.c,v 1.5 2002/11/25 00:51:33 fvdl Exp $ */
/*-
* Copyright (c) 2002, Alexander Kabaev <kan.FreeBSD.org>.
@@ -376,7 +376,7 @@ ubsa_detach(struct device *self, int flags)
if (sc->sc_intr_pipe != NULL) {
usbd_abort_pipe(sc->sc_intr_pipe);
usbd_close_pipe(sc->sc_intr_pipe);
- free(sc->sc_intr_buf, M_USBDEV);
+ free(sc->sc_intr_buf, M_USBDEV, 0);
sc->sc_intr_pipe = NULL;
}
@@ -647,7 +647,7 @@ ubsa_close(void *addr, int portno)
printf("%s: close interrupt pipe failed: %s\n",
sc->sc_dev.dv_xname,
usbd_errstr(err));
- free(sc->sc_intr_buf, M_USBDEV);
+ free(sc->sc_intr_buf, M_USBDEV, 0);
sc->sc_intr_pipe = NULL;
}
}
diff --git a/sys/dev/usb/uchcom.c b/sys/dev/usb/uchcom.c
index 502b920b3c5..c2c136fd380 100644
--- a/sys/dev/usb/uchcom.c
+++ b/sys/dev/usb/uchcom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uchcom.c,v 1.20 2014/05/16 14:05:39 sasano Exp $ */
+/* $OpenBSD: uchcom.c,v 1.21 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: uchcom.c,v 1.1 2007/09/03 17:57:37 tshiozak Exp $ */
/*
@@ -843,7 +843,7 @@ uchcom_close_intr_pipe(struct uchcom_softc *sc)
if (err)
printf("%s: close interrupt pipe failed: %s\n",
sc->sc_dev.dv_xname, usbd_errstr(err));
- free(sc->sc_intr_buf, M_USBDEV);
+ free(sc->sc_intr_buf, M_USBDEV, 0);
sc->sc_intr_pipe = NULL;
}
}
diff --git a/sys/dev/usb/ucycom.c b/sys/dev/usb/ucycom.c
index ca2beebe5d9..a1d7b07be7d 100644
--- a/sys/dev/usb/ucycom.c
+++ b/sys/dev/usb/ucycom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ucycom.c,v 1.27 2014/05/07 08:17:21 mpi Exp $ */
+/* $OpenBSD: ucycom.c,v 1.28 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: ucycom.c,v 1.3 2005/08/05 07:27:47 skrll Exp $ */
/*
@@ -301,11 +301,11 @@ ucycom_close(void *addr, int portno)
s = splusb();
if (sc->sc_obuf != NULL) {
- free(sc->sc_obuf, M_USBDEV);
+ free(sc->sc_obuf, M_USBDEV, 0);
sc->sc_obuf = NULL;
}
if (sc->sc_ibuf != NULL) {
- free(sc->sc_ibuf, M_USBDEV);
+ free(sc->sc_ibuf, M_USBDEV, 0);
sc->sc_ibuf = NULL;
}
splx(s);
diff --git a/sys/dev/usb/udl.c b/sys/dev/usb/udl.c
index c34ad7721f9..abe5400f833 100644
--- a/sys/dev/usb/udl.c
+++ b/sys/dev/usb/udl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udl.c,v 1.79 2013/12/06 21:03:05 deraadt Exp $ */
+/* $OpenBSD: udl.c,v 1.80 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org>
@@ -680,7 +680,7 @@ udl_free_screen(void *v, void *cookie)
/* free character backing store */
if (sc->sc_cbs != NULL)
- free(sc->sc_cbs, M_DEVBUF);
+ free(sc->sc_cbs, M_DEVBUF, 0);
sc->sc_nscreens--;
}
@@ -1429,7 +1429,7 @@ void
udl_free_huffman(struct udl_softc *sc)
{
if (sc->sc_huffman != NULL) {
- free(sc->sc_huffman, M_DEVBUF);
+ free(sc->sc_huffman, M_DEVBUF, 0);
sc->sc_huffman = NULL;
sc->sc_huffman_size = 0;
DPRINTF(1, "%s: huffman table freed\n", DN(sc));
@@ -1457,7 +1457,7 @@ void
udl_fbmem_free(struct udl_softc *sc)
{
if (sc->sc_fbmem != NULL) {
- free(sc->sc_fbmem, M_DEVBUF);
+ free(sc->sc_fbmem, M_DEVBUF, 0);
sc->sc_fbmem = NULL;
}
}
@@ -1528,7 +1528,7 @@ udl_cmd_free_buf(struct udl_softc *sc)
struct udl_cmd_buf *cb = &sc->sc_cmd_buf;
if (cb->buf != NULL) {
- free(cb->buf, M_DEVBUF);
+ free(cb->buf, M_DEVBUF, 0);
cb->buf = NULL;
}
cb->off = 0;
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index 80d4a5e4511..fdea5456cf2 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ugen.c,v 1.77 2014/07/11 08:45:29 mpi Exp $ */
+/* $OpenBSD: ugen.c,v 1.78 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: ugen.c,v 1.63 2002/11/26 18:49:48 christos Exp $ */
/* $FreeBSD: src/sys/dev/usb/ugen.c,v 1.26 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -331,7 +331,7 @@ ugenopen(dev_t dev, int flag, int mode, struct proc *p)
sce->ibuf, isize, ugenintr,
USBD_DEFAULT_INTERVAL);
if (err) {
- free(sce->ibuf, M_USBDEV);
+ free(sce->ibuf, M_USBDEV, 0);
clfree(&sce->q);
return (EIO);
}
@@ -358,7 +358,7 @@ ugenopen(dev_t dev, int flag, int mode, struct proc *p)
err = usbd_open_pipe(sce->iface,
edesc->bEndpointAddress, 0, &sce->pipeh);
if (err) {
- free(sce->ibuf, M_USBDEV);
+ free(sce->ibuf, M_USBDEV, 0);
return (EIO);
}
for(i = 0; i < UGEN_NISOREQS; ++i) {
@@ -452,7 +452,7 @@ ugenclose(dev_t dev, int flag, int mode, struct proc *p)
}
if (sce->ibuf != NULL) {
- free(sce->ibuf, M_USBDEV);
+ free(sce->ibuf, M_USBDEV, 0);
sce->ibuf = NULL;
}
}
@@ -1064,12 +1064,12 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd,
return (EINVAL);
idesc = usbd_find_idesc(cdesc, ai->uai_interface_index, 0);
if (idesc == NULL) {
- free(cdesc, M_TEMP);
+ free(cdesc, M_TEMP, 0);
return (EINVAL);
}
ai->uai_alt_no = usbd_get_no_alts(cdesc,
idesc->bInterfaceNumber);
- free(cdesc, M_TEMP);
+ free(cdesc, M_TEMP, 0);
break;
case USB_GET_DEVICE_DESC:
*(usb_device_descriptor_t *)addr =
@@ -1081,7 +1081,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd,
if (cdesc == NULL)
return (EINVAL);
cd->ucd_desc = *cdesc;
- free(cdesc, M_TEMP);
+ free(cdesc, M_TEMP, 0);
break;
case USB_GET_INTERFACE_DESC:
id = (struct usb_interface_desc *)addr;
@@ -1095,11 +1095,11 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd,
alt = id->uid_alt_index;
idesc = usbd_find_idesc(cdesc, id->uid_interface_index, alt);
if (idesc == NULL) {
- free(cdesc, M_TEMP);
+ free(cdesc, M_TEMP, 0);
return (EINVAL);
}
id->uid_desc = *idesc;
- free(cdesc, M_TEMP);
+ free(cdesc, M_TEMP, 0);
break;
case USB_GET_ENDPOINT_DESC:
ed = (struct usb_endpoint_desc *)addr;
@@ -1114,11 +1114,11 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd,
edesc = usbd_find_edesc(cdesc, ed->ued_interface_index,
alt, ed->ued_endpoint_index);
if (edesc == NULL) {
- free(cdesc, M_TEMP);
+ free(cdesc, M_TEMP, 0);
return (EINVAL);
}
ed->ued_desc = *edesc;
- free(cdesc, M_TEMP);
+ free(cdesc, M_TEMP, 0);
break;
case USB_GET_FULL_DESC:
{
@@ -1143,7 +1143,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd,
uio.uio_rw = UIO_READ;
uio.uio_procp = p;
error = uiomove((void *)cdesc, len, &uio);
- free(cdesc, M_TEMP);
+ free(cdesc, M_TEMP, 0);
return (error);
}
case USB_GET_STRING_DESC:
@@ -1216,7 +1216,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd,
}
ret:
if (ptr)
- free(ptr, M_TEMP);
+ free(ptr, M_TEMP, 0);
return (error);
}
case USB_GET_DEVICEINFO:
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index 52e78531f7c..a2ca6f10226 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci.c,v 1.126 2014/07/10 20:57:40 mpi Exp $ */
+/* $OpenBSD: uhci.c,v 1.127 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: uhci.c,v 1.172 2003/02/23 04:19:26 simonb Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -1992,7 +1992,7 @@ uhci_device_intr_close(struct usbd_pipe *pipe)
for(i = 0; i < npoll; i++)
uhci_free_sqh(sc, upipe->u.intr.qhs[i]);
- free(upipe->u.intr.qhs, M_USBHC);
+ free(upipe->u.intr.qhs, M_USBHC, 0);
/* XXX free other resources */
}
@@ -2357,7 +2357,7 @@ uhci_device_isoc_close(struct usbd_pipe *pipe)
}
splx(s);
- free(iso->stds, M_USBHC);
+ free(iso->stds, M_USBHC, 0);
}
usbd_status
@@ -2411,7 +2411,7 @@ uhci_setup_isoc(struct usbd_pipe *pipe)
bad:
while (--i >= 0)
uhci_free_std(sc, iso->stds[i]);
- free(iso->stds, M_USBHC);
+ free(iso->stds, M_USBHC, 0);
return (USBD_NOMEM);
}
@@ -2641,7 +2641,7 @@ uhci_device_setintr(struct uhci_softc *sc, struct uhci_pipe *upipe, int ival)
if (sqh == NULL) {
while (i > 0)
uhci_free_sqh(sc, qhs[--i]);
- free(qhs, M_USBHC);
+ free(qhs, M_USBHC, 0);
return (USBD_NOMEM);
}
sqh->elink = NULL;
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c
index 51b3e89a8ba..429282c8f06 100644
--- a/sys/dev/usb/uhid.c
+++ b/sys/dev/usb/uhid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhid.c,v 1.57 2014/04/15 09:14:27 mpi Exp $ */
+/* $OpenBSD: uhid.c,v 1.58 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: uhid.c,v 1.57 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -247,7 +247,7 @@ uhidclose(dev_t dev, int flag, int mode, struct proc *p)
DPRINTF(("uhidclose: sc=%p\n", sc));
clfree(&sc->sc_q);
- free(sc->sc_obuf, M_USBDEV);
+ free(sc->sc_obuf, M_USBDEV, 0);
sc->sc_async = NULL;
uhidev_close(&sc->sc_hdev);
diff --git a/sys/dev/usb/uhidev.c b/sys/dev/usb/uhidev.c
index e2eb0c8f0f3..dde8ace2469 100644
--- a/sys/dev/usb/uhidev.c
+++ b/sys/dev/usb/uhidev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhidev.c,v 1.61 2014/07/10 08:56:40 mpi Exp $ */
+/* $OpenBSD: uhidev.c,v 1.62 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: uhidev.c,v 1.14 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -198,7 +198,7 @@ uhidev_attach(struct device *parent, struct device *self, void *aux)
if (usbd_get_report_descriptor(sc->sc_udev, sc->sc_ifaceno,
desc, size)) {
printf("%s: no report descriptor\n", DEVNAME(sc));
- free(desc, M_USBDEV);
+ free(desc, M_USBDEV, 0);
return;
}
}
@@ -391,7 +391,7 @@ uhidev_detach(struct device *self, int flags)
}
if (sc->sc_repdesc != NULL)
- free(sc->sc_repdesc, M_USBDEV);
+ free(sc->sc_repdesc, M_USBDEV, 0);
/*
* XXX Check if we have only one children claiming all the Report
@@ -559,7 +559,7 @@ out2:
usbd_close_pipe(sc->sc_ipipe);
out1:
DPRINTF(("uhidev_open: failed in someway"));
- free(sc->sc_ibuf, M_USBDEV);
+ free(sc->sc_ibuf, M_USBDEV, 0);
scd->sc_state &= ~UHIDEV_OPEN;
sc->sc_refcnt = 0;
sc->sc_ipipe = NULL;
@@ -620,7 +620,7 @@ uhidev_close(struct uhidev *scd)
}
if (sc->sc_ibuf != NULL) {
- free(sc->sc_ibuf, M_USBDEV);
+ free(sc->sc_ibuf, M_USBDEV, 0);
sc->sc_ibuf = NULL;
}
}
@@ -643,7 +643,7 @@ uhidev_set_report(struct uhidev *scd, int type, int id, void *data, int len)
retstat = usbd_set_report(sc->sc_udev, sc->sc_ifaceno, type,
id, buf, len + 1);
- free(buf, M_TEMP);
+ free(buf, M_TEMP, 0);
return retstat;
}
@@ -674,7 +674,7 @@ uhidev_set_report_async(struct uhidev *scd, int type, int id, void *data,
* the buffer right after submitting the transfer because
* it won't be used afterward.
*/
- free(buf, M_TEMP);
+ free(buf, M_TEMP, 0);
return retstat;
}
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index f8427849add..dde6dba4d41 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhub.c,v 1.68 2014/07/09 18:15:04 mpi Exp $ */
+/* $OpenBSD: uhub.c,v 1.69 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: uhub.c,v 1.64 2003/02/08 03:32:51 ichiro Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */
@@ -177,7 +177,7 @@ uhub_attach(struct device *parent, struct device *self, void *aux)
hub->ports = malloc(sizeof(struct usbd_port) * nports,
M_USBDEV, M_NOWAIT);
if (hub->ports == NULL) {
- free(hub, M_USBDEV);
+ free(hub, M_USBDEV, 0);
return;
}
dev->hub = hub;
@@ -302,11 +302,11 @@ uhub_attach(struct device *parent, struct device *self, void *aux)
bad:
if (sc->sc_statusbuf)
- free(sc->sc_statusbuf, M_USBDEV);
+ free(sc->sc_statusbuf, M_USBDEV, 0);
if (hub) {
if (hub->ports)
- free(hub->ports, M_USBDEV);
- free(hub, M_USBDEV);
+ free(hub->ports, M_USBDEV, 0);
+ free(hub, M_USBDEV, 0);
}
dev->hub = NULL;
}
@@ -496,12 +496,12 @@ uhub_detach(struct device *self, int flags)
}
if (hub->ports[0].tt)
- free(hub->ports[0].tt, M_USBDEV);
+ free(hub->ports[0].tt, M_USBDEV, 0);
if (sc->sc_statusbuf)
- free(sc->sc_statusbuf, M_USBDEV);
+ free(sc->sc_statusbuf, M_USBDEV, 0);
if (hub->ports)
- free(hub->ports, M_USBDEV);
- free(hub, M_USBDEV);
+ free(hub->ports, M_USBDEV, 0);
+ free(hub, M_USBDEV, 0);
sc->sc_hub->hub = NULL;
return (0);
diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c
index 00e6974c84e..81ae3d146a7 100644
--- a/sys/dev/usb/ulpt.c
+++ b/sys/dev/usb/ulpt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ulpt.c,v 1.45 2013/11/07 13:11:10 pirofti Exp $ */
+/* $OpenBSD: ulpt.c,v 1.46 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: ulpt.c,v 1.57 2003/01/05 10:19:42 scw Exp $ */
/* $FreeBSD: src/sys/dev/usb/ulpt.c,v 1.24 1999/11/17 22:33:44 n_hibma Exp $ */
@@ -726,7 +726,7 @@ close_pipe:
usbd_close_pipe(sc->sc_out_pipe);
sc->sc_out_pipe = NULL;
free_ucode:
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
return (error);
}
diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c
index 34d203b6afe..db62a364596 100644
--- a/sys/dev/usb/umass.c
+++ b/sys/dev/usb/umass.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umass.c,v 1.65 2013/11/06 14:37:31 pirofti Exp $ */
+/* $OpenBSD: umass.c,v 1.66 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: umass.c,v 1.116 2004/06/30 05:53:46 mycroft Exp $ */
/*
@@ -656,7 +656,7 @@ umass_detach(struct device *self, int flags)
if (scbus != NULL) {
if (scbus->sc_child != NULL)
rv = config_detach(scbus->sc_child, flags);
- free(scbus, M_DEVBUF);
+ free(scbus, M_DEVBUF, 0);
sc->bus = NULL;
}
diff --git a/sys/dev/usb/umct.c b/sys/dev/usb/umct.c
index 6fc031809c3..dac07953d91 100644
--- a/sys/dev/usb/umct.c
+++ b/sys/dev/usb/umct.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umct.c,v 1.39 2013/11/15 10:17:39 pirofti Exp $ */
+/* $OpenBSD: umct.c,v 1.40 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: umct.c,v 1.10 2003/02/23 04:20:07 simonb Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -315,7 +315,7 @@ umct_detach(struct device *self, int flags)
if (sc->sc_intr_pipe != NULL) {
usbd_abort_pipe(sc->sc_intr_pipe);
usbd_close_pipe(sc->sc_intr_pipe);
- free(sc->sc_intr_buf, M_USBDEV);
+ free(sc->sc_intr_buf, M_USBDEV, 0);
sc->sc_intr_pipe = NULL;
}
@@ -570,7 +570,7 @@ umct_close(void *addr, int portno)
if (err)
printf("%s: close interrupt pipe failed: %s\n",
sc->sc_dev.dv_xname, usbd_errstr(err));
- free(sc->sc_intr_buf, M_USBDEV);
+ free(sc->sc_intr_buf, M_USBDEV, 0);
sc->sc_intr_pipe = NULL;
}
}
diff --git a/sys/dev/usb/umidi.c b/sys/dev/usb/umidi.c
index 695f342c05a..141cef9a86f 100644
--- a/sys/dev/usb/umidi.c
+++ b/sys/dev/usb/umidi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umidi.c,v 1.38 2013/11/10 10:22:39 pirofti Exp $ */
+/* $OpenBSD: umidi.c,v 1.39 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: umidi.c,v 1.16 2002/07/11 21:14:32 augustss Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -414,7 +414,7 @@ alloc_all_endpoints(struct umidi_softc *sc)
ep--;
free_pipe(ep);
}
- free(sc->sc_endpoints, M_USBDEV);
+ free(sc->sc_endpoints, M_USBDEV, 0);
sc->sc_endpoints = sc->sc_out_ep = sc->sc_in_ep = NULL;
break;
}
@@ -430,7 +430,7 @@ free_all_endpoints(struct umidi_softc *sc)
for (i=0; i<sc->sc_in_num_endpoints+sc->sc_out_num_endpoints; i++)
free_pipe(&sc->sc_endpoints[i]);
if (sc->sc_endpoints != NULL)
- free(sc->sc_endpoints, M_USBDEV);
+ free(sc->sc_endpoints, M_USBDEV, 0);
sc->sc_endpoints = sc->sc_out_ep = sc->sc_in_ep = NULL;
}
@@ -518,7 +518,7 @@ alloc_all_endpoints_fixed_ep(struct umidi_softc *sc)
return USBD_NORMAL_COMPLETION;
error:
- free(sc->sc_endpoints, M_USBDEV);
+ free(sc->sc_endpoints, M_USBDEV, 0);
sc->sc_endpoints = NULL;
return err;
}
@@ -794,7 +794,7 @@ free_all_jacks(struct umidi_softc *sc)
s = splusb();
if (sc->sc_out_jacks) {
- free(sc->sc_jacks, M_USBDEV);
+ free(sc->sc_jacks, M_USBDEV, 0);
sc->sc_jacks = sc->sc_in_jacks = sc->sc_out_jacks = NULL;
}
splx(s);
@@ -981,7 +981,7 @@ free_all_mididevs(struct umidi_softc *sc)
{
sc->sc_num_mididevs = 0;
if (sc->sc_mididevs)
- free(sc->sc_mididevs, M_USBDEV);
+ free(sc->sc_mididevs, M_USBDEV, 0);
}
static usbd_status
diff --git a/sys/dev/usb/umsm.c b/sys/dev/usb/umsm.c
index 718ee216d4a..9737f9afe3b 100644
--- a/sys/dev/usb/umsm.c
+++ b/sys/dev/usb/umsm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umsm.c,v 1.98 2014/05/16 13:53:35 dcoppa Exp $ */
+/* $OpenBSD: umsm.c,v 1.99 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2008 Yojiro UO <yuo@nui.org>
@@ -419,7 +419,7 @@ umsm_detach(struct device *self, int flags)
if (sc->sc_intr_pipe != NULL) {
usbd_abort_pipe(sc->sc_intr_pipe);
usbd_close_pipe(sc->sc_intr_pipe);
- free(sc->sc_intr_buf, M_USBDEV);
+ free(sc->sc_intr_buf, M_USBDEV, 0);
sc->sc_intr_pipe = NULL;
}
@@ -492,7 +492,7 @@ umsm_close(void *addr, int portno)
printf("%s: close interrupt pipe failed: %s\n",
sc->sc_dev.dv_xname,
usbd_errstr(err));
- free(sc->sc_intr_buf, M_USBDEV);
+ free(sc->sc_intr_buf, M_USBDEV, 0);
sc->sc_intr_pipe = NULL;
}
}
diff --git a/sys/dev/usb/uoaklux.c b/sys/dev/usb/uoaklux.c
index 9a3b2403cc4..109641a4fd3 100644
--- a/sys/dev/usb/uoaklux.c
+++ b/sys/dev/usb/uoaklux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uoaklux.c,v 1.8 2014/05/07 08:17:21 mpi Exp $ */
+/* $OpenBSD: uoaklux.c,v 1.9 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2012 Yojiro UO <yuo@nui.org>
@@ -212,7 +212,7 @@ uoaklux_detach(struct device *self, int flags)
uhidev_close(&sc->sc_hdev);
if (scc->sc_ibuf != NULL) {
- free(scc->sc_ibuf, M_USBDEV);
+ free(scc->sc_ibuf, M_USBDEV, 0);
scc->sc_ibuf = NULL;
}
diff --git a/sys/dev/usb/uoakrh.c b/sys/dev/usb/uoakrh.c
index 0540e2d3a13..b61ec037374 100644
--- a/sys/dev/usb/uoakrh.c
+++ b/sys/dev/usb/uoakrh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uoakrh.c,v 1.9 2014/05/07 08:17:21 mpi Exp $ */
+/* $OpenBSD: uoakrh.c,v 1.10 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2012 Yojiro UO <yuo@nui.org>
@@ -228,7 +228,7 @@ uoakrh_detach(struct device *self, int flags)
uhidev_close(&sc->sc_hdev);
if (scc->sc_ibuf != NULL) {
- free(scc->sc_ibuf, M_USBDEV);
+ free(scc->sc_ibuf, M_USBDEV, 0);
scc->sc_ibuf = NULL;
}
diff --git a/sys/dev/usb/uoakv.c b/sys/dev/usb/uoakv.c
index 40093d57e5f..77e233b4d56 100644
--- a/sys/dev/usb/uoakv.c
+++ b/sys/dev/usb/uoakv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uoakv.c,v 1.8 2014/05/07 08:17:21 mpi Exp $ */
+/* $OpenBSD: uoakv.c,v 1.9 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2012 Yojiro UO <yuo@nui.org>
@@ -216,7 +216,7 @@ uoakv_detach(struct device *self, int flags)
uhidev_close(&sc->sc_hdev);
if (scc->sc_ibuf != NULL) {
- free(scc->sc_ibuf, M_USBDEV);
+ free(scc->sc_ibuf, M_USBDEV, 0);
scc->sc_ibuf = NULL;
}
diff --git a/sys/dev/usb/upd.c b/sys/dev/usb/upd.c
index 8ef208c01fc..1772d1fa47f 100644
--- a/sys/dev/usb/upd.c
+++ b/sys/dev/usb/upd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: upd.c,v 1.9 2014/05/12 09:50:44 mpi Exp $ */
+/* $OpenBSD: upd.c,v 1.10 2014/07/12 18:48:52 tedu Exp $ */
/*
* Copyright (c) 2014 Andre de Oliveira <andre@openbsd.org>
@@ -251,8 +251,8 @@ upd_detach(struct device *self, int flags)
DPRINTF(("upd_detach: %s\n", sensor->ksensor.desc));
}
- free(sc->sc_reports, M_USBDEV);
- free(sc->sc_sensors, M_USBDEV);
+ free(sc->sc_reports, M_USBDEV, 0);
+ free(sc->sc_sensors, M_USBDEV, 0);
DPRINTF(("upd_detach: complete\n"));
return (0);
}
diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c
index ec0454c5909..ef43afcaf3b 100644
--- a/sys/dev/usb/uplcom.c
+++ b/sys/dev/usb/uplcom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uplcom.c,v 1.62 2013/11/15 10:17:39 pirofti Exp $ */
+/* $OpenBSD: uplcom.c,v 1.63 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: uplcom.c,v 1.29 2002/09/23 05:51:23 simonb Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -422,7 +422,7 @@ uplcom_detach(struct device *self, int flags)
if (sc->sc_intr_pipe != NULL) {
usbd_abort_pipe(sc->sc_intr_pipe);
usbd_close_pipe(sc->sc_intr_pipe);
- free(sc->sc_intr_buf, M_USBDEV);
+ free(sc->sc_intr_buf, M_USBDEV, 0);
sc->sc_intr_pipe = NULL;
}
@@ -752,7 +752,7 @@ uplcom_close(void *addr, int portno)
if (err)
printf("%s: close interrupt pipe failed: %s\n",
sc->sc_dev.dv_xname, usbd_errstr(err));
- free(sc->sc_intr_buf, M_USBDEV);
+ free(sc->sc_intr_buf, M_USBDEV, 0);
sc->sc_intr_pipe = NULL;
}
}
diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c
index 73b7a22f1b9..0524914dac4 100644
--- a/sys/dev/usb/urio.c
+++ b/sys/dev/usb/urio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: urio.c,v 1.44 2013/11/07 13:10:43 pirofti Exp $ */
+/* $OpenBSD: urio.c,v 1.45 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: urio.c,v 1.15 2002/10/23 09:14:02 jdolecek Exp $ */
/*
@@ -504,7 +504,7 @@ urioioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
ret:
if (ptr != NULL)
- free(ptr, M_TEMP);
+ free(ptr, M_TEMP, 0);
return (error);
}
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index 8b5dc95161b..7a1b3ae2b96 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb.c,v 1.99 2014/07/11 08:43:38 mpi Exp $ */
+/* $OpenBSD: usb.c,v 1.100 2014/07/12 18:48:52 tedu Exp $ */
/* $NetBSD: usb.c,v 1.77 2003/01/01 00:10:26 thorpej Exp $ */
/*
@@ -542,7 +542,7 @@ usb_fill_udc_task(void *arg)
if (cdesc == NULL)
return;
udc->udc_desc = *cdesc;
- free(cdesc, M_TEMP);
+ free(cdesc, M_TEMP, 0);
}
void
@@ -661,7 +661,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, struct proc *p)
}
ret:
if (ptr)
- free(ptr, M_TEMP);
+ free(ptr, M_TEMP, 0);
return (error);
}
@@ -783,7 +783,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, struct proc *p)
uio.uio_rw = UIO_READ;
uio.uio_procp = p;
error = uiomove((void *)cdesc, len, &uio);
- free(cdesc, M_TEMP);
+ free(cdesc, M_TEMP, 0);
return (error);
}
diff --git a/sys/dev/usb/usb_mem.c b/sys/dev/usb/usb_mem.c
index 7eca6e7ba67..904a6ec7728 100644
--- a/sys/dev/usb/usb_mem.c
+++ b/sys/dev/usb/usb_mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb_mem.c,v 1.25 2013/04/15 09:23:02 mglocker Exp $ */
+/* $OpenBSD: usb_mem.c,v 1.26 2014/07/12 18:48:53 tedu Exp $ */
/* $NetBSD: usb_mem.c,v 1.26 2003/02/01 06:23:40 thorpej Exp $ */
/*
@@ -162,7 +162,7 @@ unmap:
free1:
bus_dmamem_free(tag, p->segs, p->nsegs);
free0:
- free(p, M_USB);
+ free(p, M_USB, 0);
return (USBD_NOMEM);
}
@@ -180,7 +180,7 @@ usb_block_real_freemem(struct usb_dma_block *p)
bus_dmamap_destroy(p->tag, p->map);
bus_dmamem_unmap(p->tag, p->kaddr, p->size);
bus_dmamem_free(p->tag, p->segs, p->nsegs);
- free(p, M_USB);
+ free(p, M_USB, 0);
}
#endif
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c
index 3e8cf514b92..d42c45ca2ec 100644
--- a/sys/dev/usb/usb_subr.c
+++ b/sys/dev/usb/usb_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb_subr.c,v 1.105 2014/07/12 07:18:16 mpi Exp $ */
+/* $OpenBSD: usb_subr.c,v 1.106 2014/07/12 18:48:53 tedu Exp $ */
/* $NetBSD: usb_subr.c,v 1.103 2003/01/10 11:19:13 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
@@ -570,7 +570,7 @@ usbd_fill_iface_data(struct usbd_device *dev, int ifaceidx, int altidx)
bad:
if (ifc->endpoints != NULL) {
- free(ifc->endpoints, M_USB);
+ free(ifc->endpoints, M_USB, 0);
ifc->endpoints = NULL;
}
return (USBD_INVAL);
@@ -581,7 +581,7 @@ usbd_free_iface_data(struct usbd_device *dev, int ifcno)
{
struct usbd_interface *ifc = &dev->ifaces[ifcno];
if (ifc->endpoints)
- free(ifc->endpoints, M_USB);
+ free(ifc->endpoints, M_USB, 0);
}
usbd_status
@@ -634,8 +634,8 @@ usbd_set_config_index(struct usbd_device *dev, int index, int msg)
nifc = dev->cdesc->bNumInterface;
for (ifcidx = 0; ifcidx < nifc; ifcidx++)
usbd_free_iface_data(dev, ifcidx);
- free(dev->ifaces, M_USB);
- free(dev->cdesc, M_USB);
+ free(dev->ifaces, M_USB, 0);
+ free(dev->cdesc, M_USB, 0);
dev->ifaces = NULL;
dev->cdesc = NULL;
dev->config = USB_UNCONFIG_NO;
@@ -780,7 +780,7 @@ usbd_set_config_index(struct usbd_device *dev, int index, int msg)
return (USBD_NORMAL_COMPLETION);
bad:
- free(cdp, M_USB);
+ free(cdp, M_USB, 0);
return (err);
}
@@ -808,7 +808,7 @@ usbd_setup_pipe(struct usbd_device *dev, struct usbd_interface *iface,
if (err) {
DPRINTF(("%s: endpoint=0x%x failed, error=%s\n", __func__,
ep->edesc->bEndpointAddress, usbd_errstr(err)));
- free(p, M_USB);
+ free(p, M_USB, 0);
return (err);
}
*pipe = p;
@@ -924,7 +924,7 @@ usbd_probe_and_attach(struct device *parent, struct usbd_device *dev, int port,
len = (nifaces + 2) * sizeof dv;
dev->subdevs = malloc(len, M_USB, M_NOWAIT | M_ZERO);
if (dev->subdevs == NULL) {
- free(ifaces, M_USB);
+ free(ifaces, M_USB, 0);
err = USBD_NOMEM;
goto fail;
}
@@ -941,7 +941,7 @@ usbd_probe_and_attach(struct device *parent, struct usbd_device *dev, int port,
usbd_claim_iface(dev, i);
}
}
- free(ifaces, M_USB);
+ free(ifaces, M_USB, 0);
if (dev->ndevs > 0) {
for (i = 0; i < nifaces; i++) {
@@ -954,7 +954,7 @@ usbd_probe_and_attach(struct device *parent, struct usbd_device *dev, int port,
goto fail;
}
- free(dev->subdevs, M_USB);
+ free(dev->subdevs, M_USB, 0);
dev->subdevs = NULL;
}
/* No interfaces were attached in any of the configurations. */
@@ -1273,7 +1273,7 @@ usbd_print(void *aux, const char *pnp)
DPRINTFN(15, ("usbd_print dev=%p\n", uaa->device));
if (pnp) {
if (!uaa->usegeneric) {
- free(devinfop, M_TEMP);
+ free(devinfop, M_TEMP, 0);
return (QUIET);
}
printf("%s at %s", devinfop, pnp);
@@ -1287,7 +1287,7 @@ usbd_print(void *aux, const char *pnp)
if (!pnp)
printf(" %s\n", devinfop);
- free(devinfop, M_TEMP);
+ free(devinfop, M_TEMP, 0);
return (UNCONF);
}
@@ -1422,7 +1422,7 @@ usbd_get_cdesc(struct usbd_device *dev, int index, int *lenp)
cdesc = malloc(len, M_TEMP, M_WAITOK);
err = usbd_get_desc(dev, UDESC_CONFIG, index, len, cdesc);
if (err) {
- free(cdesc, M_TEMP);
+ free(cdesc, M_TEMP, 0);
return (0);
}
}
@@ -1444,15 +1444,15 @@ usb_free_device(struct usbd_device *dev)
nifc = dev->cdesc->bNumInterface;
for (ifcidx = 0; ifcidx < nifc; ifcidx++)
usbd_free_iface_data(dev, ifcidx);
- free(dev->ifaces, M_USB);
+ free(dev->ifaces, M_USB, 0);
}
if (dev->cdesc != NULL)
- free(dev->cdesc, M_USB);
+ free(dev->cdesc, M_USB, 0);
if (dev->subdevs != NULL)
- free(dev->subdevs, M_USB);
+ free(dev->subdevs, M_USB, 0);
dev->bus->devices[dev->address] = NULL;
- free(dev, M_USB);
+ free(dev, M_USB, 0);
}
/*
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c
index 202b09dd578..c83218b2db4 100644
--- a/sys/dev/usb/usbdi.c
+++ b/sys/dev/usb/usbdi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbdi.c,v 1.70 2014/03/07 09:38:14 mpi Exp $ */
+/* $OpenBSD: usbdi.c,v 1.71 2014/07/12 18:48:53 tedu Exp $ */
/* $NetBSD: usbdi.c,v 1.103 2002/09/27 15:37:38 provos Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $ */
@@ -273,7 +273,7 @@ usbd_close_pipe(struct usbd_pipe *pipe)
pipe->methods->close(pipe);
if (pipe->intrxfer != NULL)
usbd_free_xfer(pipe->intrxfer);
- free(pipe, M_USB);
+ free(pipe, M_USB, 0);
return (USBD_NORMAL_COMPLETION);
}
@@ -652,7 +652,7 @@ usbd_set_interface(struct usbd_interface *iface, int altidx)
/* new setting works, we can free old endpoints */
if (endpoints != NULL)
- free(endpoints, M_USB);
+ free(endpoints, M_USB, 0);
#ifdef DIAGNOSTIC
if (iface->idesc == NULL) {
diff --git a/sys/dev/usb/usbf_subr.c b/sys/dev/usb/usbf_subr.c
index 4269d12ef6a..e27e76ebc90 100644
--- a/sys/dev/usb/usbf_subr.c
+++ b/sys/dev/usb/usbf_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbf_subr.c,v 1.18 2014/03/07 18:56:14 mpi Exp $ */
+/* $OpenBSD: usbf_subr.c,v 1.19 2014/07/12 18:48:53 tedu Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -74,7 +74,7 @@ usbf_realloc(void **pp, size_t *sizep, size_t newsize)
if (newsize == 0) {
if (*sizep > 0)
- free(*pp, M_USB);
+ free(*pp, M_USB, 0);
*pp = NULL;
*sizep = 0;
return NULL;
@@ -90,7 +90,7 @@ usbf_realloc(void **pp, size_t *sizep, size_t newsize)
#if 0
/* XXX must leak for now; something unknown has a pointer */
if (*pp != NULL)
- free(*pp, M_USB);
+ free(*pp, M_USB, 0);
#endif
*pp = p;
*sizep = newsize;
@@ -141,7 +141,7 @@ usbf_remove_device(struct usbf_device *dev, struct usbf_port *up)
if (dev->default_pipe != NULL)
usbf_close_pipe(dev->default_pipe);
up->device = NULL;
- free(dev, M_USB);
+ free(dev, M_USB, 0);
}
usbf_status
@@ -193,7 +193,7 @@ usbf_new_device(struct device *parent, struct usbf_bus *bus, int depth,
err = usbf_setup_pipe(dev, NULL, &dev->def_ep, 0,
&dev->default_pipe);
if (err) {
- free(dev, M_USB);
+ free(dev, M_USB, 0);
return err;
}
@@ -204,7 +204,7 @@ usbf_new_device(struct device *parent, struct usbf_bus *bus, int depth,
if (dev->default_xfer != NULL)
usbf_free_xfer(dev->default_xfer);
usbf_close_pipe(dev->default_pipe);
- free(dev, M_USB);
+ free(dev, M_USB, 0);
return USBF_NOMEM;
}
@@ -216,7 +216,7 @@ usbf_new_device(struct device *parent, struct usbf_bus *bus, int depth,
usbf_free_xfer(dev->default_xfer);
usbf_free_xfer(dev->data_xfer);
usbf_close_pipe(dev->default_pipe);
- free(dev, M_USB);
+ free(dev, M_USB, 0);
return err;
}
@@ -289,7 +289,7 @@ void
usbf_devinfo_free(char *devinfo)
{
if (devinfo != NULL)
- free(devinfo, M_USB);
+ free(devinfo, M_USB, 0);
}
/*
@@ -407,7 +407,7 @@ usbf_add_config(struct usbf_device *dev, struct usbf_config **ucp)
cd = malloc(sizeof *cd, M_USB, M_NOWAIT | M_ZERO);
if (cd == NULL) {
- free(uc, M_USB);
+ free(uc, M_USB, 0);
return USBF_NOMEM;
}
@@ -483,7 +483,7 @@ usbf_add_interface(struct usbf_config *uc, u_int8_t bInterfaceClass,
id = malloc(sizeof *id, M_USB, M_NOWAIT | M_ZERO);
if (id == NULL) {
- free(ui, M_USB);
+ free(ui, M_USB, 0);
return USBF_NOMEM;
}
@@ -524,7 +524,7 @@ usbf_add_endpoint(struct usbf_interface *ui, u_int8_t bEndpointAddress,
ed = malloc(sizeof *ed, M_USB, M_NOWAIT | M_ZERO);
if (ed == NULL) {
- free(ue, M_USB);
+ free(ue, M_USB, 0);
return USBF_NOMEM;
}
@@ -566,7 +566,7 @@ usbf_end_config(struct usbf_config *uc)
if (err)
break;
- free(ui->idesc, M_USB);
+ free(ui->idesc, M_USB, 0);
ui->idesc = (usb_interface_descriptor_t *)d;
SIMPLEQ_FOREACH(ue, &ui->endpoint_head, next) {
@@ -575,7 +575,7 @@ usbf_end_config(struct usbf_config *uc)
if (err)
break;
- free(ue->edesc, M_USB);
+ free(ue->edesc, M_USB, 0);
ue->edesc = (usb_endpoint_descriptor_t *)d;
}
}
@@ -671,7 +671,7 @@ usbf_setup_pipe(struct usbf_device *dev, struct usbf_interface *iface,
SIMPLEQ_INIT(&p->queue);
err = dev->bus->methods->open_pipe(p);
if (err) {
- free(p, M_USB);
+ free(p, M_USB, 0);
return err;
}
*pipe = p;
@@ -707,7 +707,7 @@ usbf_close_pipe(struct usbf_pipe *pipe)
usbf_abort_pipe(pipe);
pipe->methods->close(pipe);
pipe->endpoint->refcnt--;
- free(pipe, M_USB);
+ free(pipe, M_USB, 0);
}
void
diff --git a/sys/dev/usb/usps.c b/sys/dev/usb/usps.c
index 9b947371183..1f47fca9bad 100644
--- a/sys/dev/usb/usps.c
+++ b/sys/dev/usb/usps.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usps.c,v 1.5 2014/03/07 18:39:02 mpi Exp $ */
+/* $OpenBSD: usps.c,v 1.6 2014/07/12 18:48:53 tedu Exp $ */
/*
* Copyright (c) 2011 Yojiro UO <yuo@nui.org>
@@ -297,7 +297,7 @@ fail:
if (sc->sc_xfer != NULL)
usbd_free_xfer(sc->sc_xfer);
if (sc->sc_intrbuf != NULL)
- free(sc->sc_intrbuf, M_USBDEV);
+ free(sc->sc_intrbuf, M_USBDEV, 0);
}
int
@@ -313,7 +313,7 @@ usps_detach(struct device *self, int flags)
usbd_abort_pipe(sc->sc_ipipe);
usbd_close_pipe(sc->sc_ipipe);
if (sc->sc_intrbuf != NULL)
- free(sc->sc_intrbuf, M_USBDEV);
+ free(sc->sc_intrbuf, M_USBDEV, 0);
sc->sc_ipipe = NULL;
}
if (sc->sc_xfer != NULL)
diff --git a/sys/dev/usb/uticom.c b/sys/dev/usb/uticom.c
index 2ddd7718724..d214c6485fe 100644
--- a/sys/dev/usb/uticom.c
+++ b/sys/dev/usb/uticom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uticom.c,v 1.24 2014/03/07 18:39:02 mpi Exp $ */
+/* $OpenBSD: uticom.c,v 1.25 2014/07/12 18:48:53 tedu Exp $ */
/*
* Copyright (c) 2005 Dmitry Komissaroff <dxi@mail.ru>.
*
@@ -486,7 +486,7 @@ uticom_detach(struct device *self, int flags)
if (sc->sc_intr_pipe != NULL) {
usbd_abort_pipe(sc->sc_intr_pipe);
usbd_close_pipe(sc->sc_intr_pipe);
- free(sc->sc_intr_buf, M_USBDEV);
+ free(sc->sc_intr_buf, M_USBDEV, 0);
sc->sc_intr_pipe = NULL;
}
@@ -786,7 +786,7 @@ uticom_close(void *addr, int portno)
if (err)
printf("%s: close interrupt pipe failed: %s\n",
sc->sc_dev.dv_xname, usbd_errstr(err));
- free(sc->sc_intr_buf, M_USBDEV);
+ free(sc->sc_intr_buf, M_USBDEV, 0);
sc->sc_intr_pipe = NULL;
}
}
@@ -920,7 +920,7 @@ uticom_download_fw(struct uticom_softc *sc, int pipeno,
if (!buffer) {
printf("%s: uticom_download_fw: out of memory\n",
sc->sc_dev.dv_xname);
- free(firmware, M_DEVBUF);
+ free(firmware, M_DEVBUF, 0);
return ENOMEM;
}
@@ -970,12 +970,12 @@ uticom_download_fw(struct uticom_softc *sc, int pipeno,
sc->sc_dev.dv_xname, usbd_errstr(err));
finish:
- free(firmware, M_DEVBUF);
+ free(firmware, M_DEVBUF, 0);
usbd_free_buffer(oxfer);
usbd_free_xfer(oxfer);
oxfer = NULL;
usbd_abort_pipe(pipe);
usbd_close_pipe(pipe);
- free(buffer, M_USBDEV);
+ free(buffer, M_USBDEV, 0);
return err;
}
diff --git a/sys/dev/usb/utrh.c b/sys/dev/usb/utrh.c
index 451734de700..a60af099744 100644
--- a/sys/dev/usb/utrh.c
+++ b/sys/dev/usb/utrh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utrh.c,v 1.15 2014/05/07 08:17:21 mpi Exp $ */
+/* $OpenBSD: utrh.c,v 1.16 2014/07/12 18:48:53 tedu Exp $ */
/*
* Copyright (c) 2009 Yojiro UO <yuo@nui.org>
@@ -179,7 +179,7 @@ utrh_detach(struct device *self, int flags)
uhidev_close(&sc->sc_hdev);
if (sc->sc_ibuf != NULL) {
- free(sc->sc_ibuf, M_USBDEV);
+ free(sc->sc_ibuf, M_USBDEV, 0);
sc->sc_ibuf = NULL;
}
diff --git a/sys/dev/usb/uts.c b/sys/dev/usb/uts.c
index 4c1fd0fc20f..d3759f797a0 100644
--- a/sys/dev/usb/uts.c
+++ b/sys/dev/usb/uts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uts.c,v 1.33 2014/03/07 18:39:02 mpi Exp $ */
+/* $OpenBSD: uts.c,v 1.34 2014/07/12 18:48:53 tedu Exp $ */
/*
* Copyright (c) 2007 Robert Nagy <robert@openbsd.org>
@@ -278,7 +278,7 @@ uts_enable(void *v)
USBD_SHORT_XFER_OK, &sc->sc_intr_pipe, sc, sc->sc_ibuf,
sc->sc_isize, uts_intr, USBD_DEFAULT_INTERVAL);
if (err) {
- free(sc->sc_ibuf, M_USBDEV);
+ free(sc->sc_ibuf, M_USBDEV, 0);
sc->sc_intr_pipe = NULL;
return (EIO);
}
@@ -307,7 +307,7 @@ uts_disable(void *v)
}
if (sc->sc_ibuf != NULL) {
- free(sc->sc_ibuf, M_USBDEV);
+ free(sc->sc_ibuf, M_USBDEV, 0);
sc->sc_ibuf = NULL;
}
diff --git a/sys/dev/usb/utwitch.c b/sys/dev/usb/utwitch.c
index 2f7c0c0dcc4..62d7f73ffd0 100644
--- a/sys/dev/usb/utwitch.c
+++ b/sys/dev/usb/utwitch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utwitch.c,v 1.12 2014/05/07 08:17:21 mpi Exp $ */
+/* $OpenBSD: utwitch.c,v 1.13 2014/07/12 18:48:53 tedu Exp $ */
/*
* Copyright (c) 2010 Yojiro UO <yuo@nui.org>
@@ -193,7 +193,7 @@ utwitch_detach(struct device *self, int flags)
uhidev_close(&sc->sc_hdev);
if (sc->sc_ibuf != NULL) {
- free(sc->sc_ibuf, M_USBDEV);
+ free(sc->sc_ibuf, M_USBDEV, 0);
sc->sc_ibuf = NULL;
}
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c
index 183f5612eb3..492cd0c1f81 100644
--- a/sys/dev/usb/uvideo.c
+++ b/sys/dev/usb/uvideo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvideo.c,v 1.174 2014/01/22 03:21:23 jsg Exp $ */
+/* $OpenBSD: uvideo.c,v 1.175 2014/07/12 18:48:53 tedu Exp $ */
/*
* Copyright (c) 2008 Robert Nagy <robert@openbsd.org>
@@ -1624,12 +1624,12 @@ uvideo_vs_free_frame(struct uvideo_softc *sc)
struct uvideo_frame_buffer *fb = &sc->sc_frame_buffer;
if (fb->buf != NULL) {
- free(fb->buf, M_DEVBUF);
+ free(fb->buf, M_DEVBUF, 0);
fb->buf = NULL;
}
if (sc->sc_mmap_buffer != NULL) {
- free(sc->sc_mmap_buffer, M_DEVBUF);
+ free(sc->sc_mmap_buffer, M_DEVBUF, 0);
sc->sc_mmap_buffer = NULL;
}
@@ -3343,7 +3343,7 @@ uvideo_queryctrl(void *v, struct v4l2_queryctrl *qctrl)
qctrl->flags = 0;
out:
- free(ctrl_data, M_USBDEV);
+ free(ctrl_data, M_USBDEV, 0);
return (ret);
}
@@ -3394,7 +3394,7 @@ uvideo_g_ctrl(void *v, struct v4l2_control *gctrl)
}
out:
- free(ctrl_data, M_USBDEV);
+ free(ctrl_data, M_USBDEV, 0);
return (0);
}
@@ -3441,7 +3441,7 @@ uvideo_s_ctrl(void *v, struct v4l2_control *sctrl)
if (error != USBD_NORMAL_COMPLETION)
ret = EINVAL;
- free(ctrl_data, M_USBDEV);
+ free(ctrl_data, M_USBDEV, 0);
return (ret);
}
@@ -3585,7 +3585,7 @@ uvideo_ucode_loader_ricoh(struct uvideo_softc *sc)
while (remain > 0) {
if (remain < 3) {
printf("%s: ucode file incomplete!\n", DEVNAME(sc));
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
return (USBD_INVAL);
}
@@ -3599,7 +3599,7 @@ uvideo_ucode_loader_ricoh(struct uvideo_softc *sc)
if (error != USBD_NORMAL_COMPLETION) {
printf("%s: ucode upload error=%s!\n",
DEVNAME(sc), usbd_errstr(error));
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
return (USBD_INVAL);
}
DPRINTF(1, "%s: uploaded %d bytes ucode to addr 0x%x\n",
@@ -3608,7 +3608,7 @@ uvideo_ucode_loader_ricoh(struct uvideo_softc *sc)
offset += len;
remain -= len;
}
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
/* activate microcode */
cbuf = 0;
@@ -3664,7 +3664,7 @@ uvideo_ucode_loader_apple_isight(struct uvideo_softc *sc)
if (len < 1 || len > 1023) {
printf("%s: ucode header contains wrong value!\n",
DEVNAME(sc));
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
return (USBD_INVAL);
}
code += 4;
@@ -3681,14 +3681,14 @@ uvideo_ucode_loader_apple_isight(struct uvideo_softc *sc)
if (error) {
printf("%s: ucode load failed: %s\n",
DEVNAME(sc), usbd_errstr(error));
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
return (USBD_INVAL);
}
code += llen;
}
}
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
/* send finished request */
cbuf = 0;
diff --git a/sys/dev/usb/uvscom.c b/sys/dev/usb/uvscom.c
index 56900b76299..e14b30606ab 100644
--- a/sys/dev/usb/uvscom.c
+++ b/sys/dev/usb/uvscom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvscom.c,v 1.30 2013/11/15 10:17:39 pirofti Exp $ */
+/* $OpenBSD: uvscom.c,v 1.31 2014/07/12 18:48:53 tedu Exp $ */
/* $NetBSD: uvscom.c,v 1.9 2003/02/12 15:36:20 ichiro Exp $ */
/*-
* Copyright (c) 2001-2002, Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
@@ -372,7 +372,7 @@ uvscom_detach(struct device *self, int flags)
if (sc->sc_intr_pipe != NULL) {
usbd_abort_pipe(sc->sc_intr_pipe);
usbd_close_pipe(sc->sc_intr_pipe);
- free(sc->sc_intr_buf, M_USBDEV);
+ free(sc->sc_intr_buf, M_USBDEV, 0);
sc->sc_intr_pipe = NULL;
}
@@ -779,7 +779,7 @@ uvscom_close(void *addr, int portno)
printf("%s: close interrupt pipe failed: %s\n",
sc->sc_dev.dv_xname,
usbd_errstr(err));
- free(sc->sc_intr_buf, M_USBDEV);
+ free(sc->sc_intr_buf, M_USBDEV, 0);
sc->sc_intr_pipe = NULL;
}
}
diff --git a/sys/dev/video.c b/sys/dev/video.c
index 642c7274cc5..0363039a488 100644
--- a/sys/dev/video.c
+++ b/sys/dev/video.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: video.c,v 1.30 2014/07/08 17:19:25 deraadt Exp $ */
+/* $OpenBSD: video.c,v 1.31 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2008 Robert Nagy <robert@openbsd.org>
@@ -431,7 +431,7 @@ videodetach(struct device *self, int flags)
int maj, mn;
if (sc->sc_fbuffer != NULL)
- free(sc->sc_fbuffer, M_DEVBUF);
+ free(sc->sc_fbuffer, M_DEVBUF, 0);
/* locate the major number */
for (maj = 0; maj < nchrdev; maj++)
diff --git a/sys/dev/vmt.c b/sys/dev/vmt.c
index 4e586bc8c73..1b8b0374254 100644
--- a/sys/dev/vmt.c
+++ b/sys/dev/vmt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmt.c,v 1.18 2014/07/11 08:18:31 guenther Exp $ */
+/* $OpenBSD: vmt.c,v 1.19 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2007 David Crawshaw <david@zentus.com>
@@ -308,7 +308,7 @@ vmt_attach(struct device *parent, struct device *self, void *aux)
return;
free:
- free(sc->sc_rpc_buf, M_DEVBUF);
+ free(sc->sc_rpc_buf, M_DEVBUF, 0);
}
int
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index afc44763371..c59acc44d1c 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnd.c,v 1.152 2013/11/12 14:11:07 krw Exp $ */
+/* $OpenBSD: vnd.c,v 1.153 2014/07/12 18:48:51 tedu Exp $ */
/* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */
/*
@@ -537,7 +537,7 @@ vndioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
/* Free crypto key */
if (sc->sc_keyctx) {
explicit_bzero(sc->sc_keyctx, sizeof(*sc->sc_keyctx));
- free(sc->sc_keyctx, M_DEVBUF);
+ free(sc->sc_keyctx, M_DEVBUF, 0);
}
/* Detach the disk. */
@@ -579,7 +579,7 @@ vndioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
vndgetdisklabel(dev, sc, lp, 0);
*(sc->sc_dk.dk_label) = *lp;
- free(lp, M_TEMP);
+ free(lp, M_TEMP, 0);
return (0);
case DIOCGPDINFO:
@@ -651,7 +651,7 @@ vndsetcred(struct vnd_softc *sc, struct ucred *cred)
error = vn_rdwr(UIO_READ, sc->sc_vp, buf, size, 0, UIO_SYSSPACE, 0,
sc->sc_cred, NULL, curproc);
- free(buf, M_TEMP);
+ free(buf, M_TEMP, 0);
return (error);
}
diff --git a/sys/dev/vscsi.c b/sys/dev/vscsi.c
index 13497a2b272..5f22a71886c 100644
--- a/sys/dev/vscsi.c
+++ b/sys/dev/vscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vscsi.c,v 1.29 2014/04/22 08:48:51 dlg Exp $ */
+/* $OpenBSD: vscsi.c,v 1.30 2014/07/12 18:48:51 tedu Exp $ */
/*
* Copyright (c) 2008 David Gwynne <dlg@openbsd.org>
@@ -530,7 +530,7 @@ vscsi_devevent_task(void *xsc, void *xdt)
gone:
device_unref(&sc->sc_dev);
- free(dt, M_TEMP);
+ free(dt, M_TEMP, 0);
}
int
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c
index a9362169a54..87b2378b648 100644
--- a/sys/dev/wscons/wsdisplay.c
+++ b/sys/dev/wscons/wsdisplay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsdisplay.c,v 1.118 2014/05/14 18:11:24 shadchin Exp $ */
+/* $OpenBSD: wsdisplay.c,v 1.119 2014/07/12 18:48:53 tedu Exp $ */
/* $NetBSD: wsdisplay.c,v 1.82 2005/02/27 00:27:52 perry Exp $ */
/*
@@ -310,8 +310,8 @@ wsscreen_attach(struct wsdisplay_softc *sc, int console, const char *emul,
fail:
if (dconf != NULL)
- free(dconf, M_DEVBUF);
- free(scr, M_DEVBUF);
+ free(dconf, M_DEVBUF, 0);
+ free(scr, M_DEVBUF, 0);
return (NULL);
}
@@ -326,8 +326,8 @@ wsscreen_detach(struct wsscreen *scr)
}
(*scr->scr_dconf->wsemul->detach)(scr->scr_dconf->wsemulcookie,
&ccol, &crow);
- free(scr->scr_dconf, M_DEVBUF);
- free(scr, M_DEVBUF);
+ free(scr->scr_dconf, M_DEVBUF, 0);
+ free(scr, M_DEVBUF, 0);
}
const struct wsscreen_descr *
@@ -1349,14 +1349,14 @@ wsdisplay_cfg_ioctl(struct wsdisplay_softc *sc, u_long cmd, caddr_t data,
buf = malloc(fontsz, M_DEVBUF, M_WAITOK);
error = copyin(d->data, buf, fontsz);
if (error) {
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return (error);
}
d->data = buf;
error =
(*sc->sc_accessops->load_font)(sc->sc_accesscookie, 0, d);
if (error)
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return (error);
case WSDISPLAYIO_LSFONT:
@@ -3356,7 +3356,7 @@ allocate_copybuffer(struct wsdisplay_softc *sc)
}
if (size != sc->sc_copybuffer_size && sc->sc_copybuffer_size != 0) {
bzero(sc->sc_copybuffer, sc->sc_copybuffer_size);
- free(sc->sc_copybuffer, M_DEVBUF);
+ free(sc->sc_copybuffer, M_DEVBUF, 0);
}
if ((sc->sc_copybuffer = (char *)malloc(size, M_DEVBUF, M_NOWAIT)) ==
NULL) {
diff --git a/sys/dev/wscons/wsdisplay_compat_usl.c b/sys/dev/wscons/wsdisplay_compat_usl.c
index f6e885c881d..1b43e4b6697 100644
--- a/sys/dev/wscons/wsdisplay_compat_usl.c
+++ b/sys/dev/wscons/wsdisplay_compat_usl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsdisplay_compat_usl.c,v 1.25 2014/04/18 21:18:50 guenther Exp $ */
+/* $OpenBSD: wsdisplay_compat_usl.c,v 1.26 2014/07/12 18:48:53 tedu Exp $ */
/* $NetBSD: wsdisplay_compat_usl.c,v 1.12 2000/03/23 07:01:47 thorpej Exp $ */
/*
@@ -115,7 +115,7 @@ usl_sync_init(struct wsscreen *scr, struct usl_syncdata **sdp,
timeout_set(&sd->s_detach_ch, usl_detachtimeout, sd);
res = wsscreen_attach_sync(scr, &usl_syncops, sd);
if (res) {
- free(sd, M_DEVBUF);
+ free(sd, M_DEVBUF, 0);
return (res);
}
*sdp = sd;
@@ -134,7 +134,7 @@ usl_sync_done(struct usl_syncdata *sd)
(*sd->s_callback)(sd->s_cbarg, ENXIO, 0);
}
wsscreen_detach_sync(sd->s_scr);
- free(sd, M_DEVBUF);
+ free(sd, M_DEVBUF, 0);
}
int
diff --git a/sys/dev/wscons/wsemul_dumb.c b/sys/dev/wscons/wsemul_dumb.c
index 1226cb2cd72..9c5ed2a316d 100644
--- a/sys/dev/wscons/wsemul_dumb.c
+++ b/sys/dev/wscons/wsemul_dumb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsemul_dumb.c,v 1.11 2013/10/18 22:06:41 miod Exp $ */
+/* $OpenBSD: wsemul_dumb.c,v 1.12 2014/07/12 18:48:53 tedu Exp $ */
/* $NetBSD: wsemul_dumb.c,v 1.7 2000/01/05 11:19:36 drochner Exp $ */
/*
@@ -299,7 +299,7 @@ wsemul_dumb_detach(void *cookie, u_int *crowp, u_int *ccolp)
*crowp = edp->crow;
*ccolp = edp->ccol;
if (edp != &wsemul_dumb_console_emuldata)
- free(edp, M_DEVBUF);
+ free(edp, M_DEVBUF, 0);
}
void
diff --git a/sys/dev/wscons/wsemul_sun.c b/sys/dev/wscons/wsemul_sun.c
index b698fd3c03f..6d79675a332 100644
--- a/sys/dev/wscons/wsemul_sun.c
+++ b/sys/dev/wscons/wsemul_sun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsemul_sun.c,v 1.30 2013/10/18 22:06:41 miod Exp $ */
+/* $OpenBSD: wsemul_sun.c,v 1.31 2014/07/12 18:48:53 tedu Exp $ */
/* $NetBSD: wsemul_sun.c,v 1.11 2000/01/05 11:19:36 drochner Exp $ */
/*
@@ -1062,7 +1062,7 @@ wsemul_sun_detach(void *cookie, u_int *crowp, u_int *ccolp)
*crowp = edp->crow;
*ccolp = edp->ccol;
if (edp != &wsemul_sun_console_emuldata)
- free(edp, M_DEVBUF);
+ free(edp, M_DEVBUF, 0);
}
void
diff --git a/sys/dev/wscons/wsemul_vt100.c b/sys/dev/wscons/wsemul_vt100.c
index 20ec8b12d57..ab1df8d4e43 100644
--- a/sys/dev/wscons/wsemul_vt100.c
+++ b/sys/dev/wscons/wsemul_vt100.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsemul_vt100.c,v 1.31 2013/10/18 22:06:41 miod Exp $ */
+/* $OpenBSD: wsemul_vt100.c,v 1.32 2014/07/12 18:48:53 tedu Exp $ */
/* $NetBSD: wsemul_vt100.c,v 1.13 2000/04/28 21:56:16 mycroft Exp $ */
/*
@@ -238,7 +238,7 @@ wsemul_vt100_detach(void *cookie, u_int *crowp, u_int *ccolp)
*crowp = edp->crow;
*ccolp = edp->ccol;
-#define f(ptr) if (ptr) {free(ptr, M_DEVBUF); ptr = NULL;}
+#define f(ptr) if (ptr) {free(ptr, M_DEVBUF, 0); ptr = NULL;}
f(edp->tabs)
f(edp->dblwid)
f(edp->dcsarg)
@@ -248,7 +248,7 @@ wsemul_vt100_detach(void *cookie, u_int *crowp, u_int *ccolp)
f(edp->nrctab)
#undef f
if (edp != &wsemul_vt100_console_emuldata)
- free(edp, M_DEVBUF);
+ free(edp, M_DEVBUF, 0);
}
void
diff --git a/sys/dev/wscons/wsevent.c b/sys/dev/wscons/wsevent.c
index 55a167db95a..9fd74cce859 100644
--- a/sys/dev/wscons/wsevent.c
+++ b/sys/dev/wscons/wsevent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsevent.c,v 1.8 2012/12/05 23:20:22 deraadt Exp $ */
+/* $OpenBSD: wsevent.c,v 1.9 2014/07/12 18:48:53 tedu Exp $ */
/* $NetBSD: wsevent.c,v 1.16 2003/08/07 16:31:29 agc Exp $ */
/*
@@ -117,7 +117,7 @@ wsevent_fini(struct wseventvar *ev)
#endif
return;
}
- free(ev->q, M_DEVBUF);
+ free(ev->q, M_DEVBUF, 0);
ev->q = NULL;
}
diff --git a/sys/dev/wscons/wskbd.c b/sys/dev/wscons/wskbd.c
index 7d2a7160a22..f5ccf1075a8 100644
--- a/sys/dev/wscons/wskbd.c
+++ b/sys/dev/wscons/wskbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wskbd.c,v 1.79 2014/07/11 08:18:31 guenther Exp $ */
+/* $OpenBSD: wskbd.c,v 1.80 2014/07/12 18:48:53 tedu Exp $ */
/* $NetBSD: wskbd.c,v 1.80 2005/05/04 01:52:16 augustss Exp $ */
/*
@@ -624,7 +624,7 @@ wskbd_detach(struct device *self, int flags)
splx(s);
}
- free(sc->sc_map, M_DEVBUF);
+ free(sc->sc_map, M_DEVBUF, 0);
/* locate the major number */
for (maj = 0; maj < nchrdev; maj++)
@@ -1116,7 +1116,7 @@ getkeyrepeat:
KB_HANDLEDBYWSKBD);
wskbd_update_layout(sc->id, enc);
}
- free(buf, M_TEMP);
+ free(buf, M_TEMP, 0);
return(error);
case WSKBDIO_GETMAP:
diff --git a/sys/dev/wscons/wskbdutil.c b/sys/dev/wscons/wskbdutil.c
index 21c771f4e67..e0341bd54fb 100644
--- a/sys/dev/wscons/wskbdutil.c
+++ b/sys/dev/wscons/wskbdutil.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wskbdutil.c,v 1.12 2014/05/15 09:29:38 mpi Exp $ */
+/* $OpenBSD: wskbdutil.c,v 1.13 2014/07/12 18:48:53 tedu Exp $ */
/* $NetBSD: wskbdutil.c,v 1.7 1999/12/21 11:59:13 drochner Exp $ */
/*-
@@ -379,7 +379,7 @@ wskbd_init_keymap(int newlen, struct wscons_keymap **map, int *maplen)
if (newlen != *maplen) {
if (*maplen > 0)
- free(*map, M_DEVBUF);
+ free(*map, M_DEVBUF, 0);
*maplen = newlen;
*map = malloc(newlen*sizeof(struct wscons_keymap),
M_DEVBUF, M_WAITOK);
diff --git a/sys/dev/wscons/wsmux.c b/sys/dev/wscons/wsmux.c
index 8e43a33c051..8546c0de920 100644
--- a/sys/dev/wscons/wsmux.c
+++ b/sys/dev/wscons/wsmux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsmux.c,v 1.26 2014/01/26 17:48:08 miod Exp $ */
+/* $OpenBSD: wsmux.c,v 1.27 2014/07/12 18:48:53 tedu Exp $ */
/* $NetBSD: wsmux.c,v 1.37 2005/04/30 03:47:12 augustss Exp $ */
/*
@@ -146,7 +146,7 @@ wsmux_getmux(int n)
wsmuxdevs = new;
nwsmux = n + 1;
if (old != NULL)
- free(old, M_DEVBUF);
+ free(old, M_DEVBUF, 0);
}
sc = wsmuxdevs[n];
diff --git a/sys/dev/wsfont/wsfont.c b/sys/dev/wsfont/wsfont.c
index 4720de12f64..78b38dabf51 100644
--- a/sys/dev/wsfont/wsfont.c
+++ b/sys/dev/wsfont/wsfont.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsfont.c,v 1.35 2013/10/20 21:24:01 miod Exp $ */
+/* $OpenBSD: wsfont.c,v 1.36 2014/07/12 18:48:53 tedu Exp $ */
/* $NetBSD: wsfont.c,v 1.17 2001/02/07 13:59:24 ad Exp $ */
/*-
@@ -337,8 +337,8 @@ wsfont_rotate_internal(struct wsdisplay_font *font)
* If we seem to have rotated this font already, drop the
* new one...
*/
- free(newbits, M_DEVBUF);
- free(newfont, M_DEVBUF);
+ free(newbits, M_DEVBUF, 0);
+ free(newfont, M_DEVBUF, 0);
newfont = NULL;
}
@@ -504,13 +504,13 @@ wsfont_remove(int cookie)
/* Don't free statically allocated font data */
if ((ent->flg & WSFONT_STATIC) != 0) {
- free(ent->font->data, M_DEVBUF);
- free(ent->font, M_DEVBUF);
+ free(ent->font->data, M_DEVBUF, 0);
+ free(ent->font, M_DEVBUF, 0);
}
/* Remove from list, free entry */
TAILQ_REMOVE(&list, ent, chain);
- free(ent, M_DEVBUF);
+ free(ent, M_DEVBUF, 0);
splx(s);
return (0);
}