From a3ae91b0a02a4ca0088f30d572c848f5d522573a Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Wed, 30 Jan 2008 13:33:50 +0100 Subject: [PATCH] x86: cpa: remove unnecessary masking of address virt_to_page does not care about the bits below the page granuality. So don't mask them. Signed-off-by: Andi Kleen Signed-off-by: Harvey Harrison Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- arch/x86/mm/pageattr_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/mm/pageattr_64.c b/arch/x86/mm/pageattr_64.c index b21a874c2d..4d172881af 100644 --- a/arch/x86/mm/pageattr_64.c +++ b/arch/x86/mm/pageattr_64.c @@ -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)) { -- 2.39.5