Module Name:    src
Committed By:   rmind
Date:           Mon Oct  5 23:59:31 UTC 2009

Modified Files:
        src/sys/arch/amd64/amd64: machdep.c
        src/sys/arch/i386/i386: machdep.c
        src/sys/arch/x86/conf: files.x86
        src/sys/arch/x86/include: cpu_msr.h intrdefs.h
        src/sys/arch/x86/x86: est.c iclockmod.c ipi.c powernow_k8.c
            x86_machdep.c
        src/sys/arch/xen/conf: files.xen
Removed Files:
        src/sys/arch/x86/x86: msr_ipifuncs.c

Log Message:
Remove X86_IPI_WRITE_MSR (and msr_ipifuncs.c), replace all uses in drivers
with xc_broadcast().  AMD K8 PowerNow driver tested by <jakllsch>, thanks!

Closes PR/37665.


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.671 -r1.672 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/x86/conf/files.x86
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x86/include/cpu_msr.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/x86/include/intrdefs.h
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/x86/x86/est.c \
    src/sys/arch/x86/x86/iclockmod.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x86/x86/ipi.c
cvs rdiff -u -r1.15 -r0 src/sys/arch/x86/x86/msr_ipifuncs.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/x86/x86/powernow_k8.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/x86/x86/x86_machdep.c
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/xen/conf/files.xen

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/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.132 src/sys/arch/amd64/amd64/machdep.c:1.133
--- src/sys/arch/amd64/amd64/machdep.c:1.132	Tue Aug 18 16:41:02 2009
+++ src/sys/arch/amd64/amd64/machdep.c	Mon Oct  5 23:59:30 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.132 2009/08/18 16:41:02 jmcneill Exp $	*/
+/*	$NetBSD: machdep.c,v 1.133 2009/10/05 23:59:30 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
@@ -112,7 +112,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.132 2009/08/18 16:41:02 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.133 2009/10/05 23:59:30 rmind Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -180,7 +180,6 @@
 #include <machine/mpbiosvar.h>
 
 #include <x86/cputypes.h>
-#include <x86/cpu_msr.h>
 #include <x86/cpuvar.h>
 #include <x86/machdep.h>
 
@@ -1535,8 +1534,6 @@
 	splraise(IPL_HIGH);
 	x86_enable_intr();
 
-	x86_init();
-
 #ifdef DDB
 	if (boothowto & RB_KDB)
 		Debugger();

Index: src/sys/arch/i386/i386/machdep.c
diff -u src/sys/arch/i386/i386/machdep.c:1.671 src/sys/arch/i386/i386/machdep.c:1.672
--- src/sys/arch/i386/i386/machdep.c:1.671	Tue Aug 18 16:41:02 2009
+++ src/sys/arch/i386/i386/machdep.c	Mon Oct  5 23:59:30 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.671 2009/08/18 16:41:02 jmcneill Exp $	*/
+/*	$NetBSD: machdep.c,v 1.672 2009/10/05 23:59:30 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.671 2009/08/18 16:41:02 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.672 2009/10/05 23:59:30 rmind Exp $");
 
 #include "opt_beep.h"
 #include "opt_compat_ibcs2.h"
@@ -131,8 +131,6 @@
 
 #include <sys/sysctl.h>
 
-#include <x86/cpu_msr.h>
-
 #include <machine/cpu.h>
 #include <machine/cpufunc.h>
 #include <machine/cpuvar.h>
@@ -516,8 +514,6 @@
 	cpu_init_tss(&cpu_info_primary);
 	ltr(cpu_info_primary.ci_tss_sel);
 #endif
-
-	x86_init();
 }
 
 /*

Index: src/sys/arch/x86/conf/files.x86
diff -u src/sys/arch/x86/conf/files.x86:1.53 src/sys/arch/x86/conf/files.x86:1.54
--- src/sys/arch/x86/conf/files.x86:1.53	Fri Oct  2 18:50:03 2009
+++ src/sys/arch/x86/conf/files.x86	Mon Oct  5 23:59:31 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: files.x86,v 1.53 2009/10/02 18:50:03 jmcneill Exp $
+#	$NetBSD: files.x86,v 1.54 2009/10/05 23:59:31 rmind Exp $
 
 # options for MP configuration through the MP spec
 defflag opt_mpbios.h MPBIOS MPVERBOSE MPDEBUG MPBIOS_SCANPCI
@@ -61,7 +61,6 @@
 file	arch/x86/x86/nmi.c
 file	arch/x86/x86/idt.c
 file	arch/x86/x86/ipi.c
-file	arch/x86/x86/msr_ipifuncs.c
 file	arch/x86/x86/mtrr_i686.c	mtrr
 file 	arch/x86/x86/patch.c
 file	arch/x86/x86/platform.c

Index: src/sys/arch/x86/include/cpu_msr.h
diff -u src/sys/arch/x86/include/cpu_msr.h:1.6 src/sys/arch/x86/include/cpu_msr.h:1.7
--- src/sys/arch/x86/include/cpu_msr.h:1.6	Wed Oct 17 19:58:14 2007
+++ src/sys/arch/x86/include/cpu_msr.h	Mon Oct  5 23:59:31 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_msr.h,v 1.6 2007/10/17 19:58:14 garbled Exp $ */
+/* $NetBSD: cpu_msr.h,v 1.7 2009/10/05 23:59:31 rmind Exp $ */
 
 /*-
  * Copyright (c) 2007 Juan Romero Pardines.
@@ -29,22 +29,36 @@
 #define _X86_CPU_MSR_H
 
 #include <sys/param.h>
-#include <machine/cpu.h>
+#include <sys/types.h>
 
 #ifdef _KERNEL
 
-struct msr_cpu_broadcast {
-	int msr_read;
-	int msr_type;
-	uint64_t msr_value;
-	uint64_t msr_mask;
+struct msr_rw_info {
+	int		msr_read;
+	int		msr_type;
+	uint64_t	msr_value;
+	uint64_t	msr_mask;
 };
 
-void		x86_init(void);
-void		msr_write_ipi(struct cpu_info *);
-void		msr_cpu_broadcast_initmtx(void);
-void		msr_cpu_broadcast(struct msr_cpu_broadcast *);
+static inline void
+x86_msr_xcall(void *arg1, void *arg2)
+{
+	struct msr_rw_info *msrdat = arg1;
+	uint64_t msr = 0;
+
+	KASSERT(msrdat->msr_type != 0);
+
+	/* Read the MSR requested and apply the mask if defined. */
+	if (msrdat->msr_read) {
+		msr = rdmsr(msrdat->msr_type);
+		if (msrdat->msr_mask) {
+			msr &= ~msrdat->msr_mask;
+		}
+	}
+	/* Assign (or extract, on read) the value and perform the write. */
+	msr |= msrdat->msr_value;
+	wrmsr(msrdat->msr_type, msr);
+}
 
 #endif /* ! _KERNEL */
