Commit 7b35738e authored by Dave Hansen's avatar Dave Hansen Committed by Linus Torvalds

[PATCH] don't align virt_to_page() args

__pa() is always be consistent inside of a single page.  The next thing
virt_to_page() does after that is shift down the address, killing the bits
that __change_page_attr() just masked off.

Remove the superfluous masking.
Signed-off-by: default avatarDave Hansen <haveblue@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d1563e85
......@@ -114,7 +114,7 @@ __change_page_attr(struct page *page, pgprot_t prot)
kpte = lookup_address(address);
if (!kpte)
return -EINVAL;
kpte_page = virt_to_page(((unsigned long)kpte) & PAGE_MASK);
kpte_page = virt_to_page(kpte);
if (pgprot_val(prot) != pgprot_val(PAGE_KERNEL)) {
if ((pte_val(*kpte) & _PAGE_PSE) == 0) {
pte_t old = *kpte;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment