summaryrefslogtreecommitdiff
path: root/arch/x86/mm/pageattr.c
diff options
context:
space:
mode:
authorRene Herman <rene.herman@keyaccess.nl>2008-08-22 00:10:13 +0200
committerIngo Molnar <mingo@elte.hu>2008-08-22 06:07:32 +0200
commit9a79f4f491f92bc713e1f28f96516b141b752600 (patch)
tree4b95106da98ae6c02ff9a256149403ca7c2b7bd3 /arch/x86/mm/pageattr.c
parent8b53b57576292b92b27769f9e213df19b6e57786 (diff)
downloadlwn-9a79f4f491f92bc713e1f28f96516b141b752600.tar.gz
lwn-9a79f4f491f92bc713e1f28f96516b141b752600.zip
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)
* for now UC MINUS. see comments in ioremap_nocache()
*/
for (i = 0; i < addrinarray; i++) {
- if (reserve_memtype(addr[i], addr[i] + PAGE_SIZE,
+ if (reserve_memtype(__pa(addr[i]), __pa(addr[i]) + PAGE_SIZE,
_PAGE_CACHE_UC_MINUS, NULL))
goto out;
}
@@ -956,7 +956,7 @@ int set_memory_array_uc(unsigned long *addr, int addrinarray)
__pgprot(_PAGE_CACHE_UC_MINUS), 1);
out:
while (--i >= 0)
- free_memtype(addr[i], addr[i] + PAGE_SIZE);
+ free_memtype(__pa(addr[i]), __pa(addr[i]) + PAGE_SIZE);
return -EINVAL;
}
EXPORT_SYMBOL(set_memory_array_uc);
@@ -998,7 +998,7 @@ int set_memory_array_wb(unsigned long *addr, int addrinarray)
{
int i;
for (i = 0; i < addrinarray; i++)
- free_memtype(addr[i], addr[i] + PAGE_SIZE);
+ free_memtype(__pa(addr[i]), __pa(addr[i]) + PAGE_SIZE);
return change_page_attr_clear(addr, addrinarray,
__pgprot(_PAGE_CACHE_MASK), 1);