-
 #endif /* ! _X86_CPU_MSR_H */

Index: src/sys/arch/x86/include/intrdefs.h
diff -u src/sys/arch/x86/include/intrdefs.h:1.14 src/sys/arch/x86/include/intrdefs.h:1.15
--- src/sys/arch/x86/include/intrdefs.h:1.14	Tue Nov 11 13:45:10 2008
+++ src/sys/arch/x86/include/intrdefs.h	Mon Oct  5 23:59:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: intrdefs.h,v 1.14 2008/11/11 13:45:10 ad Exp $	*/
+/*	$NetBSD: intrdefs.h,v 1.15 2009/10/05 23:59:31 rmind Exp $	*/
 
 #ifndef _X86_INTRDEFS_H_
 #define _X86_INTRDEFS_H_
@@ -58,11 +58,11 @@
 
 #define X86_IPI_HALT			0x00000001
 #define X86_IPI_MICROSET		0x00000002
-#define X86_IPI__UNUSED			0x00000004
+#define X86_IPI__UNUSED1		0x00000004
 #define X86_IPI_SYNCH_FPU		0x00000008
 #define X86_IPI_MTRR			0x00000010
 #define X86_IPI_GDT			0x00000020
-#define X86_IPI_WRITE_MSR		0x00000040
+#define X86_IPI__UNUSED2		0x00000040
 #define X86_IPI_ACPI_CPU_SLEEP		0x00000080
 #define X86_IPI_KPREEMPT		0x00000100
 
