Skip to content

Commit

Permalink
x86: PAT fix
Browse files Browse the repository at this point in the history
build fix for !CONFIG_MTRR.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Apr 17, 2008
1 parent 042b78e commit 52783fa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions include/asm-x86/mtrr.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,9 @@ struct mtrr_gentry

#ifdef __KERNEL__

extern u8 mtrr_type_lookup(u64 addr, u64 end);

/* The following functions are for use by other drivers */
# ifdef CONFIG_MTRR
extern u8 mtrr_type_lookup(u64 addr, u64 end);
extern void mtrr_save_fixed_ranges(void *);
extern void mtrr_save_state(void);
extern int mtrr_add (unsigned long base, unsigned long size,
Expand All @@ -101,6 +100,13 @@ extern void mtrr_ap_init(void);
extern void mtrr_bp_init(void);
extern int mtrr_trim_uncached_memory(unsigned long end_pfn);
# else
static inline u8 mtrr_type_lookup(u64 addr, u64 end)
{
/*
* Return no-MTRRs:
*/
return 0xff;
}
#define mtrr_save_fixed_ranges(arg) do {} while (0)
#define mtrr_save_state() do {} while (0)
static __inline__ int mtrr_add (unsigned long base, unsigned long size,
Expand Down

0 comments on commit 52783fa

Please sign in to comment.