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 Wait until all cpus are online, before usin...
details: https://anonhg.NetBSD.org/src/rev/9a0ceecc8407
branches: trunk
changeset: 333918:9a0ceecc8407
user: cherry <cherry%NetBSD.org@localhost>
date: Sat Nov 22 06:45:08 2014 +0000
description:
Wait until all cpus are online, before using the codepath
which syncs all per-cpu cached copies of L4 tables.
(On both x86_64 and i386/pae)
This avoids an early bootup mutex use before mutex init situation.
Reported by manu@
diffstat:
sys/arch/x86/x86/pmap.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (28 lines):
diff -r 9520d9143dd9 -r 9a0ceecc8407 sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c Sat Nov 22 01:28:13 2014 +0000
+++ b/sys/arch/x86/x86/pmap.c Sat Nov 22 06:45:08 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.184 2014/10/14 06:59:58 bouyer Exp $ */
+/* $NetBSD: pmap.c,v 1.185 2014/11/22 06:45:08 cherry Exp $ */
/*-
* Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.184 2014/10/14 06:59:58 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.185 2014/11/22 06:45:08 cherry Exp $");
#include "opt_user_ldt.h"
#include "opt_lockdebug.h"
@@ -4187,8 +4187,7 @@
pmap_pte_set(&pdep[i], pte);
#if defined(PAE) || defined(__x86_64__)
if (level == PTP_LEVELS && i >= PDIR_SLOT_KERN) {
- if (__predict_true(
- cpu_info_primary.ci_flags & CPUF_PRESENT)) {
+ if (__predict_true(mp_online == true)) {
/* update per-cpu PMDs on all cpus */
xen_kpm_sync(pmap_kernel(), i);
} else {
Home |
Main Index |
Thread Index |
Old Index