Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/xen/x86 - cpu_hatch: call tlbflushg(), just to make...
details: https://anonhg.NetBSD.org/src/rev/4f6aa210b773
branches: trunk
changeset: 766110:4f6aa210b773
user: rmind <rmind%NetBSD.org@localhost>
date: Wed Jun 15 19:54:16 2011 +0000
description:
- cpu_hatch: call tlbflushg(), just to make sure that TLB is clean.
- xen_bootstrap_tables: call xpq_queue_tlb_flush() for safety.
- Initialise cpus_attached and ci_cpumask for primary CPU.
diffstat:
sys/arch/xen/x86/cpu.c | 8 +++++---
sys/arch/xen/x86/x86_xpmap.c | 5 +++--
2 files changed, 8 insertions(+), 5 deletions(-)
diffs (69 lines):
diff -r b4e7d46a8fe6 -r 4f6aa210b773 sys/arch/xen/x86/cpu.c
--- a/sys/arch/xen/x86/cpu.c Wed Jun 15 19:51:50 2011 +0000
+++ b/sys/arch/xen/x86/cpu.c Wed Jun 15 19:54:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.57 2011/06/12 03:35:50 rmind Exp $ */
+/* $NetBSD: cpu.c,v 1.58 2011/06/15 19:54:16 rmind Exp $ */
/* NetBSD: cpu.c,v 1.18 2004/02/20 17:35:01 yamt Exp */
/*-
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.57 2011/06/12 03:35:50 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.58 2011/06/15 19:54:16 rmind Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
@@ -157,6 +157,7 @@
.ci_idepth = -1,
.ci_curlwp = &lwp0,
.ci_curldt = -1,
+ .ci_cpumask = 1,
#ifdef TRAPLOG
.ci_tlog = &tlog_primary,
#endif
@@ -172,7 +173,7 @@
static void cpu_set_tss_gates(struct cpu_info *ci);
-uint32_t cpus_attached = 0;
+uint32_t cpus_attached = 1;
uint32_t cpus_running = 0;
uint32_t phycpus_attached = 0;
@@ -739,6 +740,7 @@
/* Because the text may have been patched in x86_patch(). */
wbinvd();
x86_flush();
+ tlbflushg();
KASSERT((ci->ci_flags & CPUF_RUNNING) == 0);
diff -r b4e7d46a8fe6 -r 4f6aa210b773 sys/arch/xen/x86/x86_xpmap.c
--- a/sys/arch/xen/x86/x86_xpmap.c Wed Jun 15 19:51:50 2011 +0000
+++ b/sys/arch/xen/x86/x86_xpmap.c Wed Jun 15 19:54:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x86_xpmap.c,v 1.26 2011/05/08 00:18:25 jym Exp $ */
+/* $NetBSD: x86_xpmap.c,v 1.27 2011/06/15 19:54:16 rmind Exp $ */
/*
* Copyright (c) 2006 Mathieu Ropert <mro%adviseo.fr@localhost>
@@ -69,7 +69,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.26 2011/05/08 00:18:25 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.27 2011/06/15 19:54:16 rmind Exp $");
#include "opt_xen.h"
#include "opt_ddb.h"
@@ -854,6 +854,7 @@
pte++;
}
xpq_flush_queue();
+ xpq_queue_tlb_flush();
}
Home |
Main Index |
Thread Index |
Old Index