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] [4/31] Add pte_pgprot on i386
    Date

    64bit already had it.

    Needed for later patches.

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

    ---
    include/asm-x86/pgtable-2level.h | 2 ++
    include/asm-x86/pgtable-3level.h | 2 ++
    2 files changed, 4 insertions(+)

    Index: linux/include/asm-x86/pgtable-2level.h
    ===================================================================
    --- linux.orig/include/asm-x86/pgtable-2level.h
    +++ linux/include/asm-x86/pgtable-2level.h
    @@ -75,6 +75,8 @@ static inline int pte_exec_kernel(pte_t
    #define pgoff_to_pte(off) \
    ((pte_t) { .pte_low = (((off) & 0x1f) << 1) + (((off) >> 5) << 8) + _PAGE_FILE })

    +#define pte_pgprot(x) __pgprot((x).pte_low & 0xfff)
    +
    /* Encode and de-code a swap entry */
    #define __swp_type(x) (((x).val >> 1) & 0x1f)
    #define __swp_offset(x) ((x).val >> 8)
    Index: linux/include/asm-x86/pgtable-3level.h
    ===================================================================
    --- linux.orig/include/asm-x86/pgtable-3level.h
    +++ linux/include/asm-x86/pgtable-3level.h
    @@ -142,6 +142,8 @@ static inline unsigned long pte_pfn(pte_
    return pte_val(pte) >> PAGE_SHIFT;
    }

    +#define pte_pgprot(x) __pgprot(pte_val(x) & (0xfff | _PAGE_NX))
    +
    /*
    * Bits 0, 6 and 7 are taken in the low part of the pte,
    * put the 32 bits of offset into the high part.

    \
     
     \ /
      Last update: 2008-01-14 23:21    [W:0.028 / U:0.828 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site