lkml.org 
[lkml]   [2018]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v4 13/20] powerpc/book3s32: Remove CONFIG_BOOKE dependent code
    Date
    BOOK3S/32 cannot be BOOKE, so remove useless code

    Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
    ---
    arch/powerpc/include/asm/book3s/32/pgalloc.h | 18 ------------------
    arch/powerpc/include/asm/book3s/32/pgtable.h | 14 --------------
    2 files changed, 32 deletions(-)

    diff --git a/arch/powerpc/include/asm/book3s/32/pgalloc.h b/arch/powerpc/include/asm/book3s/32/pgalloc.h
    index 701748132442..2639b4b7d67c 100644
    --- a/arch/powerpc/include/asm/book3s/32/pgalloc.h
    +++ b/arch/powerpc/include/asm/book3s/32/pgalloc.h
    @@ -47,8 +47,6 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
    #define __pmd_free_tlb(tlb,x,a) do { } while (0)
    /* #define pgd_populate(mm, pmd, pte) BUG() */

    -#ifndef CONFIG_BOOKE
    -
    static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp,
    pte_t *pte)
    {
    @@ -62,22 +60,6 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp,
    }

    #define pmd_pgtable(pmd) pmd_page(pmd)
    -#else
    -
    -static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp,
    - pte_t *pte)
    -{
    - *pmdp = __pmd((unsigned long)pte | _PMD_PRESENT);
    -}
    -
    -static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp,
    - pgtable_t pte_page)
    -{
    - *pmdp = __pmd((unsigned long)lowmem_page_address(pte_page) | _PMD_PRESENT);
    -}
    -
    -#define pmd_pgtable(pmd) pmd_page(pmd)
    -#endif

    static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
    {
    diff --git a/arch/powerpc/include/asm/book3s/32/pgtable.h b/arch/powerpc/include/asm/book3s/32/pgtable.h
    index 5ffb7e3b211f..7a8a590f6b4c 100644
    --- a/arch/powerpc/include/asm/book3s/32/pgtable.h
    +++ b/arch/powerpc/include/asm/book3s/32/pgtable.h
    @@ -334,24 +334,10 @@ static inline void __ptep_set_access_flags(struct vm_area_struct *vma,
    #define __HAVE_ARCH_PTE_SAME
    #define pte_same(A,B) (((pte_val(A) ^ pte_val(B)) & ~_PAGE_HASHPTE) == 0)

    -/*
    - * Note that on Book E processors, the pmd contains the kernel virtual
    - * (lowmem) address of the pte page. The physical address is less useful
    - * because everything runs with translation enabled (even the TLB miss
    - * handler). On everything else the pmd contains the physical address
    - * of the pte page. -- paulus
    - */
    -#ifndef CONFIG_BOOKE
    #define pmd_page_vaddr(pmd) \
    ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
    #define pmd_page(pmd) \
    pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)
    -#else
    -#define pmd_page_vaddr(pmd) \
    - ((unsigned long) (pmd_val(pmd) & PAGE_MASK))
    -#define pmd_page(pmd) \
    - pfn_to_page((__pa(pmd_val(pmd)) >> PAGE_SHIFT))
    -#endif

    /* to find an entry in a kernel page-table-directory */
    #define pgd_offset_k(address) pgd_offset(&init_mm, address)
    --
    2.13.3
    \
     
     \ /
      Last update: 2018-09-18 18:58    [W:5.626 / U:0.076 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site