@@ -70,7 +70,7 @@
 
 #define X86_IPI_NAMES { "halt IPI", "timeset IPI", "unused", \
 			 "FPU synch IPI", "MTRR update IPI", \
-			 "GDT update IPI", "MSR write IPI", \
+			 "GDT update IPI", "unused", \
 			 "ACPI CPU sleep IPI", "kpreempt IPI" }
 
 #define IREENT_MAGIC	0x18041969

Index: src/sys/arch/x86/x86/est.c
diff -u src/sys/arch/x86/x86/est.c:1.12 src/sys/arch/x86/x86/est.c:1.13
--- src/sys/arch/x86/x86/est.c:1.12	Fri Oct  2 15:05:42 2009
+++ src/sys/arch/x86/x86/est.c	Mon Oct  5 23:59:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: est.c,v 1.12 2009/10/02 15:05:42 jmcneill Exp $	*/
+/*	$NetBSD: est.c,v 1.13 2009/10/05 23:59:31 rmind Exp $	*/
 /*
  * Copyright (c) 2003 Michael Eriksson.
  * All rights reserved.
@@ -81,7 +81,7 @@
 /* #define EST_DEBUG */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: est.c,v 1.12 2009/10/02 15:05:42 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: est.c,v 1.13 2009/10/05 23:59:31 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -89,6 +89,7 @@
 #include <sys/malloc.h>
 #include <sys/sysctl.h>
 #include <sys/once.h>
+#include <sys/xcall.h>
 
 #include <x86/cpuvar.h>
 #include <x86/cputypes.h>
