lkml.org 
[lkml]   [2008]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 4 of 8] x86: use PTE_MASK in 32-bit PAE
    Date
    From
    Use PTE_MASK in 3-level pagetables (ie, 32-bit PAE).

    Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
    ---
    include/asm-x86/pgtable-3level.h | 6 +++---
    1 file changed, 3 insertions(+), 3 deletions(-)

    diff --git a/include/asm-x86/pgtable-3level.h b/include/asm-x86/pgtable-3level.h
    --- a/include/asm-x86/pgtable-3level.h
    +++ b/include/asm-x86/pgtable-3level.h
    @@ -120,9 +120,9 @@
    write_cr3(pgd);
    }

    -#define pud_page(pud) ((struct page *) __va(pud_val(pud) & PAGE_MASK))
    +#define pud_page(pud) ((struct page *) __va(pud_val(pud) & PTE_MASK))

    -#define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PAGE_MASK))
    +#define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_MASK))


    /* Find an entry in the second-level page table.. */
    @@ -160,7 +160,7 @@

    static inline unsigned long pte_pfn(pte_t pte)
    {
    - return (pte_val(pte) & ~_PAGE_NX) >> PAGE_SHIFT;
    + return (pte_val(pte) & PTE_MASK) >> PAGE_SHIFT;
    }

    /*



    \
     
     \ /
      Last update: 2008-05-20 11:11    [W:0.091 / U:212.672 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site