Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53889
b: refs/heads/master
c: 2b3b483
h: refs/heads/master
i:
  53887: 44251c6
v: v3
  • Loading branch information
Bernhard Kaindl authored and Andi Kleen committed May 2, 2007
1 parent 3ec6763 commit b5bce2f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 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: 856f44ff4af6e57fdc39a8b2bec498c88438bd27
refs/heads/master: 2b3b4835c94226681c496de9446d456dcf42ed08
7 changes: 6 additions & 1 deletion trunk/arch/i386/kernel/cpu/mtrr/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ get_mtrr_var_range(unsigned int index, struct mtrr_var_range *vr)
rdmsr(MTRRphysMask_MSR(index), vr->mask_lo, vr->mask_hi);
}

static void __init
static void
get_fixed_ranges(mtrr_type * frs)
{
unsigned int *p = (unsigned int *) frs;
Expand All @@ -51,6 +51,11 @@ get_fixed_ranges(mtrr_type * frs)
rdmsr(MTRRfix4K_C0000_MSR + i, p[6 + i * 2], p[7 + i * 2]);
}

void mtrr_save_fixed_ranges(void *info)
{
get_fixed_ranges(mtrr_state.fixed_ranges);
}

static void __init print_fixed(unsigned base, unsigned step, const mtrr_type*types)
{
unsigned i;
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-i386/mtrr.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ struct mtrr_gentry

/* The following functions are for use by other drivers */
# ifdef CONFIG_MTRR
extern void mtrr_save_fixed_ranges(void *);
extern int mtrr_add (unsigned long base, unsigned long size,
unsigned int type, char increment);
extern int mtrr_add_page (unsigned long base, unsigned long size,
Expand All @@ -79,6 +80,7 @@ extern void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi);
extern void mtrr_ap_init(void);
extern void mtrr_bp_init(void);
# else
#define mtrr_save_fixed_ranges(arg) do {} while (0)
static __inline__ int mtrr_add (unsigned long base, unsigned long size,
unsigned int type, char increment)
{
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-x86_64/mtrr.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,11 @@ struct mtrr_gentry32
#ifdef CONFIG_MTRR
extern void mtrr_ap_init(void);
extern void mtrr_bp_init(void);
extern void mtrr_save_fixed_ranges(void *);
#else
#define mtrr_ap_init() do {} while (0)
#define mtrr_bp_init() do {} while (0)
#define mtrr_save_fixed_ranges(arg) do {} while (0)
#endif

#endif /* __KERNEL__ */
Expand Down

0 comments on commit b5bce2f

Please sign in to comment.