![]() | |||||||||||||
Messages in this thread |
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 | |||||||||||||