Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125184
b: refs/heads/master
c: b558bc0
h: refs/heads/master
v: v3
  • Loading branch information
Sheng Yang authored and Avi Kivity committed Dec 31, 2008
1 parent eed1172 commit 62ca922
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f179287fa02723215eecf681d812b303c243973
refs/heads/master: b558bc0a25c82ef2a9d2683b0beb3e4b87cea20b
8 changes: 4 additions & 4 deletions trunk/arch/x86/kernel/cpu/mtrr/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#include <asm/pat.h>
#include "mtrr.h"

struct mtrr_state {
struct mtrr_var_range var_ranges[MAX_VAR_RANGES];
mtrr_type fixed_ranges[NUM_FIXED_RANGES];
struct mtrr_state_type {
struct mtrr_var_range var_ranges[MTRR_MAX_VAR_RANGES];
mtrr_type fixed_ranges[MTRR_NUM_FIXED_RANGES];
unsigned char enabled;
unsigned char have_fixed;
mtrr_type def_type;
Expand All @@ -35,7 +35,7 @@ static struct fixed_range_block fixed_range_blocks[] = {
};

static unsigned long smp_changes_mask;
static struct mtrr_state mtrr_state = {};
static struct mtrr_state_type mtrr_state = {};
static int mtrr_state_set;
u64 mtrr_tom2;

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/kernel/cpu/mtrr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

u32 num_var_ranges = 0;

unsigned int mtrr_usage_table[MAX_VAR_RANGES];
unsigned int mtrr_usage_table[MTRR_MAX_VAR_RANGES];
static DEFINE_MUTEX(mtrr_mutex);

u64 size_or_mask, size_and_mask;
Expand Down Expand Up @@ -574,7 +574,7 @@ struct mtrr_value {
unsigned long lsize;
};

static struct mtrr_value mtrr_state[MAX_VAR_RANGES];
static struct mtrr_value mtrr_state[MTRR_MAX_VAR_RANGES];

static int mtrr_save(struct sys_device * sysdev, pm_message_t state)
{
Expand Down
7 changes: 4 additions & 3 deletions trunk/arch/x86/kernel/cpu/mtrr/mtrr.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
#define MTRRphysBase_MSR(reg) (0x200 + 2 * (reg))
#define MTRRphysMask_MSR(reg) (0x200 + 2 * (reg) + 1)

#define NUM_FIXED_RANGES 88
#define MAX_VAR_RANGES 256
#define MTRR_NUM_FIXED_RANGES 88
#define MTRR_MAX_VAR_RANGES 256

#define MTRRfix64K_00000_MSR 0x250
#define MTRRfix16K_80000_MSR 0x258
#define MTRRfix16K_A0000_MSR 0x259
Expand All @@ -33,7 +34,7 @@
an 8 bit field: */
typedef u8 mtrr_type;

extern unsigned int mtrr_usage_table[MAX_VAR_RANGES];
extern unsigned int mtrr_usage_table[MTRR_MAX_VAR_RANGES];

struct mtrr_ops {
u32 vendor;
Expand Down

0 comments on commit 62ca922

Please sign in to comment.