Source-Changes-HG archive

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

[src/pgoyette-compat]: src/sys Re-enable inclusion of CPU_UCODE for i386/amd6...



details:   https://anonhg.NetBSD.org/src/rev/04121ef02ca7
branches:  pgoyette-compat
changeset: 360247:04121ef02ca7
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Sat Mar 31 01:20:44 2018 +0000

description:
Re-enable inclusion of CPU_UCODE for i386/amd64.  Even though it won't
build correctly on XEN (won't use the XEN ABI), it works fine on real
hardware.

diffstat:

 sys/compat/common/compat_60_mod.c |  10 ++--------
 sys/compat/common/kern_cpu_60.c   |  11 ++++++-----
 sys/modules/compat_60/Makefile    |   4 +---
 3 files changed, 9 insertions(+), 16 deletions(-)

diffs (121 lines):

diff -r 7ff742198b7c -r 04121ef02ca7 sys/compat/common/compat_60_mod.c
--- a/sys/compat/common/compat_60_mod.c Fri Mar 30 23:57:59 2018 +0000
+++ b/sys/compat/common/compat_60_mod.c Sat Mar 31 01:20:44 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_60_mod.c,v 1.1.2.14 2018/03/26 10:49:45 pgoyette Exp $  */
+/*     $NetBSD: compat_60_mod.c,v 1.1.2.15 2018/03/31 01:20:44 pgoyette Exp $  */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_60_mod.c,v 1.1.2.14 2018/03/26 10:49:45 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_60_mod.c,v 1.1.2.15 2018/03/31 01:20:44 pgoyette Exp $");
 
 #include <sys/systm.h>
 #include <sys/module.h>
@@ -78,11 +78,9 @@
 {
        int error = 0;
 
-#ifdef NOTYET
 #ifdef CPU_UCODE
        kern_cpu_60_fini();
 #endif
-#endif
        ccd_60_fini();
        kern_tty_60_fini();
 
@@ -91,11 +89,9 @@
        if (error != 0) {
                kern_tty_60_init();
                ccd_60_init();
-#ifdef NOTYET
 #ifdef CPU_UCODE
                kern_cpu_60_init();
 #endif
-#endif
                return error;
        }
 
@@ -104,11 +100,9 @@
                kern_sa_60_init();
                kern_tty_60_init();
                ccd_60_init();
-#ifdef NOTYET
 #ifdef CPU_UCODE
                kern_cpu_60_init();
 #endif
-#endif
                return error;
        }
 
diff -r 7ff742198b7c -r 04121ef02ca7 sys/compat/common/kern_cpu_60.c
--- a/sys/compat/common/kern_cpu_60.c   Fri Mar 30 23:57:59 2018 +0000
+++ b/sys/compat/common/kern_cpu_60.c   Sat Mar 31 01:20:44 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_cpu_60.c,v 1.1.2.5 2018/03/18 23:34:25 pgoyette Exp $     */
+/*     $NetBSD: kern_cpu_60.c,v 1.1.2.6 2018/03/31 01:20:44 pgoyette Exp $     */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_cpu_60.c,v 1.1.2.5 2018/03/18 23:34:25 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_cpu_60.c,v 1.1.2.6 2018/03/31 01:20:44 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_cpu_ucode.h"
@@ -50,9 +50,6 @@
 static int
 compat6_cpuctl_ioctl(struct lwp *l, u_long cmd, void *data)
 {
-#if defined(CPU_UCODE) && defined(COMPAT_60)
-       int error;
-#endif
 
        switch (cmd) {
 #if defined(CPU_UCODE) && defined(COMPAT_60)
@@ -60,11 +57,15 @@
                return compat6_cpu_ucode_get_version(data);
 
        case OIOC_CPU_UCODE_APPLY:
+           {
+               int error;
+
                error = kauth_authorize_machdep(l->l_cred,
                    KAUTH_MACHDEP_CPU_UCODE_APPLY, NULL, NULL, NULL, NULL);
                if (error)
                        return error;
                return compat6_cpu_ucode_apply(data);
+           }
 #endif
        default:
                return ENOTTY;
diff -r 7ff742198b7c -r 04121ef02ca7 sys/modules/compat_60/Makefile
--- a/sys/modules/compat_60/Makefile    Fri Mar 30 23:57:59 2018 +0000
+++ b/sys/modules/compat_60/Makefile    Sat Mar 31 01:20:44 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.1.2.12 2018/03/26 10:49:45 pgoyette Exp $
+#      $NetBSD: Makefile,v 1.1.2.13 2018/03/31 01:20:44 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -11,13 +11,11 @@
 SRCS+= compat_60_mod.c kern_sa_60.c tty_60.c kern_time_60.c ccd_60.c \
        kern_cpu_60.c
 
-.if NOTYET
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
 CPPFLAGS+=     -DCPU_UCODE
 
 .PATH: ${S}/arch/x86/x86
 SRCS+= compat_60_cpu_ucode.c
 .endif
-.endif
 
 .include <bsd.kmodule.mk>



Home | Main Index | Thread Index | Old Index