lkml.org 
[lkml]   [2008]   [Jun]   [21]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 21 Jun 2008 08:20:14 +0200
FromBrice Goglin <>
SubjectRe: [PATCH 6/7] x86: pat.c introduce function to check for conflicts with existing memtypes
Andreas Herrmann wrote:
> ... to strip down loop body in reserve_memtype.
>
> Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
> ---
>  arch/x86/mm/pat.c |   96 ++++++++++++++++++----------------------------------
>  1 files changed, 33 insertions(+), 63 deletions(-)
>
> diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
> index 49dcd96..281ac64 100644
> --- a/arch/x86/mm/pat.c
> +++ b/arch/x86/mm/pat.c
> @@ -178,6 +178,33 @@ static unsigned long pat_x_mtrr_type(u64 start, u64 end, unsigned long req_type)
>  	return req_type;
>  }
> 
> +static int chk_conflict(struct memtype *new, struct memtype *entry,
> +			unsigned long *type)
> 

Looking at this, I thought it may be nice to add (and export to modules)
a function that checks whether a range of memory has some page attribute
applied, namely WC. The idea would be to help drivers call mtrr_add only
if ioremap_wc failed to setup WC. I am not sure it would work but it may
be easier than adding mtrr_add into ioremap_wc() as proposed in
http://lkml.org/lkml/2008/5/31/252

Brice



\
 
 \ /
  Last update: 2008-06-21 08:23    [from the cache]
©2003-2008