lkml.org 
[lkml]   [2008]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] [23/31] CPA: Remove unnecessary masking of address
    Date

    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>

    ---
    arch/x86/mm/pageattr_64.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    Index: linux/arch/x86/mm/pageattr_64.c
    ===================================================================
    --- linux.orig/arch/x86/mm/pageattr_64.c
    +++ linux/arch/x86/mm/pageattr_64.c
    @@ -204,7 +204,7 @@ __change_page_attr(unsigned long address

    kpte = lookup_address(address, &level);
    if (!kpte) return 0;
    - kpte_page = virt_to_page(((unsigned long)kpte) & PAGE_MASK);
    + kpte_page = virt_to_page(kpte);
    BUG_ON(PageCompound(kpte_page));
    BUG_ON(PageLRU(kpte_page));


    \
     
     \ /
      Last update: 2008-01-14 23:29    [W:2.207 / U:2.252 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site