Module Name:    src
Committed By:   maxv
Date:           Fri Jan 31 08:21:11 UTC 2020

Modified Files:
        src/sys/arch/amd64/amd64: machdep.c
        src/sys/arch/i386/i386: machdep.c mtrr_k6.c
        src/sys/arch/x86/include: mtrr.h
        src/sys/arch/x86/x86: mtrr_i686.c

Log Message:
constify


To generate a diff of this commit:
cvs rdiff -u -r1.345 -r1.346 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.824 -r1.825 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/i386/i386/mtrr_k6.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/include/mtrr.h
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/x86/x86/mtrr_i686.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/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.345 src/sys/arch/amd64/amd64/machdep.c:1.346
--- src/sys/arch/amd64/amd64/machdep.c:1.345	Thu Jan  9 00:42:24 2020
+++ src/sys/arch/amd64/amd64/machdep.c	Fri Jan 31 08:21:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.345 2020/01/09 00:42:24 manu Exp $	*/
+/*	$NetBSD: machdep.c,v 1.346 2020/01/31 08:21:11 maxv Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -110,7 +110,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.345 2020/01/09 00:42:24 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.346 2020/01/31 08:21:11 maxv Exp $");
 
 #include "opt_modular.h"
 #include "opt_user_ldt.h"
@@ -232,7 +232,7 @@ int cpureset_delay = 2000; /* default to
 int cpu_class = CPUCLASS_686;
 
 #ifdef MTRR
-struct mtrr_funcs *mtrr_funcs;
+const struct mtrr_funcs *mtrr_funcs;
 #endif
 
 int cpu_class;

Index: src/sys/arch/i386/i386/machdep.c
diff -u src/sys/arch/i386/i386/machdep.c:1.824 src/sys/arch/i386/i386/machdep.c:1.825
--- src/sys/arch/i386/i386/machdep.c:1.824	Tue Dec 10 18:04:54 2019
+++ src/sys/arch/i386/i386/machdep.c	Fri Jan 31 08:21:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.824 2019/12/10 18:04:54 ad Exp $	*/
+/*	$NetBSD: machdep.c,v 1.825 2020/01/31 08:21:11 maxv Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009, 2017
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.824 2019/12/10 18:04:54 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.825 2020/01/31 08:21:11 maxv Exp $");
 
 #include "opt_beep.h"
 #include "opt_compat_freebsd.h"
@@ -203,7 +203,7 @@ int cpureset_delay = 2000; /* default to
 #endif
 
 #ifdef MTRR
-struct mtrr_funcs *mtrr_funcs;
+const struct mtrr_funcs *mtrr_funcs;
 #endif
 
 int cpu_class;

Index: src/sys/arch/i386/i386/mtrr_k6.c
diff -u src/sys/arch/i386/i386/mtrr_k6.c:1.14 src/sys/arch/i386/i386/mtrr_k6.c:1.15
--- src/sys/arch/i386/i386/mtrr_k6.c:1.14	Sun Nov 10 21:16:28 2019
+++ src/sys/arch/i386/i386/mtrr_k6.c	Fri Jan 31 08:21:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: mtrr_k6.c,v 1.14 2019/11/10 21:16:28 chs Exp $	*/
+/*	$NetBSD: mtrr_k6.c,v 1.15 2020/01/31 08:21:11 maxv Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mtrr_k6.c,v 1.14 2019/11/10 21:16:28 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mtrr_k6.c,v 1.15 2020/01/31 08:21:11 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -71,7 +71,7 @@ mtrr_var_raw[] = {
 
 static struct mtrr *mtrr_var;
 
-struct mtrr_funcs k6_mtrr_funcs = {
+const struct mtrr_funcs k6_mtrr_funcs = {
 	k6_mtrr_init_cpu,
 	k6_mtrr_reload_cpu,
 	k6_mtrr_clean,

Index: src/sys/arch/x86/include/mtrr.h
diff -u src/sys/arch/x86/include/mtrr.h:1.5 src/sys/arch/x86/include/mtrr.h:1.6
--- src/sys/arch/x86/include/mtrr.h:1.5	Thu Dec 15 09:38:21 2011
+++ src/sys/arch/x86/include/mtrr.h	Fri Jan 31 08:21:11 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: mtrr.h,v 1.5 2011/12/15 09:38:21 abs Exp $ */
+/* $NetBSD: mtrr.h,v 1.6 2020/01/31 08:21:11 maxv Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -124,9 +124,9 @@ struct mtrr_funcs {
 	void (*dump)(const char *tag);
 };
 
-extern struct mtrr_funcs i686_mtrr_funcs;
-extern struct mtrr_funcs k6_mtrr_funcs;
-extern struct mtrr_funcs *mtrr_funcs;
+extern const struct mtrr_funcs i686_mtrr_funcs;
+extern const struct mtrr_funcs k6_mtrr_funcs;
+extern const struct mtrr_funcs *mtrr_funcs;
 
 #define mtrr_init_cpu(ci)	mtrr_funcs->init_cpu(ci)
 #define mtrr_reload_cpu(ci)	mtrr_funcs->reload_cpu(ci)

Index: src/sys/arch/x86/x86/mtrr_i686.c
diff -u src/sys/arch/x86/x86/mtrr_i686.c:1.30 src/sys/arch/x86/x86/mtrr_i686.c:1.31
--- src/sys/arch/x86/x86/mtrr_i686.c:1.30	Sun Mar  4 10:02:10 2018
+++ src/sys/arch/x86/x86/mtrr_i686.c	Fri Jan 31 08:21:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: mtrr_i686.c,v 1.30 2018/03/04 10:02:10 jdolecek Exp $ */
+/*	$NetBSD: mtrr_i686.c,v 1.31 2020/01/31 08:21:11 maxv Exp $ */
 
 /*-
  * Copyright (c) 2000, 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mtrr_i686.c,v 1.30 2018/03/04 10:02:10 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mtrr_i686.c,v 1.31 2020/01/31 08:21:11 maxv Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -124,7 +124,7 @@ static struct mtrr_state *mtrr_fixed_raw
 static struct mtrr *mtrr_fixed;
 static struct mtrr *mtrr_var;
 
-struct mtrr_funcs i686_mtrr_funcs = {
+const struct mtrr_funcs i686_mtrr_funcs = {
 	i686_mtrr_init_cpu,
 	i686_mtrr_reload_cpu,
 	i686_mtrr_clean,

Reply via email to