aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pageattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/pageattr.c')
-rw-r--r--arch/x86/mm/pageattr.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 1b734d7a8966..895d90e1a81b 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -997,12 +997,15 @@ EXPORT_SYMBOL(set_memory_array_uc);
997int _set_memory_wc(unsigned long addr, int numpages) 997int _set_memory_wc(unsigned long addr, int numpages)
998{ 998{
999 int ret; 999 int ret;
1000 unsigned long addr_copy = addr;
1001
1000 ret = change_page_attr_set(&addr, numpages, 1002 ret = change_page_attr_set(&addr, numpages,
1001 __pgprot(_PAGE_CACHE_UC_MINUS), 0); 1003 __pgprot(_PAGE_CACHE_UC_MINUS), 0);
1002
1003 if (!ret) { 1004 if (!ret) {
1004 ret = change_page_attr_set(&addr, numpages, 1005 ret = change_page_attr_set_clr(&addr_copy, numpages,
1005 __pgprot(_PAGE_CACHE_WC), 0); 1006 __pgprot(_PAGE_CACHE_WC),
1007 __pgprot(_PAGE_CACHE_MASK),
1008 0, 0, NULL);
1006 } 1009 }
1007 return ret; 1010 return ret;
1008} 1011}