lkml.org 
[lkml]   [2009]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: PAT wc & vmap mapping count issue ?
From
Date
On Thu, 2009-07-30 at 12:17 -0700, Pallipadi, Venkatesh wrote:
> This seems to be a regression from changeset
> 3869c4aa18835c8c61b44bd0f3ace36e9d3b5bd0
>
> Below test patch should fix the problem. Can you please try it and let use know.
> We can then send a cleaner patch with changelog etc to upstream+stable kernels.
>
> Thanks,
> Venki
>
> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
> ---
> arch/x86/mm/pageattr.c | 9 ++++++---
> 1 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
> index 1b734d7..895d90e 100644
> --- a/arch/x86/mm/pageattr.c
> +++ b/arch/x86/mm/pageattr.c
> @@ -997,12 +997,15 @@ EXPORT_SYMBOL(set_memory_array_uc);
> int _set_memory_wc(unsigned long addr, int numpages)
> {
> int ret;
> + unsigned long addr_copy = addr;
> +
> ret = change_page_attr_set(&addr, numpages,
> __pgprot(_PAGE_CACHE_UC_MINUS), 0);
> -
> if (!ret) {
> - ret = change_page_attr_set(&addr, numpages,
> - __pgprot(_PAGE_CACHE_WC), 0);
> + ret = change_page_attr_set_clr(&addr_copy, numpages,
> + __pgprot(_PAGE_CACHE_WC),
> + __pgprot(_PAGE_CACHE_MASK),
> + 0, 0, NULL);
> }
> return ret;
> }

Yes it fixes the issue for me (at least it seems, so far after bunch of
minutes no corruption despite massive set_wc/set_wb/free_page calls).
Thanks a lot for tracking this down.

Cheers,
Jerome Glisse



\
 
 \ /
  Last update: 2009-07-30 22:09    [W:0.458 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site