Skip to content

Commit 7820856

Browse files
kvaneeshmpe
authored andcommitted
powerpc/mm/book3e/64: Remove unsupported 64Kpage size from 64bit booke
We have in Kconfig config PPC_64K_PAGES bool "64k page size" depends on !PPC_FSL_BOOK3E && (44x || PPC_BOOK3S_64 || PPC_BOOK3E_64) select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64 Only supported BOOK3E 64 bit platforms is FSL_BOOK3E. Remove the dead 64k page support code from 64bit nohash. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 8ce74cf commit 7820856

File tree

4 files changed

+4
-127
lines changed

4 files changed

+4
-127
lines changed

arch/powerpc/include/asm/mmu-book3e.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,6 @@ typedef struct {
230230
unsigned int id;
231231
unsigned int active;
232232
unsigned long vdso_base;
233-
#ifdef CONFIG_PPC_64K_PAGES
234-
/* for 4K PTE fragment support */
235-
void *pte_frag;
236-
#endif
237233
} mm_context_t;
238234

239235
/* Page size definitions, common between 32 and 64-bit
@@ -275,8 +271,6 @@ static inline unsigned int mmu_psize_to_shift(unsigned int mmu_psize)
275271
*/
276272
#if defined(CONFIG_PPC_4K_PAGES)
277273
#define mmu_virtual_psize MMU_PAGE_4K
278-
#elif defined(CONFIG_PPC_64K_PAGES)
279-
#define mmu_virtual_psize MMU_PAGE_64K
280274
#else
281275
#error Unsupported page size
282276
#endif

arch/powerpc/include/asm/nohash/64/pgalloc.h

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
5252
kmem_cache_free(PGT_CACHE(PGD_INDEX_SIZE), pgd);
5353
}
5454

55-
#ifndef CONFIG_PPC_64K_PAGES
56-
5755
#define pgd_populate(MM, PGD, PUD) pgd_set(PGD, (unsigned long)PUD)
5856

5957
static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
@@ -131,64 +129,6 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table,
131129
pgtable_free_tlb(tlb, page_address(table), 0);
132130
}
133131

134-
#else /* if CONFIG_PPC_64K_PAGES */
135-
136-
extern pte_t *pte_fragment_alloc(struct mm_struct *, unsigned long, int);
137-
extern void pte_fragment_free(unsigned long *, int);
138-
extern void pgtable_free_tlb(struct mmu_gather *tlb, void *table, int shift);
139-
#ifdef CONFIG_SMP
140-
extern void __tlb_remove_table(void *_table);
141-
#endif
142-
143-
#define pud_populate(mm, pud, pmd) pud_set(pud, (unsigned long)pmd)
144-
145-
static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
146-
pte_t *pte)
147-
{
148-
pmd_set(pmd, (unsigned long)pte);
149-
}
150-
151-
static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
152-
pgtable_t pte_page)
153-
{
154-
pmd_set(pmd, (unsigned long)pte_page);
155-
}
156-
157-
static inline pgtable_t pmd_pgtable(pmd_t pmd)
158-
{
159-
return (pgtable_t)(pmd_val(pmd) & ~PMD_MASKED_BITS);
160-
}
161-
162-
static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
163-
unsigned long address)
164-
{
165-
return (pte_t *)pte_fragment_alloc(mm, address, 1);
166-
}
167-
168-
static inline pgtable_t pte_alloc_one(struct mm_struct *mm,
169-
unsigned long address)
170-
{
171-
return (pgtable_t)pte_fragment_alloc(mm, address, 0);
172-
}
173-
174-
static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
175-
{
176-
pte_fragment_free((unsigned long *)pte, 1);
177-
}
178-
179-
static inline void pte_free(struct mm_struct *mm, pgtable_t ptepage)
180-
{
181-
pte_fragment_free((unsigned long *)ptepage, 0);
182-
}
183-
184-
static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table,
185-
unsigned long address)
186-
{
187-
tlb_flush_pgtable(tlb, address);
188-
pgtable_free_tlb(tlb, table, 0);
189-
}
190-
#endif /* CONFIG_PPC_64K_PAGES */
191-
192132
static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
193133
{
194134
return kmem_cache_alloc(PGT_CACHE(PMD_CACHE_INDEX),

arch/powerpc/include/asm/nohash/64/pgtable-64k.h

Lines changed: 0 additions & 57 deletions
This file was deleted.

arch/powerpc/include/asm/nohash/64/pgtable.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
* the ppc64 hashed page table.
77
*/
88

9-
#ifdef CONFIG_PPC_64K_PAGES
10-
#include <asm/nohash/64/pgtable-64k.h>
11-
#else
129
#include <asm/nohash/64/pgtable-4k.h>
13-
#endif
1410
#include <asm/barrier.h>
1511

12+
#ifdef CONFIG_PPC_64K_PAGES
13+
#error "Page size not supported"
14+
#endif
15+
1616
#define FIRST_USER_ADDRESS 0UL
1717

1818
/*

0 commit comments

Comments
 (0)