lkml.org 
[lkml]   [2008]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] [4/8] Add pgtable accessor functions for GB pages
    Date

    Signed-off-by: Andi Kleen <ak@suse.de>

    ---
    include/asm-x86/pgtable_64.h | 6 ++++++
    1 file changed, 6 insertions(+)

    Index: linux/include/asm-x86/pgtable_64.h
    ===================================================================
    --- linux.orig/include/asm-x86/pgtable_64.h
    +++ linux/include/asm-x86/pgtable_64.h
    @@ -208,6 +208,12 @@ static inline unsigned long pmd_bad(pmd_
    #define pud_offset(pgd, address) ((pud_t *) pgd_page_vaddr(*(pgd)) + pud_index(address))
    #define pud_present(pud) (pud_val(pud) & _PAGE_PRESENT)

    +static inline int pud_large(pud_t pte)
    +{
    + return (pud_val(pte) & (_PAGE_PSE|_PAGE_PRESENT)) ==
    + (_PAGE_PSE|_PAGE_PRESENT);
    +}
    +
    /* PMD - Level 2 access */
    #define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val(pmd) & PTE_MASK))
    #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))

    \
     
     \ /
      Last update: 2008-01-19 07:53    [W:0.035 / U:0.396 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site