@@ -1009,7 +1010,6 @@
 static int
 est_sysctl_helper(SYSCTLFN_ARGS)
 {
-	struct msr_cpu_broadcast mcb;
 	struct sysctlnode	node;
 	int			fq, oldfq, error;
 
@@ -1033,17 +1033,22 @@
 
 	/* support writing to ...frequency.target */
 	if (rnode->sysctl_num == est_node_target && fq != oldfq) {
-		int		i;
+		struct msr_rw_info msr;
+		uint64_t where;
+		int i;
 
 		for (i = est_fqlist->n - 1; i > 0; i--)
 			if (MSR2MHZ(est_fqlist->table[i], bus_clock) >= fq)
 				break;
 		fq = MSR2MHZ(est_fqlist->table[i], bus_clock);
-		mcb.msr_read = true;
-		mcb.msr_type = MSR_PERF_CTL;
-		mcb.msr_mask = 0xffffULL;
-		mcb.msr_value = est_fqlist->table[i];
-		msr_cpu_broadcast(&mcb);
+
+		msr.msr_read = true;
+		msr.msr_type = MSR_PERF_CTL;
+		msr.msr_mask = 0xffffULL;
+		msr.msr_value = est_fqlist->table[i];
+
+		where = xc_broadcast(0, (xcfunc_t)x86_msr_xcall, &msr, NULL);
+		xc_wait(where);
 	}
 
 	return 0;
Index: src/sys/arch/x86/x86/iclockmod.c
diff -u src/sys/arch/x86/x86/iclockmod.c:1.12 src/sys/arch/x86/x86/iclockmod.c:1.13
--- src/sys/arch/x86/x86/iclockmod.c:1.12	Sun May 11 14:44:54 2008
+++ src/sys/arch/x86/x86/iclockmod.c	Mon Oct  5 23:59:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: iclockmod.c,v 1.12 2008/05/11 14:44:54 ad Exp $ */
+/*	$NetBSD: iclockmod.c,v 1.13 2009/10/05 23:59:31 rmind Exp $ */
 /*      $OpenBSD: p4tcc.c,v 1.13 2006/12/20 17:50:40 gwk Exp $ */
 
 /*
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iclockmod.c,v 1.12 2008/05/11 14:44:54 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iclockmod.c,v 1.13 2009/10/05 23:59:31 rmind Exp $");
 
 #include "opt_intel_odcm.h"
 
@@ -49,6 +49,7 @@
 #include <sys/malloc.h>
 #include <sys/sysctl.h>
 #include <sys/once.h>
+#include <sys/xcall.h>
 
 #include <machine/cpu.h>
 #include <machine/cpuvar.h>
@@ -60,7 +61,6 @@
 #define ODCM_REGOFFSET		1
 #define ODCM_MAXSTATES		8
 
-static struct msr_cpu_broadcast mcb;
 static int clockmod_level;
 static int clockmod_state_target;
 static int clockmod_state_current;
@@ -111,6 +111,8 @@
 static void
 clockmod_setstate(int level)
 {
+	struct msr_rw_info msr;
+	uint64_t where;
 	int i;
 
 	for (i = 0; i < __arraycount(state); i++) {
@@ -119,16 +121,17 @@
 	}
 	KASSERT(i != __arraycount(state));
 
-	mcb.msr_read = true;
-	mcb.msr_type = MSR_THERM_CONTROL;
-	mcb.msr_mask = 0x1e;
+	msr.msr_read = true;
+	msr.msr_type = MSR_THERM_CONTROL;
+	msr.msr_mask = 0x1e;
 
 	if (state[i].reg != 0)	/* bit 0 reserved */
-		mcb.msr_value = (state[i].reg << ODCM_REGOFFSET) | ODCM_ENABLE;
+		msr.msr_value = (state[i].reg << ODCM_REGOFFSET) | ODCM_ENABLE;
 	else
-		mcb.msr_value = 0; /* max state */
+		msr.msr_value = 0; /* max state */
 
-	msr_cpu_broadcast(&mcb);
+	where = xc_broadcast(0, (xcfunc_t)x86_msr_xcall, &msr, NULL);
+	xc_wait(where);
 }
 
 static int

Index: src/sys/arch/x86/x86/ipi.c
diff -u src/sys/arch/x86/x86/ipi.c:1.15 src/sys/arch/x86/x86/ipi.c:1.16
--- src/sys/arch/x86/x86/ipi.c:1.15	Tue Aug 18 16:41:03 2009
+++ src/sys/arch/x86/x86/ipi.c	Mon Oct  5 23:59:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipi.c,v 1.15 2009/08/18 16:41:03 jmcneill Exp $	*/
+/*	$NetBSD: ipi.c,v 1.16 2009/10/05 23:59:31 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2008, 2009 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipi.c,v 1.15 2009/08/18 16:41:03 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipi.c,v 1.16 2009/10/05 23:59:31 rmind Exp $");
 
 #include "opt_mtrr.h"
 
@@ -53,8 +53,6 @@
 #include <machine/mtrr.h>
 #include <machine/gdt.h>
 
-#include <x86/cpu_msr.h>
-
 #include "acpica.h"
 
 #ifdef __x86_64__
@@ -94,7 +92,7 @@
 	x86_ipi_synch_fpu,
 	x86_ipi_reload_mtrr,
 	gdt_reload_cpu,
-	msr_write_ipi,
+	NULL,
 	acpi_cpu_sleep,
 	x86_ipi_kpreempt
 };

Index: src/sys/arch/x86/x86/powernow_k8.c
diff -u src/sys/arch/x86/x86/powernow_k8.c:1.25 src/sys/arch/x86/x86/powernow_k8.c:1.26
--- src/sys/arch/x86/x86/powernow_k8.c:1.25	Sun Aug 23 16:02:50 2009
+++ src/sys/arch/x86/x86/powernow_k8.c	Mon Oct  5 23:59:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: powernow_k8.c,v 1.25 2009/08/23 16:02:50 ahoka Exp $ */
+/*	$NetBSD: powernow_k8.c,v 1.26 2009/10/05 23:59:31 rmind Exp $ */
 /*	$OpenBSD: powernow-k8.c,v 1.8 2006/06/16 05:58:50 gwk Exp $ */
 
 /*-
@@ -59,7 +59,7 @@
 /* AMD POWERNOW K8 driver */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: powernow_k8.c,v 1.25 2009/08/23 16:02:50 ahoka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: powernow_k8.c,v 1.26 2009/10/05 23:59:31 rmind Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -67,6 +67,7 @@
 #include <sys/malloc.h>
 #include <sys/sysctl.h>
 #include <sys/once.h>
