提交 a3ae91b0 编写于 作者: A Andi Kleen 提交者: Ingo Molnar

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: NAndi Kleen <ak@suse.de>
Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 5b016432
...@@ -148,7 +148,7 @@ __change_page_attr(unsigned long address, unsigned long pfn, pgprot_t prot, ...@@ -148,7 +148,7 @@ __change_page_attr(unsigned long address, unsigned long pfn, pgprot_t prot,
if (!kpte) if (!kpte)
return 0; 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(PageLRU(kpte_page));
BUG_ON(PageCompound(kpte_page)); BUG_ON(PageCompound(kpte_page));
if (pgprot_val(prot) != pgprot_val(ref_prot)) { if (pgprot_val(prot) != pgprot_val(ref_prot)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册