aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/mtrr.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2012-09-14 14:28:59 +0200
committerJan Beulich <jbeulich@suse.com>2012-09-14 14:28:59 +0200
commit26c465b52783ca11cd79e231caf8fad08e276cf7 (patch)
tree88b4b2321d461e3a034a2c447746d44f40400465 /xen/arch/x86/hvm/mtrr.c
parent00f05388a688508f8a6b0c82d281aebd90a37d4e (diff)
downloadxen-26c465b52783ca11cd79e231caf8fad08e276cf7.tar.gz
xen-26c465b52783ca11cd79e231caf8fad08e276cf7.tar.bz2
xen-26c465b52783ca11cd79e231caf8fad08e276cf7.zip
x86/hvm: constify static data where possible
In a few cases this also extends to making them static in the first place. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/hvm/mtrr.c')
-rw-r--r--xen/arch/x86/hvm/mtrr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 7807e03301..ef51a8d5d0 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -34,14 +34,14 @@ static uint32_t size_or_mask;
#define pat_cr_2_paf(pat_cr,n) ((((uint64_t)pat_cr) >> ((n)<<3)) & 0xff)
/* PAT entry to PTE flags (PAT, PCD, PWT bits). */
-static uint8_t pat_entry_2_pte_flags[8] = {
+static const uint8_t pat_entry_2_pte_flags[8] = {
0, _PAGE_PWT,
_PAGE_PCD, _PAGE_PCD | _PAGE_PWT,
_PAGE_PAT, _PAGE_PAT | _PAGE_PWT,
_PAGE_PAT | _PAGE_PCD, _PAGE_PAT | _PAGE_PCD | _PAGE_PWT };
/* Effective mm type lookup table, according to MTRR and PAT. */
-static uint8_t mm_type_tbl[MTRR_NUM_TYPES][PAT_TYPE_NUMS] = {
+static const uint8_t mm_type_tbl[MTRR_NUM_TYPES][PAT_TYPE_NUMS] = {
/********PAT(UC,WC,RS,RS,WT,WP,WB,UC-)*/
/* RS means reserved type(2,3), and type is hardcoded here */
/*MTRR(UC):(UC,WC,RS,RS,UC,UC,UC,UC)*/