+#include <sys/xcall.h>
 
 #include <x86/cpu_msr.h>
 #include <x86/powernow.h>
@@ -78,12 +79,6 @@
 #include <machine/cpufunc.h>
 #include <machine/bus.h>
 
-#define WRITE_FIDVID(fid, vid, ctrl)		\
-	mcb.msr_read = false;			\
-	mcb.msr_value = (((ctrl) << 32) | (1ULL << 16) | ((vid) << 8) | (fid)); \
-	mcb.msr_type = MSR_AMDK7_FIDVID_CTL;	\
-	msr_cpu_broadcast(&mcb);
-
 #ifdef _MODULE
 static struct sysctllog *sysctllog;
 #define SYSCTLLOG	&sysctllog
@@ -91,11 +86,6 @@
 #define SYSCTLLOG	NULL
 #endif
 
-#define READ_PENDING_WAIT(status)				\
-	do {							\
-		(status) = rdmsr(MSR_AMDK7_FIDVID_STATUS);	\
-	} while (PN8_STA_PENDING(status))
-
 static struct powernow_cpu_state *k8pnow_current_state;
 static unsigned int cur_freq;
 static int powernow_node_target, powernow_node_current;
@@ -110,6 +100,26 @@
 static int k8_powernow_init_once(void);
 static void k8_powernow_init_main(void);
 
+static uint64_t
+k8pnow_wr_fidvid(u_int fid, uint64_t vid, uint64_t ctrl)
+{
+	struct msr_rw_info msr;
+	uint64_t where, status;
+
+	msr.msr_read = false;
+	msr.msr_value = (ctrl << 32) | (1ULL << 16) | (vid << 8) | fid;
+	msr.msr_type = MSR_AMDK7_FIDVID_CTL;
+
+	where = xc_broadcast(0, (xcfunc_t)x86_msr_xcall, &msr, NULL);
+	xc_wait(where);
+
+	do {
+		status = rdmsr(MSR_AMDK7_FIDVID_STATUS);
+	} while (PN8_STA_PENDING(status));
+
+	return status;
+}
+
 static int
 k8pnow_sysctl_helper(SYSCTLFN_ARGS)
 {
@@ -151,7 +161,6 @@
 	int cfid, cvid, fid = 0, vid = 0;
 	int rvo;
 	struct powernow_cpu_state *cstate;
-	struct msr_cpu_broadcast mcb;
 
 	/*
 	 * We dont do a k8pnow_read_pending_wait here, need to ensure that the
@@ -186,8 +195,7 @@
 	 */
 	while (cvid > vid) {
 		val = cvid - (1 << cstate->mvs);
-		WRITE_FIDVID(cfid, (val > 0) ? val : 0, 1ULL);
-		READ_PENDING_WAIT(status);
+		status = k8pnow_wr_fidvid(cfid, (val > 0) ? val : 0, 1ULL);
 		cvid = PN8_STA_CVID(status);
 		COUNT_OFF_VST(cstate->vst);
 	}
@@ -197,8 +205,7 @@
 		/* XXX It's not clear from spec if we have to do that
 		 * in 0.25 step or in MVS.  Therefore do it as it's done
 		 * under Linux */
-		WRITE_FIDVID(cfid, cvid - 1, 1ULL);
-		READ_PENDING_WAIT(status);
+		status = k8pnow_wr_fidvid(cfid, cvid - 1, 1ULL);
 		cvid = PN8_STA_CVID(status);
 		COUNT_OFF_VST(cstate->vst);
 	}
