summaryrefslogtreecommitdiff
path: root/sys/arch/aviion
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/aviion')
-rw-r--r--sys/arch/aviion/aviion/bus_dma.c7
-rw-r--r--sys/arch/aviion/aviion/disksubr.c4
-rw-r--r--sys/arch/aviion/dev/dma.c4
-rw-r--r--sys/arch/aviion/dev/vme.c4
4 files changed, 11 insertions, 8 deletions
diff --git a/sys/arch/aviion/aviion/bus_dma.c b/sys/arch/aviion/aviion/bus_dma.c
index b19db9be109..ab4fb8dba38 100644
--- a/sys/arch/aviion/aviion/bus_dma.c
+++ b/sys/arch/aviion/aviion/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.9 2014/11/16 12:30:56 deraadt Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.10 2014/12/24 22:48:27 miod Exp $ */
/* $NetBSD: bus_dma.c,v 1.2 2001/06/10 02:31:25 briggs Exp $ */
/*-
@@ -112,8 +112,11 @@ bus_dmamap_destroy(t, map)
bus_dma_tag_t t;
bus_dmamap_t map;
{
+ size_t mapsize;
- free(map, M_DEVBUF, 0);
+ mapsize = sizeof(struct m88k_bus_dmamap) +
+ (sizeof(bus_dma_segment_t) * (map->_dm_segcnt - 1));
+ free(map, M_DEVBUF, mapsize);
}
/*
diff --git a/sys/arch/aviion/aviion/disksubr.c b/sys/arch/aviion/aviion/disksubr.c
index d5f95c0b8b1..ec99fce60b8 100644
--- a/sys/arch/aviion/aviion/disksubr.c
+++ b/sys/arch/aviion/aviion/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.59 2014/07/12 18:44:41 tedu Exp $ */
+/* $OpenBSD: disksubr.c,v 1.60 2014/12/24 22:48:27 miod Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
@@ -450,7 +450,7 @@ readvditlabel(struct buf *bp, void (*strat)(struct buf *), struct disklabel *lp,
}
done:
- free(vdit_storage, M_DEVBUF, 0);
+ free(vdit_storage, M_DEVBUF, vdit_size);
if (sbp != NULL) {
sbp->b_flags |= B_INVAL;
brelse(sbp);
diff --git a/sys/arch/aviion/dev/dma.c b/sys/arch/aviion/dev/dma.c
index 0555d99c1d6..66329451895 100644
--- a/sys/arch/aviion/dev/dma.c
+++ b/sys/arch/aviion/dev/dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dma.c,v 1.2 2014/07/12 18:44:41 tedu Exp $ */
+/* $OpenBSD: dma.c,v 1.3 2014/12/24 22:48:27 miod Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
@@ -139,7 +139,7 @@ dma_intr(void *v)
if (req->cbdone != NULL)
(*req->cbdone)(req->cbarg);
- free(req, M_DEVBUF, 0);
+ free(req, M_DEVBUF, sizeof *req);
} else {
req->mem += req->lastcnt;
}
diff --git a/sys/arch/aviion/dev/vme.c b/sys/arch/aviion/dev/vme.c
index 90fc6b86e6f..8384063675d 100644
--- a/sys/arch/aviion/dev/vme.c
+++ b/sys/arch/aviion/dev/vme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vme.c,v 1.15 2014/11/16 12:30:56 deraadt Exp $ */
+/* $OpenBSD: vme.c,v 1.16 2014/12/24 22:48:27 miod Exp $ */
/*
* Copyright (c) 2006, 2007, 2010 Miodrag Vallat.
*
@@ -836,7 +836,7 @@ vmebus_get_bst(struct device *vsc, u_int aspace, u_int dspace,
void
vmebus_release_bst(struct device *vsc, bus_space_tag_t b)
{
- free((void *)b, M_DEVBUF, 0);
+ free((void *)b, M_DEVBUF, sizeof(struct aviion_bus_space_tag));
}
/*