Module Name: src
Committed By: bouyer
Date: Fri Mar 2 16:37:38 UTC 2012
Modified Files:
src/sys/arch/xen/x86: x86_xpmap.c
Log Message:
MMUEXT_INVLPG_MULTI and MMUEXT_TLB_FLUSH_MULTI use a long as cpu mask,
not uint32_t, so pass a pointer of the right type.
While there, cleanup includes and delete local, redundant define of PG_k.
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/xen/x86/x86_xpmap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/xen/x86/x86_xpmap.c
diff -u src/sys/arch/xen/x86/x86_xpmap.c:1.41 src/sys/arch/xen/x86/x86_xpmap.c:1.42
--- src/sys/arch/xen/x86/x86_xpmap.c:1.41 Fri Feb 24 08:06:08 2012
+++ src/sys/arch/xen/x86/x86_xpmap.c Fri Mar 2 16:37:38 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: x86_xpmap.c,v 1.41 2012/02/24 08:06:08 cherry Exp $ */
+/* $NetBSD: x86_xpmap.c,v 1.42 2012/03/02 16:37:38 bouyer Exp $ */
/*
* Copyright (c) 2006 Mathieu Ropert <[email protected]>
@@ -69,7 +69,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.41 2012/02/24 08:06:08 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.42 2012/03/02 16:37:38 bouyer Exp $");
#include "opt_xen.h"
#include "opt_ddb.h"
@@ -78,10 +78,11 @@ __KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mutex.h>
+#include <sys/cpu.h>
#include <uvm/uvm.h>
-#include <machine/pmap.h>
+#include <x86/pmap.h>
#include <machine/gdt.h>
#include <xen/xenfunc.h>
@@ -106,13 +107,6 @@ static char XBUF[256];
#define PRINTF(x) printf x
#define PRINTK(x) printk x
-/* on x86_64 kernel runs in ring 3 */
-#ifdef __x86_64__
-#define PG_k PG_u
-#else
-#define PG_k 0
-#endif
-
volatile shared_info_t *HYPERVISOR_shared_info;
/* Xen requires the start_info struct to be page aligned */
union start_info_union start_info_union __aligned(PAGE_SIZE);
@@ -371,13 +365,14 @@ void
xen_mcast_invlpg(vaddr_t va, uint32_t cpumask)
{
mmuext_op_t op;
+ u_long xcpumask = cpumask;
/* Flush pending page updates */
xpq_flush_queue();
op.cmd = MMUEXT_INVLPG_MULTI;
op.arg1.linear_addr = va;
- op.arg2.vcpumask = &cpumask;
+ op.arg2.vcpumask = &xcpumask;
if (HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0) {
panic("xpq_queue_invlpg_all");
@@ -409,12 +404,13 @@ void
xen_mcast_tlbflush(uint32_t cpumask)
{
mmuext_op_t op;
+ u_long xcpumask = cpumask;
/* Flush pending page updates */
xpq_flush_queue();
op.cmd = MMUEXT_TLB_FLUSH_MULTI;
- op.arg2.vcpumask = &cpumask;
+ op.arg2.vcpumask = &xcpumask;
if (HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0) {
panic("xpq_queue_invlpg_all");