@@ -218,24 +225,23 @@
 					val = FID_TO_VCO_FID(cfid) + 2;
 			} else
 				val = cfid - 2;
-			WRITE_FIDVID(val, cvid, (uint64_t)cstate->pll * 1000 / 5);
-			READ_PENDING_WAIT(status);
+			status = k8pnow_wr_fidvid(val, cvid,
+			    (uint64_t)cstate->pll * 1000 / 5);
 			cfid = PN8_STA_CFID(status);
 			COUNT_OFF_IRT(cstate->irt);
 
 			vco_cfid = FID_TO_VCO_FID(cfid);
 		}
 
-		WRITE_FIDVID(fid, cvid, (uint64_t) cstate->pll * 1000 / 5);
-		READ_PENDING_WAIT(status);
+		status = k8pnow_wr_fidvid(fid, cvid,
+		    (uint64_t)cstate->pll * 1000 / 5);
 		cfid = PN8_STA_CFID(status);
 		COUNT_OFF_IRT(cstate->irt);
 	}
 
 	/* Phase 3: change to requested voltage */
 	if (cvid != vid) {
-		WRITE_FIDVID(cfid, vid, 1ULL);
-		READ_PENDING_WAIT(status);
+		status = k8pnow_wr_fidvid(cfid, vid, 1ULL);
 		cvid = PN8_STA_CVID(status);
 		COUNT_OFF_VST(cstate->vst);
 	}

Index: src/sys/arch/x86/x86/x86_machdep.c
diff -u src/sys/arch/x86/x86/x86_machdep.c:1.33 src/sys/arch/x86/x86/x86_machdep.c:1.34
--- src/sys/arch/x86/x86/x86_machdep.c:1.33	Wed Aug  5 20:15:36 2009
+++ src/sys/arch/x86/x86/x86_machdep.c	Mon Oct  5 23:59:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_machdep.c,v 1.33 2009/08/05 20:15:36 jym Exp $	*/
+/*	$NetBSD: x86_machdep.c,v 1.34 2009/10/05 23:59:31 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi,
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.33 2009/08/05 20:15:36 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.34 2009/10/05 23:59:31 rmind Exp $");
 
 #include "opt_modular.h"
 
@@ -49,7 +49,6 @@
 #include <sys/sysctl.h>
 #include <sys/extent.h>
 
-#include <x86/cpu_msr.h>
 #include <x86/cpuvar.h>
 #include <x86/cputypes.h>
 #include <x86/machdep.h>
@@ -124,15 +123,6 @@
 	    KAUTH_MACHDEP_UNMANAGEDMEM, NULL, NULL, NULL, NULL);
 }
 
-/*
- * This function is to initialize the mutex used by x86/msr_ipifuncs.c.
- */
-void
-x86_init(void)
-{
-	msr_cpu_broadcast_initmtx();
-}
-
 #ifdef MODULAR
 /*
  * Push any modules loaded by the boot loader.

Index: src/sys/arch/xen/conf/files.xen
diff -u src/sys/arch/xen/conf/files.xen:1.104 src/sys/arch/xen/conf/files.xen:1.105
--- src/sys/arch/xen/conf/files.xen:1.104	Sun Aug 16 15:35:52 2009
+++ src/sys/arch/xen/conf/files.xen	Mon Oct  5 23:59:31 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: files.xen,v 1.104 2009/08/16 15:35:52 manu Exp $
+#	$NetBSD: files.xen,v 1.105 2009/10/05 23:59:31 rmind Exp $
 #	NetBSD: files.x86,v 1.10 2003/10/08 17:30:00 bouyer Exp 
 #	NetBSD: files.i386,v 1.254 2004/03/25 23:32:10 jmc Exp 
 
@@ -293,8 +293,6 @@
 
 file	arch/xen/x86/cpu.c		cpu | vcpu
 
-file	arch/x86/x86/msr_ipifuncs.c
-
 #
 # Compatibility modules
 #

Reply via email to