Re: [patch 00/13] x86: PAT support updated - v3

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ingo Molnar
Date: Friday, March 21, 2008 - 7:55 am

* Ingo Molnar <mingo@elte.hu> wrote:


no big issues so far, just a simple build fix for the !MTRR case below.

	Ingo

----------------->
Subject: x86: PAT fix
From: Ingo Molnar <mingo@elte.hu>
Date: Fri Mar 21 15:42:28 CET 2008

build fix for !CONFIG_MTRR.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 include/asm-x86/mtrr.h |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Index: linux-x86.q/include/asm-x86/mtrr.h
===================================================================
--- linux-x86.q.orig/include/asm-x86/mtrr.h
+++ linux-x86.q/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,
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/13] x86: PAT support updated - v3, venkatesh.pallipadi, (Tue Mar 18, 5:00 pm)
Re: [patch 00/13] x86: PAT support updated - v3, Ingo Molnar, (Fri Mar 21, 6:24 am)
Re: [patch 00/13] x86: PAT support updated - v3, H. Peter Anvin, (Fri Mar 21, 6:29 am)
Re: [patch 00/13] x86: PAT support updated - v3, Ingo Molnar, (Fri Mar 21, 7:55 am)
Re: [patch 00/13] x86: PAT support updated - v3, Venki Pallipadi, (Fri Mar 21, 12:19 pm)
Re: [patch 00/13] x86: PAT support updated - v3, Venki Pallipadi, (Fri Mar 21, 12:26 pm)
Re: [patch 00/13] x86: PAT support updated - v3, H. Peter Anvin, (Fri Mar 21, 12:59 pm)