Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2/drm Use kmem for drm_sg_mem r...
details: https://anonhg.NetBSD.org/src/rev/fb5d01d97757
branches: riastradh-drm2
changeset: 788368:fb5d01d97757
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 03:27:52 2013 +0000
description:
Use kmem for drm_sg_mem records in local drm_scatter.c.
diffstat:
sys/external/bsd/drm2/drm/drm_scatter.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r c2b0ce7210f3 -r fb5d01d97757 sys/external/bsd/drm2/drm/drm_scatter.c
--- a/sys/external/bsd/drm2/drm/drm_scatter.c Wed Jul 24 03:27:35 2013 +0000
+++ b/sys/external/bsd/drm2/drm/drm_scatter.c Wed Jul 24 03:27:52 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_scatter.c,v 1.1.2.1 2013/07/24 02:46:33 riastradh Exp $ */
+/* $NetBSD: drm_scatter.c,v 1.1.2.2 2013/07/24 03:27:52 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_scatter.c,v 1.1.2.1 2013/07/24 02:46:33 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_scatter.c,v 1.1.2.2 2013/07/24 03:27:52 riastradh Exp $");
#include <sys/types.h>
#include <sys/bus.h>
@@ -131,7 +131,8 @@
* Allocate a drm_sg_mem record.
*/
struct drm_sg_mem *const sg =
- kzalloc(offsetof(struct drm_sg_mem, sg_segs[npages]), GFP_ATOMIC);
+ kmem_zalloc(offsetof(struct drm_sg_mem, sg_segs[npages]),
+ KM_NOSLEEP);
if (sg == NULL)
return -ENOMEM;
sg->sg_tag = dev->dmat;
@@ -215,5 +216,5 @@
KASSERT(sg->sg_nsegs <= (unsigned int)INT_MAX);
bus_dmamem_free(sg->sg_tag, sg->sg_segs, (int)sg->sg_nsegs);
sg->sg_tag = NULL; /* XXX paranoia */
- kfree(sg);
+ kmem_free(sg, offsetof(struct drm_sg_mem, sg_segs[sg->sg_nsegs_max]));
}
Home |
Main Index |
Thread Index |
Old Index