Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 Do not use kmem_zalloc() to allocat...
details: https://anonhg.NetBSD.org/src/rev/1f5bfd7b774f
branches: trunk
changeset: 350274:1f5bfd7b774f
user: martin <martin%NetBSD.org@localhost>
date: Mon Jan 09 12:24:38 2017 +0000
description:
Do not use kmem_zalloc() to allocate an FP state - we have a special pool
for that.
diffstat:
sys/arch/sparc64/sparc64/process_machdep.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 86c68b02abc1 -r 1f5bfd7b774f sys/arch/sparc64/sparc64/process_machdep.c
--- a/sys/arch/sparc64/sparc64/process_machdep.c Mon Jan 09 10:42:45 2017 +0000
+++ b/sys/arch/sparc64/sparc64/process_machdep.c Mon Jan 09 12:24:38 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: process_machdep.c,v 1.25 2016/12/30 18:30:19 christos Exp $ */
+/* $NetBSD: process_machdep.c,v 1.26 2017/01/09 12:24:38 martin Exp $ */
/*
* Copyright (c) 1993 The Regents of the University of California.
@@ -95,7 +95,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.25 2016/12/30 18:30:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.26 2017/01/09 12:24:38 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -231,7 +231,8 @@
struct fpstate64 *fs;
if ((fs = l->l_md.md_fpstate) == NULL) {
- fs = kmem_zalloc(sizeof(*fs), KM_SLEEP);
+ fs = pool_cache_get(fpstate_cache, PR_WAITOK);
+ memcpy(fs, &initfpstate, sizeof *fs);
l->l_md.md_fpstate = fs;
} else
fs->fs_qsize = 0;
Home |
Main Index |
Thread Index |
Old Index