Skip to content

Commit c7bcbc8

Browse files
Peter ZijlstraRich Felker
authored andcommitted
sh/tlb: Fix PGTABLE_LEVELS > 2
Geert reported that his SH7722-based Migo-R board failed to boot after commit: c5b27a8 ("sh/tlb: Convert SH to generic mmu_gather") That commit fell victim to copying the wrong pattern -- __pmd_free_tlb() used to be implemented with pmd_free(). Fixes: c5b27a8 ("sh/tlb: Convert SH to generic mmu_gather") Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Rich Felker <dalias@libc.org>
1 parent 92ed301 commit c7bcbc8

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

‎arch/sh/include/asm/pgalloc.h‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ extern void pgd_free(struct mm_struct *mm, pgd_t *pgd);
1212
extern void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd);
1313
extern pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address);
1414
extern void pmd_free(struct mm_struct *mm, pmd_t *pmd);
15+
#define __pmd_free_tlb(tlb, pmdp, addr) pmd_free((tlb)->mm, (pmdp))
1516
#endif
1617

1718
static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
@@ -33,13 +34,4 @@ do { \
3334
tlb_remove_page((tlb), (pte)); \
3435
} while (0)
3536

36-
#if CONFIG_PGTABLE_LEVELS > 2
37-
#define __pmd_free_tlb(tlb, pmdp, addr) \
38-
do { \
39-
struct page *page = virt_to_page(pmdp); \
40-
pgtable_pmd_page_dtor(page); \
41-
tlb_remove_page((tlb), page); \
42-
} while (0);
43-
#endif
44-
4537
#endif /* __ASM_SH_PGALLOC_H */

0 commit comments

Comments
 (0)