Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 cpu_attach: use kmem_zalloc instead of memset.
details: https://anonhg.NetBSD.org/src/rev/6cbbfbd5f995
branches: trunk
changeset: 756182:6cbbfbd5f995
user: rmind <rmind%NetBSD.org@localhost>
date: Thu Jul 08 11:22:24 2010 +0000
description:
cpu_attach: use kmem_zalloc instead of memset.
diffstat:
sys/arch/x86/x86/cpu.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r 9db43ba1d5a8 -r 6cbbfbd5f995 sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c Thu Jul 08 09:42:08 2010 +0000
+++ b/sys/arch/x86/x86/cpu.c Thu Jul 08 11:22:24 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.71 2010/07/06 20:50:35 cegger Exp $ */
+/* $NetBSD: cpu.c,v 1.72 2010/07/08 11:22:24 rmind Exp $ */
/*-
* Copyright (c) 2000, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.71 2010/07/06 20:50:35 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.72 2010/07/08 11:22:24 rmind Exp $");
#include "opt_ddb.h"
#include "opt_mpbios.h" /* for MPDEBUG */
@@ -300,10 +300,9 @@
return;
}
aprint_naive(": Application Processor\n");
- ptr = (uintptr_t)kmem_alloc(sizeof(*ci) + CACHE_LINE_SIZE - 1,
+ ptr = (uintptr_t)kmem_zalloc(sizeof(*ci) + CACHE_LINE_SIZE - 1,
KM_SLEEP);
ci = (struct cpu_info *)roundup2(ptr, CACHE_LINE_SIZE);
- memset(ci, 0, sizeof(*ci));
ci->ci_curldt = -1;
#ifdef TRAPLOG
ci->ci_tlog_base = kmem_zalloc(sizeof(struct tlog), KM_SLEEP);
Home |
Main Index |
Thread Index |
Old Index