aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-03-21 15:42:28 +0100
committerIngo Molnar <mingo@elte.hu>2008-04-17 17:41:20 +0200
commit52783fa8d6b847857fdd86df418e09c026d816f5 (patch)
tree7964ba020643ca9143294e51ed31cf3750903498
parent042b78e4dbb8919a59e77ba5d502a5a14405dea1 (diff)
x86: PAT fix
build fix for !CONFIG_MTRR. Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--include/asm-x86/mtrr.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/asm-x86/mtrr.h b/include/asm-x86/mtrr.h
index 968794af93f..ee172296e05 100644
--- a/include/asm-x86/mtrr.h
+++ b/include/asm-x86/mtrr.h
@@ -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,
@@ -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,