summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-05-14 21:58:10 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-05-14 21:58:10 +0000
commit8b77d92037a99ca9f6ec83b9cd776c8b04fd707f (patch)
tree189a3c72e2400217ac7929ea7ea10df9c00a6a32 /sys
parente02923e04aafb490a47a2632cc709bde8a21c384 (diff)
Declare the cmmu-related variables which are set early in the kernel life,
before pmap_bootstrap(), as located in .rodata. This will get them write-protected after pmap has initialized, for free.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/m88k/m88k/m8820x_machdep.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/arch/m88k/m88k/m8820x_machdep.c b/sys/arch/m88k/m88k/m8820x_machdep.c
index 0395f99d067..698403ed911 100644
--- a/sys/arch/m88k/m88k/m8820x_machdep.c
+++ b/sys/arch/m88k/m88k/m8820x_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m8820x_machdep.c,v 1.52 2013/02/19 21:02:06 miod Exp $ */
+/* $OpenBSD: m8820x_machdep.c,v 1.53 2013/05/14 21:58:09 miod Exp $ */
/*
* Copyright (c) 2004, 2007, 2010, 2011, Miodrag Vallat.
*
@@ -147,9 +147,12 @@ const struct cmmu_p cmmu8820x = {
* the gory details.
*/
-struct m8820x_cmmu m8820x_cmmu[MAX_CMMUS];
-u_int max_cmmus;
-u_int cmmu_shift;
+struct m8820x_cmmu m8820x_cmmu[MAX_CMMUS]
+ __attribute__ ((__section__(".rodata")));
+u_int max_cmmus
+ __attribute__ ((__section__(".rodata")));
+u_int cmmu_shift
+ __attribute__ ((__section__(".rodata")));
/* local prototypes */
void m8820x_cmmu_set_reg(int, u_int, int, int, int);