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 Use uvm_km_alloc instead of kmem_zalloc.



details:   https://anonhg.NetBSD.org/src/rev/687135376832
branches:  trunk
changeset: 828843:687135376832
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Jan 07 10:16:13 2018 +0000

description:
Use uvm_km_alloc instead of kmem_zalloc.

diffstat:

 sys/arch/x86/x86/cpu.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r 0689ff6544e6 -r 687135376832 sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c    Sun Jan 07 03:35:43 2018 +0000
+++ b/sys/arch/x86/x86/cpu.c    Sun Jan 07 10:16:13 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.142 2018/01/05 08:04:21 maxv Exp $   */
+/*     $NetBSD: cpu.c,v 1.143 2018/01/07 10:16:13 maxv Exp $   */
 
 /*
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.142 2018/01/05 08:04:21 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.143 2018/01/07 10:16:13 maxv Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"                /* for MPDEBUG */
@@ -76,7 +76,6 @@
 #include <sys/proc.h>
 #include <sys/systm.h>
 #include <sys/device.h>
-#include <sys/kmem.h>
 #include <sys/cpu.h>
 #include <sys/cpufreq.h>
 #include <sys/idle.h>
@@ -342,8 +341,9 @@
                        return;
                }
                aprint_naive(": Application Processor\n");
-               ptr = (uintptr_t)kmem_zalloc(sizeof(*ci) + CACHE_LINE_SIZE - 1,
-                   KM_SLEEP);
+               ptr = (uintptr_t)uvm_km_alloc(kernel_map,
+                   sizeof(*ci) + CACHE_LINE_SIZE - 1, 0,
+                   UVM_KMF_WIRED|UVM_KMF_ZERO);
                ci = (struct cpu_info *)roundup2(ptr, CACHE_LINE_SIZE);
                ci->ci_curldt = -1;
        } else {



Home | Main Index | Thread Index | Old Index