Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7-0]: src/sys/arch/x86 Pull up following revision(s) (requested b...



details:   https://anonhg.NetBSD.org/src/rev/f9a46533ea65
branches:  netbsd-7-0
changeset: 801126:f9a46533ea65
user:      snj <snj%NetBSD.org@localhost>
date:      Sat Feb 06 20:26:55 2016 +0000

description:
Pull up following revision(s) (requested by hannken in ticket #1073):
        sys/arch/x86/x86/errata.c: revision 1.23
        sys/arch/x86/include/cpufunc.h: revision 1.19
Adapt prototypes and usage of rdmsr_locked() and wrmsr_locked() to
their implementation.  Both functions don't take the passcode as
argument.
As wrmsr_locked() no longer writes the passcode to the msr the
erratum 721 on my Opteron 2356 really gets patched and cc1 no longer
crashes with SIGSEGV.

diffstat:

 sys/arch/x86/include/cpufunc.h |   6 +++---
 sys/arch/x86/x86/errata.c      |  10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diffs (64 lines):

diff -r 235611c418e3 -r f9a46533ea65 sys/arch/x86/include/cpufunc.h
--- a/sys/arch/x86/include/cpufunc.h    Tue Jan 26 23:55:52 2016 +0000
+++ b/sys/arch/x86/include/cpufunc.h    Sat Feb 06 20:26:55 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpufunc.h,v 1.18 2014/02/25 22:16:52 dsl Exp $ */
+/*     $NetBSD: cpufunc.h,v 1.18.8.1 2016/02/06 20:26:55 snj Exp $     */
 
 /*-
  * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc.
@@ -134,12 +134,12 @@
 #define        OPTERON_MSR_PASSCODE    0x9c5a203aU
 
 uint64_t       rdmsr(u_int);
-uint64_t       rdmsr_locked(u_int, u_int);
+uint64_t       rdmsr_locked(u_int);
 int            rdmsr_safe(u_int, uint64_t *);
 uint64_t       rdtsc(void);
 uint64_t       rdpmc(u_int);
 void           wrmsr(u_int, uint64_t);
-void           wrmsr_locked(u_int, u_int, uint64_t);
+void           wrmsr_locked(u_int, uint64_t);
 void           setfs(int);
 void           setusergs(int);
 
diff -r 235611c418e3 -r f9a46533ea65 sys/arch/x86/x86/errata.c
--- a/sys/arch/x86/x86/errata.c Tue Jan 26 23:55:52 2016 +0000
+++ b/sys/arch/x86/x86/errata.c Sat Feb 06 20:26:55 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: errata.c,v 1.21 2013/03/21 13:22:37 christos Exp $     */
+/*     $NetBSD: errata.c,v 1.21.16.1 2016/02/06 20:26:55 snj Exp $     */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: errata.c,v 1.21 2013/03/21 13:22:37 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: errata.c,v 1.21.16.1 2016/02/06 20:26:55 snj Exp $");
 
 #include <sys/types.h>
 #include <sys/systm.h>
@@ -294,7 +294,7 @@
 
        (void)ci;
 
-       val = rdmsr_locked(e->e_data1, OPTERON_MSR_PASSCODE);
+       val = rdmsr_locked(e->e_data1);
        if ((val & e->e_data2) != 0)
                return FALSE;
 
@@ -309,10 +309,10 @@
 
        (void)ci;
 
-       val = rdmsr_locked(e->e_data1, OPTERON_MSR_PASSCODE);
+       val = rdmsr_locked(e->e_data1);
        if ((val & e->e_data2) != 0)
                return FALSE;
-       wrmsr_locked(e->e_data1, OPTERON_MSR_PASSCODE, val | e->e_data2);
+       wrmsr_locked(e->e_data1, val | e->e_data2);
        aprint_debug_dev(ci->ci_dev, "erratum %d patched\n",
            e->e_num);
 



Home | Main Index | Thread Index | Old Index