From ced8cde74978a3d33a49c67164345c8ea83227ca Mon Sep 17 00:00:00 2001 From: jdolecek Date: Sun, 9 Feb 2003 09:38:23 +0000 Subject: [PATCH] make k6_mtrr_funcs, i686_mtrr_funcs and mtrr_funcs const remove extern definition for i686_mtrr_funcs from include/mtrr.h, it's not used outside mtrr_i686.c --- sys/arch/i386/i386/mtrr_i686.c | 6 +++--- sys/arch/i386/i386/mtrr_k6.c | 6 +++--- sys/arch/i386/include/mtrr.h | 7 +++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/sys/arch/i386/i386/mtrr_i686.c b/sys/arch/i386/i386/mtrr_i686.c index 13046747aeb2..a29f974b1216 100644 --- a/sys/arch/i386/i386/mtrr_i686.c +++ b/sys/arch/i386/i386/mtrr_i686.c @@ -1,4 +1,4 @@ -/* $NetBSD: mtrr_i686.c,v 1.6 2002/10/25 12:01:57 fvdl Exp $ */ +/* $NetBSD: mtrr_i686.c,v 1.7 2003/02/09 09:38:23 jdolecek Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mtrr_i686.c,v 1.6 2002/10/25 12:01:57 fvdl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mtrr_i686.c,v 1.7 2003/02/09 09:38:23 jdolecek Exp $"); #include "opt_multiprocessor.h" @@ -113,7 +113,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, diff --git a/sys/arch/i386/i386/mtrr_k6.c b/sys/arch/i386/i386/mtrr_k6.c index 6a124e96ffbe..685a0dfd38ff 100644 --- a/sys/arch/i386/i386/mtrr_k6.c +++ b/sys/arch/i386/i386/mtrr_k6.c @@ -1,4 +1,4 @@ -/* $NetBSD: mtrr_k6.c,v 1.5 2002/10/25 12:01:57 fvdl Exp $ */ +/* $NetBSD: mtrr_k6.c,v 1.6 2003/02/09 09:38:23 jdolecek Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mtrr_k6.c,v 1.5 2002/10/25 12:01:57 fvdl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mtrr_k6.c,v 1.6 2003/02/09 09:38:23 jdolecek Exp $"); #include #include @@ -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, diff --git a/sys/arch/i386/include/mtrr.h b/sys/arch/i386/include/mtrr.h index dc18c483d79e..dbd2f8c3705e 100644 --- a/sys/arch/i386/include/mtrr.h +++ b/sys/arch/i386/include/mtrr.h @@ -1,4 +1,4 @@ -/* $NetBSD: mtrr.h,v 1.5 2002/10/01 12:57:07 fvdl Exp $ */ +/* $NetBSD: mtrr.h,v 1.6 2003/02/09 09:38:23 jdolecek Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -131,9 +131,8 @@ 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 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)