aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pageattr.c
diff options
context:
space:
mode:
authorRene Herman <rene.herman@keyaccess.nl>2008-08-21 18:10:13 -0400
committerIngo Molnar <mingo@elte.hu>2008-08-22 00:07:32 -0400
commit9a79f4f491f92bc713e1f28f96516b141b752600 (patch)
tree4b95106da98ae6c02ff9a256149403ca7c2b7bd3 /arch/x86/mm/pageattr.c
parent8b53b57576292b92b27769f9e213df19b6e57786 (diff)
x86: {reverve,free}_memtype() take a physical address
The new set_memory_array_{uc,wb}() pass virtual addresses to {reserve,free}_memtype() it seems. Signed-off-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/pageattr.c')
-rw-r--r--arch/x86/mm/pageattr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 1785591808bd..fed6ba2a8e7e 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -947,7 +947,7 @@ int set_memory_array_uc(unsigned long *addr, int addrinarray)
947 * for now UC MINUS. see comments in ioremap_nocache() 947 * for now UC MINUS. see comments in ioremap_nocache()
948 */ 948 */
949 for (i = 0; i < addrinarray; i++) { 949 for (i = 0; i < addrinarray; i++) {
950 if (reserve_memtype(addr[i], addr[i] + PAGE_SIZE, 950 if (reserve_memtype(__pa(addr[i]), __pa(addr[i]) + PAGE_SIZE,
951 _PAGE_CACHE_UC_MINUS, NULL)) 951 _PAGE_CACHE_UC_MINUS, NULL))
952 goto out; 952 goto out;
953 } 953 }
@@ -956,7 +956,7 @@ int set_memory_array_uc(unsigned long *addr, int addrinarray)
956 __pgprot(_PAGE_CACHE_UC_MINUS), 1); 956 __pgprot(_PAGE_CACHE_UC_MINUS), 1);
957out: 957out:
958 while (--i >= 0) 958 while (--i >= 0)
959 free_memtype(addr[i], addr[i] + PAGE_SIZE); 959 free_memtype(__pa(addr[i]), __pa(addr[i]) + PAGE_SIZE);
960 return -EINVAL; 960 return -EINVAL;
961} 961}
962EXPORT_SYMBOL(set_memory_array_uc); 962EXPORT_SYMBOL(set_memory_array_uc);
@@ -998,7 +998,7 @@ int set_memory_array_wb(unsigned long *addr, int addrinarray)
998{ 998{
999 int i; 999 int i;
1000 for (i = 0; i < addrinarray; i++) 1000 for (i = 0; i < addrinarray; i++)
1001 free_memtype(addr[i], addr[i] + PAGE_SIZE); 1001 free_memtype(__pa(addr[i]), __pa(addr[i]) + PAGE_SIZE);
1002 1002
1003 return change_page_attr_clear(addr, addrinarray, 1003 return change_page_attr_clear(addr, addrinarray,
1004 __pgprot(_PAGE_CACHE_MASK), 1); 1004 __pgprot(_PAGE_CACHE_MASK), 1);