From: Ingo Molnar Date: Fri, 21 Mar 2008 14:42:28 +0000 (+0100) Subject: x86: PAT fix X-Git-Tag: v2.6.26-rc1~1154^2~283 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52783fa8d6b847857fdd86df418e09c026d816f5;p=linux-2.6 x86: PAT fix build fix for !CONFIG_MTRR. Signed-off-by: Ingo Molnar --- diff --git a/include/asm-x86/mtrr.h b/include/asm-x86/mtrr.h index 968794af93..ee172296e0 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,