after discussions with beck deraadt kettenis.
-/* $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>
/* 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;
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;
acpi_maptable(sc, rsdt->table_offsets[i], NULL, NULL,
NULL, 1);
- free(sdt, M_DEVBUF);
+ free(sdt, M_DEVBUF, 0);
}
return (0);
wq->handler(wq->arg0, wq->arg1);
- free(wq, M_DEVBUF);
+ free(wq, M_DEVBUF, 0);
/* We did something */
return (1);
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);
while(acpi_dotask(acpi_softc))
;
}
- free(thread, M_DEVBUF);
+ free(thread, M_DEVBUF, 0);
kthread_exit(0);
}
-/* $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>
*
}
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);
-/* $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>
*
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;
}
-/* $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>
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,
-/* $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>
*
#endif
dnprintf(99, "free: %p %s:%d\n", sptr, fn, line);
- free(sptr, M_ACPI);
+ free(sptr, M_ACPI, 0);
}
}
-/* $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>
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);
}
return (0);
error:
- free(ap, M_DEVBUF);
+ free(ap, M_DEVBUF, 0);
unsupported:
as->as_methods->free(as->as_cookie, port, link->lun);
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);
* 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;
}
}
-/* $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 $ */
/*
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:
-/* $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 $ */
/*
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);
}
}
if ((*pm)->proc == p) {
m = *pm;
*pm = m->next;
- free(m, M_DEVBUF);
+ free(m, M_DEVBUF, 0);
return;
}
}
-/* $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.
if (dev == bm->bm_dev) {
LIST_REMOVE(bm, bm_link);
- free(bm, M_DEVBUF);
+ free(bm, M_DEVBUF, 0);
}
}
}
-/* $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 $ */
/*
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);
cardbussubmatch)) == NULL) {
/* do not match */
disable_function(sc, function);
- free(ct, M_DEVBUF);
+ free(ct, M_DEVBUF, 0);
*previous_next = NULL;
} else {
/* found */
* if no functions were attached).
*/
disable_function(sc, 8);
- free(tuple, M_TEMP);
+ free(tuple, M_TEMP, 0);
return (no_work_funcs);
}
} else {
sc->sc_poweron_func &= ~(1 << ct->ct_func);
*prev_next = ct->ct_next;
- free(ct, M_DEVBUF);
+ free(ct, M_DEVBUF, 0);
}
}
-/* $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 $ */
/*
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);
-/* $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>
FRELE(fp, p);
fdpunlock(fdp);
- free(devname, M_DEVBUF);
+ free(devname, M_DEVBUF, 0);
return 0;
fdpunlock(fdp);
invalid:
- free(devname, M_DEVBUF);
+ free(devname, M_DEVBUF, 0);
return (error);
}
-/* $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>
*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);
}
-/* $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>
== 0) {
if (config_detach(gdev->sc_dev, 0) == 0) {
LIST_REMOVE(gdev, sc_next);
- free(gdev, M_DEVBUF);
+ free(gdev, M_DEVBUF, 0);
}
break;
}
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;
}
}
-/* $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
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) {
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 */
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) {
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);
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);
}
}
-/* $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
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);
}
-/* $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>
/* 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);
* 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);
-/* $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>
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)
/* bus_space(9) says we dont free the subregions handle */
- free(ap, M_DEVBUF);
+ free(ap, M_DEVBUF, 0);
sc->sc_ports[port] = NULL;
}
destroy:
bus_dmamap_destroy(sc->sc_dmat, adm->adm_map);
admfree:
- free(adm, M_DEVBUF);
+ free(adm, M_DEVBUF, 0);
return (NULL);
}
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
-/* $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
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
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);
}
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;
}
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;
}
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 */
}
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 */
}
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 */
}
/* 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;
}
/* 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;
}
/* 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;
}
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;
}
}
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);
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;
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? */
-/* $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
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
-/* $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 $ */
/*
* 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
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
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;
}
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;
}
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*/
break;
}
if (scb_data->scbarray != NULL)
- free(scb_data->scbarray, M_DEVBUF);
+ free(scb_data->scbarray, M_DEVBUF, 0);
}
void
(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;
}
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;
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? */
-/* $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 $ */
/*
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
-/* $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 $ */
/*
* 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 $
*/
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 {
-/* $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
destroy:
bus_dmamap_destroy(sc->sc_dmat, am->am_map);
amfree:
- free(am, M_DEVBUF);
+ free(am, M_DEVBUF, 0);
return (NULL);
}
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
ami_freemem(sc, sc->sc_ccbmem_am);
free_ccbs:
- free(sc->sc_ccbs, M_DEVBUF);
+ free(sc->sc_ccbs, M_DEVBUF, 0);
return (1);
}
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);
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);
}
done:
error = 0;
bail:
- free(p, M_DEVBUF);
+ free(p, M_DEVBUF, 0);
dma_free(vpdbuf, sizeof(*vpdbuf));
dma_free(inqbuf, sizeof(*inqbuf));
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);
}
-/* $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>
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) {
-/* $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>
/*
* Free HAL structure, assume interrupts are down
*/
- free(hal, M_DEVBUF);
+ free(hal, M_DEVBUF, 0);
}
HAL_BOOL
-/* $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>
/*
* Free HAL structure, assume interrupts are down
*/
- free(hal, M_DEVBUF);
+ free(hal, M_DEVBUF, 0);
}
HAL_BOOL
-/* $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>
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
-/* $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>
return (hal);
failed:
- free(hal, M_DEVBUF);
+ free(hal, M_DEVBUF, 0);
return (NULL);
}
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);
}
-/* $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>
if (error == 0)
ops->swap_rom(sc);
#endif
- free(buf, M_DEVBUF);
+ free(buf, M_DEVBUF, 0);
return (error);
}
if (bf->bf_m != NULL)
m_freem(bf->bf_m);
}
- free(rxq->bf, M_DEVBUF);
+ free(rxq->bf, M_DEVBUF, 0);
}
void
-/* $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 $ */
/*-
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;
}
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;
}
/* 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",
-/* $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>
}
/* Free ROM copy. */
if (sc->eep != NULL)
- free(sc->eep, M_DEVBUF);
+ free(sc->eep, M_DEVBUF, 0);
ieee80211_ifdetach(ifp);
if_detach(ifp);
-/* $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 $ */
/*-
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
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);
}
-/* $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.
}
}
- free(h, M_DEVBUF);
+ free(h, M_DEVBUF, 0);
return (ret);
}
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;
}
}
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
-/* $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 $ */
/*
return (0);
bad:
- free(sc->sc_sensors, M_DEVBUF);
+ free(sc->sc_sensors, M_DEVBUF, 0);
return (1);
}
-/* $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
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);
}
-/* $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
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);
-/* $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 $ */
/*
#ifndef SMALL_KERNEL
if (sc->sc_ucodebuf)
- free(sc->sc_ucodebuf, M_DEVBUF);
+ free(sc->sc_ucodebuf, M_DEVBUF, 0);
#endif
}
-/* $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 $ */
/*
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);
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);
default:
panic("pcic_event_thread: unknown event %d", pe->pe_type);
}
- free(pe, M_TEMP);
+ free(pe, M_TEMP, 0);
}
void
-/* $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 $ */
/*-
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;
-/* $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
na->na_nodes++;
}
if (nr)
- free(nr, M_DEVBUF);
+ free(nr, M_DEVBUF, 0);
break;
}
case SIOCG80211FLAGS:
}
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;
-/* $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
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);
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--;
}
}
sta->flags |= WI_SIFLAGS_AUTHEN;
- free(sta->challenge, M_TEMP);
+ free(sta->challenge, M_TEMP, 0);
sta->challenge = NULL;
challenge_len = 0;
break;
-/* $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>
if (data->map != NULL)
bus_dmamap_destroy(sc->sc_dmat, data->map);
}
- free(ring->data, M_DEVBUF);
+ free(ring->data, M_DEVBUF, 0);
}
}
if (data->map != NULL)
bus_dmamap_destroy(sc->sc_dmat, data->map);
}
- free(ring->data, M_DEVBUF);
+ free(ring->data, M_DEVBUF, 0);
}
}
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);
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);
-/* $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>
*
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);
}
destroy:
bus_dmamap_destroy(sc->sc_dmat, mm->am_map);
amfree:
- free(mm, M_DEVBUF);
+ free(mm, M_DEVBUF, 0);
return (NULL);
}
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
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;
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);
}
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 */
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)
rv = 0;
freeme:
- free(pd, M_DEVBUF);
+ free(pd, M_DEVBUF, 0);
return (rv);
}
rv = 0;
done:
- free(pd, M_DEVBUF);
+ free(pd, M_DEVBUF, 0);
return (rv);
}
rv = 0;
done:
- free(pd, M_DEVBUF);
+ free(pd, M_DEVBUF, 0);
return (rv);
}
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);
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);
}
return (0);
bad:
- free(sc->sc_sensors, M_DEVBUF);
+ free(sc->sc_sensors, M_DEVBUF, 0);
return (1);
}
-/* $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>
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);
}
}
out:
- free(physdisk_pg, M_TEMP);
+ free(physdisk_pg, M_TEMP, 0);
}
int
}
out:
- free(pg, M_TEMP);
+ free(pg, M_TEMP, 0);
return (rv);
}
destroy:
bus_dmamap_destroy(sc->sc_dmat, mdm->mdm_map);
mdmfree:
- free(mdm, M_DEVBUF);
+ free(mdm, M_DEVBUF, 0);
return (NULL);
}
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
mpi_dmamem_free(sc, sc->sc_requests);
free_ccbs:
- free(sc->sc_ccbs, M_DEVBUF);
+ free(sc->sc_ccbs, M_DEVBUF, 0);
return (1);
}
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);
}
if (rv == 0)
SET(link->flags, SDEV_VIRTUAL);
- free(rp0, M_TEMP);
+ free(rp0, M_TEMP, 0);
return (0);
}
rv = 0;
out:
- free(pg, M_TEMP);
+ free(pg, M_TEMP, 0);
return (rv);
}
sc->sc_flags |= MPI_F_RAID;
out:
- free(vol_page, M_TEMP);
+ free(vol_page, M_TEMP, 0);
}
int
scsi_io_put(&sc->sc_iopool, ccb);
done:
- free(rpg0, M_TEMP);
+ free(rpg0, M_TEMP, 0);
return (rv);
}
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 */
return (0);
bad:
- free(sc->sc_sensors, M_DEVBUF);
+ free(sc->sc_sensors, M_DEVBUF, 0);
return (1);
}
-/* $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 $ */
/*
ti->lun[lun] = NULL;
splx(s);
- free(li, M_DEVBUF);
+ free(li, M_DEVBUF, 0);
}
/*
-/* $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>
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 *
free_sq:
nvme_dmamem_free(sc, q->q_sq_dmamem);
free:
- free(q, M_DEVBUF);
+ free(q, M_DEVBUF, 0);
return (NULL);
}
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
destroy:
bus_dmamap_destroy(sc->sc_dmat, ndm->ndm_map);
ndmfree:
- free(ndm, M_DEVBUF);
+ free(ndm, M_DEVBUF, 0);
return (NULL);
}
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);
}
-/* $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>
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);
}
pgt_write_memory_barrier(sc);
DELAY(PGT_WRITEIO_DELAY);
- free(ucode, M_DEVBUF);
+ free(ucode, M_DEVBUF, 0);
return (0);
}
struct pgt_ieee80211_node *pin;
pin = (struct pgt_ieee80211_node *)ni;
- free(pin, M_DEVBUF);
+ free(pin, M_DEVBUF, 0);
}
void
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);
}
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);
}
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);
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:
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;
}
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;
}
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;
}
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;
pd->pd_dmam = NULL;
}
bus_dmamem_free(sc->sc_dmat, &pd->pd_dmas, 1);
- free(pd, M_DEVBUF);
+ free(pd, M_DEVBUF, 0);
}
}
-/* $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>
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);
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)) {
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);
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;
}
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"
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);
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",
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);
destroy:
bus_dmamap_destroy(sc->sc_dmat, m->qdm_map);
qdmfree:
- free(m, M_DEVBUF);
+ free(m, M_DEVBUF, 0);
return (NULL);
}
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
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);
}
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 *
-/* $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>
destroy:
bus_dmamap_destroy(sc->sc_dmat, m->qdm_map);
qdmfree:
- free(m, M_DEVBUF);
+ free(m, M_DEVBUF, 0);
return (NULL);
}
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
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);
}
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 *
-/* $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
if (data->map != NULL)
bus_dmamap_destroy(sc->sc_dmat, data->map);
}
- free(ring->data, M_DEVBUF);
+ free(ring->data, M_DEVBUF, 0);
}
}
if (data->map != NULL)
bus_dmamap_destroy(sc->sc_dmat, data->map);
}
- free(ring->data, M_DEVBUF);
+ free(ring->data, M_DEVBUF, 0);
}
}
-/* $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
rt2661_free_rx_ring(sc, &sc->rxq);
if (sc->ucode != NULL)
- free(sc->ucode, M_DEVBUF);
+ free(sc->ucode, M_DEVBUF, 0);
return 0;
}
if (data->map != NULL)
bus_dmamap_destroy(sc->sc_dmat, data->map);
}
- free(ring->data, M_DEVBUF);
+ free(ring->data, M_DEVBUF, 0);
}
}
if (data->map != NULL)
bus_dmamap_destroy(sc->sc_dmat, data->map);
}
- free(ring->data, M_DEVBUF);
+ free(ring->data, M_DEVBUF, 0);
}
}
TAILQ_REMOVE(&sc->amn, amn, entry);
sc->amn_count--;
splx(s);
- free(amn, M_DEVBUF);
+ free(amn, M_DEVBUF, 0);
}
void
-/* $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>
rt2860_free_tx_pool(sc);
if (sc->ucode != NULL)
- free(sc->ucode, M_DEVBUF);
+ free(sc->ucode, M_DEVBUF, 0);
return 0;
}
-/* $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 $ */
/*-
/* 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 */
}
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;
}
}
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;
}
-/* $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>
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);
}
}
/* 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;
}
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;
}
destroy:
bus_dmamap_destroy(sc->sc_dmat, sdm->sdm_map);
sdmfree:
- free(sdm, M_DEVBUF);
+ free(sdm, M_DEVBUF, 0);
return (NULL);
}
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
-/* $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 $ */
/*
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 */
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",
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++)
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;
}
#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 */
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--;
}
destroy:
bus_dmamap_destroy(sc->sc_c.sc_dmat, sdm->sdm_map);
sdmfree:
- free(sdm, M_DEVBUF);
+ free(sdm, M_DEVBUF, 0);
return (NULL);
}
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);
}
-/* $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
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);
}
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);
}
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;
}
}
}
- free(scr->scr_romfont, M_DEVBUF);
+ free(scr->scr_romfont, M_DEVBUF, 0);
scr->scr_romfont = NULL;
}
#endif
-/* $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
panic("tcic_event_thread: unknown event %d",
pe->pe_type);
}
- free(pe, M_TEMP);
+ free(pe, M_TEMP, 0);
}
h->event_thread = NULL;
-/* $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
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,
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);
}
/*
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);
}
}
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. */
-/* $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
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;
-/* $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 $ */
/*-
* 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");
-/* $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 $ */
/*
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;
}
}
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);
}
-/* $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.
void
wdc_free_queue(struct channel_queue *queue)
{
- free(queue, M_DEVBUF);
+ free(queue, M_DEVBUF, 0);
}
void
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;
-/* $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
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 */
*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 */
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);
}
-/* $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 $ */
/*-
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:
/* ...and wait for it to complete */
rv = biowait(bp);
- free(bp, M_TEMP);
+ free(bp, M_TEMP, 0);
return (rv);
}
-/* $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 $ */
/*-
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. */
/* 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);
-/* $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 $ */
/*
if (autoconf_verbose)
printf(">>> probing for %s* finished\n",
cf->cf_driver->cd_name);
- free(dev, M_DEVBUF);
+ free(dev, M_DEVBUF, 0);
return;
}
!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)
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);
}
}
-/* $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 $ */
/*-
*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
-/* $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 $ */
/*
return best;
}
- free(best, M_DEVBUF);
+ free(best, M_DEVBUF, 0);
continue;
}
else {
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;
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;
}
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 */
}
-/* $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 $ */
/*
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;
isapnp_merge(pa, d);
pa = d->ipa_child;
- free(d, M_DEVBUF);
+ free(d, M_DEVBUF, 0);
}
if (c == NULL)
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,
-/* $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 $ */
/*
return (ENXIO);
else {
tone(0, 0);
- free(spkr_inbuf, M_DEVBUF);
+ free(spkr_inbuf, M_DEVBUF, 0);
spkr_active = 0;
}
return (0);
-/* $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 $ */
/*
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:
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
node1 = SLIST_FIRST(symlist);
while (node1 != NULL) {
node2 = SLIST_NEXT(node1, links);
- free(node1);
+ free(node1, 0);
node1 = node2;
}
SLIST_INIT(symlist);
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");
fprintf(ofile, "#define\t%-8s\t0x%02x\n",
curnode->symbol->name,
curnode->symbol->info.cinfo->value);
- free(curnode);
+ free(curnode, 0);
}
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);
fprintf(ofile, "#define\tLABEL_%-8s\t0x%02x\n",
curnode->symbol->name,
curnode->symbol->info.linfo->address);
- free(curnode);
+ free(curnode, 0);
}
}
-/* $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>
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);
write_firmware(FILENAME_XI90_RV2P, rh, sizeof(*rh), chunks_xi90_rv2p,
nitems(chunks_xi90_rv2p));
- free(rh);
+ free(rh, 0);
return 0;
}
-/* $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>
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);
}
-/* $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>
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);
/* 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);
-/* $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>
err(1, "%s", FILENAME);
if (rlen != len)
errx(1, "%s: short write", FILENAME);
- free(kf);
+ free(kf, 0);
close(fd);
return 0;
}
-/* $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>
} while (total < ulen);
printf("%s: len %zu -> %zu\n", file, len, ulen);
- free(ufw);
+ free(ufw, 0);
fclose(f);
}
-/* $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>
err(1, "%s", name);
if (rlen != len)
errx(1, "%s: short write", name);
- free(tf);
+ free(tf, 0);
close(fd);
}
-/* $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>
err(1, "%s", FILENAME);
if (rlen != len)
errx(1, "%s: short write", FILENAME);
- free(yf);
+ free(yf, 0);
close(fd);
return 0;
}