diff options
author | Sheng Yang <sheng@linux.intel.com> | 2008-10-09 04:01:52 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 09:51:44 -0500 |
commit | b558bc0a25c82ef2a9d2683b0beb3e4b87cea20b (patch) | |
tree | 236472a50241041c7ab87883ab40635fb2344743 /arch/x86/kernel/cpu | |
parent | 5f179287fa02723215eecf681d812b303c243973 (diff) |
x86: Rename mtrr_state struct and macro names
Prepare for exporting them.
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/generic.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/main.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/mtrr.h | 7 |
3 files changed, 10 insertions, 9 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c index 4e8d77f01eeb..90db91e15931 100644 --- a/arch/x86/kernel/cpu/mtrr/generic.c +++ b/arch/x86/kernel/cpu/mtrr/generic.c | |||
@@ -14,9 +14,9 @@ | |||
14 | #include <asm/pat.h> | 14 | #include <asm/pat.h> |
15 | #include "mtrr.h" | 15 | #include "mtrr.h" |
16 | 16 | ||
17 | struct mtrr_state { | 17 | struct mtrr_state_type { |
18 | struct mtrr_var_range var_ranges[MAX_VAR_RANGES]; | 18 | struct mtrr_var_range var_ranges[MTRR_MAX_VAR_RANGES]; |
19 | mtrr_type fixed_ranges[NUM_FIXED_RANGES]; | 19 | mtrr_type fixed_ranges[MTRR_NUM_FIXED_RANGES]; |
20 | unsigned char enabled; | 20 | unsigned char enabled; |
21 | unsigned char have_fixed; | 21 | unsigned char have_fixed; |
22 | mtrr_type def_type; | 22 | mtrr_type def_type; |
@@ -35,7 +35,7 @@ static struct fixed_range_block fixed_range_blocks[] = { | |||
35 | }; | 35 | }; |
36 | 36 | ||
37 | static unsigned long smp_changes_mask; | 37 | static unsigned long smp_changes_mask; |
38 | static struct mtrr_state mtrr_state = {}; | 38 | static struct mtrr_state_type mtrr_state = {}; |
39 | static int mtrr_state_set; | 39 | static int mtrr_state_set; |
40 | u64 mtrr_tom2; | 40 | u64 mtrr_tom2; |
41 | 41 | ||
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index 1159e269e596..d6ec7ec30274 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c | |||
@@ -49,7 +49,7 @@ | |||
49 | 49 | ||
50 | u32 num_var_ranges = 0; | 50 | u32 num_var_ranges = 0; |
51 | 51 | ||
52 | unsigned int mtrr_usage_table[MAX_VAR_RANGES]; | 52 | unsigned int mtrr_usage_table[MTRR_MAX_VAR_RANGES]; |
53 | static DEFINE_MUTEX(mtrr_mutex); | 53 | static DEFINE_MUTEX(mtrr_mutex); |
54 | 54 | ||
55 | u64 size_or_mask, size_and_mask; | 55 | u64 size_or_mask, size_and_mask; |
@@ -574,7 +574,7 @@ struct mtrr_value { | |||
574 | unsigned long lsize; | 574 | unsigned long lsize; |
575 | }; | 575 | }; |
576 | 576 | ||
577 | static struct mtrr_value mtrr_state[MAX_VAR_RANGES]; | 577 | static struct mtrr_value mtrr_state[MTRR_MAX_VAR_RANGES]; |
578 | 578 | ||
579 | static int mtrr_save(struct sys_device * sysdev, pm_message_t state) | 579 | static int mtrr_save(struct sys_device * sysdev, pm_message_t state) |
580 | { | 580 | { |
diff --git a/arch/x86/kernel/cpu/mtrr/mtrr.h b/arch/x86/kernel/cpu/mtrr/mtrr.h index 2dc4ec656b23..988538202ddc 100644 --- a/arch/x86/kernel/cpu/mtrr/mtrr.h +++ b/arch/x86/kernel/cpu/mtrr/mtrr.h | |||
@@ -11,8 +11,9 @@ | |||
11 | #define MTRRphysBase_MSR(reg) (0x200 + 2 * (reg)) | 11 | #define MTRRphysBase_MSR(reg) (0x200 + 2 * (reg)) |
12 | #define MTRRphysMask_MSR(reg) (0x200 + 2 * (reg) + 1) | 12 | #define MTRRphysMask_MSR(reg) (0x200 + 2 * (reg) + 1) |
13 | 13 | ||
14 | #define NUM_FIXED_RANGES 88 | 14 | #define MTRR_NUM_FIXED_RANGES 88 |
15 | #define MAX_VAR_RANGES 256 | 15 | #define MTRR_MAX_VAR_RANGES 256 |
16 | |||
16 | #define MTRRfix64K_00000_MSR 0x250 | 17 | #define MTRRfix64K_00000_MSR 0x250 |
17 | #define MTRRfix16K_80000_MSR 0x258 | 18 | #define MTRRfix16K_80000_MSR 0x258 |
18 | #define MTRRfix16K_A0000_MSR 0x259 | 19 | #define MTRRfix16K_A0000_MSR 0x259 |
@@ -33,7 +34,7 @@ | |||
33 | an 8 bit field: */ | 34 | an 8 bit field: */ |
34 | typedef u8 mtrr_type; | 35 | typedef u8 mtrr_type; |
35 | 36 | ||
36 | extern unsigned int mtrr_usage_table[MAX_VAR_RANGES]; | 37 | extern unsigned int mtrr_usage_table[MTRR_MAX_VAR_RANGES]; |
37 | 38 | ||
38 | struct mtrr_ops { | 39 | struct mtrr_ops { |
39 | u32 vendor; | 40 | u32 vendor; |