Skip to content

Commit

Permalink
powerpc/mm: Remove hugepd leftovers
Browse files Browse the repository at this point in the history
All targets have now opted out of CONFIG_ARCH_HAS_HUGEPD so
remove left over code.

Signed-off-by: Christophe Leroy <[email protected]>
  • Loading branch information
chleroy committed May 26, 2024
1 parent c0cd6de commit c62f92e
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 476 deletions.
7 changes: 0 additions & 7 deletions arch/powerpc/include/asm/hugetlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ static inline int is_hugepage_only_range(struct mm_struct *mm,
}
#define is_hugepage_only_range is_hugepage_only_range

#ifdef CONFIG_ARCH_HAS_HUGEPD
#define __HAVE_ARCH_HUGETLB_FREE_PGD_RANGE
void hugetlb_free_pgd_range(struct mmu_gather *tlb, unsigned long addr,
unsigned long end, unsigned long floor,
unsigned long ceiling);
#endif

#define __HAVE_ARCH_HUGE_SET_HUGE_PTE_AT
void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep,
pte_t pte, unsigned long sz);
Expand Down
6 changes: 0 additions & 6 deletions arch/powerpc/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,6 @@ static inline const void *pfn_to_kaddr(unsigned long pfn)
#define is_kernel_addr(x) ((x) >= TASK_SIZE)
#endif

/*
* Some number of bits at the level of the page table that points to
* a hugepte are used to encode the size. This masks those bits.
*/
#define HUGEPD_SHIFT_MASK 0x3f

#ifndef __ASSEMBLY__

#ifdef CONFIG_PPC_BOOK3S_64
Expand Down
10 changes: 0 additions & 10 deletions arch/powerpc/include/asm/pgtable-be-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,4 @@ static inline bool pmd_xchg(pmd_t *pmdp, pmd_t old, pmd_t new)
return pmd_raw(old) == prev;
}

#ifdef CONFIG_ARCH_HAS_HUGEPD
typedef struct { __be64 pdbe; } hugepd_t;
#define __hugepd(x) ((hugepd_t) { cpu_to_be64(x) })

static inline unsigned long hpd_val(hugepd_t x)
{
return be64_to_cpu(x.pdbe);
}
#endif

#endif /* _ASM_POWERPC_PGTABLE_BE_TYPES_H */
9 changes: 0 additions & 9 deletions arch/powerpc/include/asm/pgtable-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,4 @@ static inline bool pte_xchg(pte_t *ptep, pte_t old, pte_t new)
}
#endif

#ifdef CONFIG_ARCH_HAS_HUGEPD
typedef struct { unsigned long pd; } hugepd_t;
#define __hugepd(x) ((hugepd_t) { (x) })
static inline unsigned long hpd_val(hugepd_t x)
{
return x.pd;
}
#endif

#endif /* _ASM_POWERPC_PGTABLE_TYPES_H */
Loading

0 comments on commit c62f92e

Please sign in to comment.