Skip to content

Commit

Permalink
x86: cpa: remove unnecessary masking of address
Browse files Browse the repository at this point in the history
virt_to_page does not care about the bits below the page granuality.
So don't mask them.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Andi Kleen authored and Ingo Molnar committed Jan 30, 2008
1 parent 5b01643 commit a3ae91b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/mm/pageattr_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ __change_page_attr(unsigned long address, unsigned long pfn, pgprot_t prot,
if (!kpte)
return 0;

kpte_page = virt_to_page(((unsigned long)kpte) & PAGE_MASK);
kpte_page = virt_to_page(kpte);
BUG_ON(PageLRU(kpte_page));
BUG_ON(PageCompound(kpte_page));
if (pgprot_val(prot) != pgprot_val(ref_prot)) {
Expand Down

0 comments on commit a3ae91b

Please sign in to comment.