Skip to content

Commit cba3574

Browse files
committed
arm64: move update_mmu_cache() into asm/pgtable.h
Mark Brown reported an allnoconfig build failure in -next: Today's linux-next fails to build an arm64 allnoconfig due to "mm: make GUP handle pfn mapping unless FOLL_GET is requested" which causes: > arm64-allnoconfig > ../mm/gup.c:51:4: error: implicit declaration of function 'update_mmu_cache' [-Werror=implicit-function-declaration] Fix the error by moving the function to asm/pgtable.h, as is the case for most other architectures. Reported-by: Mark Brown <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent aaf6f2f commit cba3574

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

arch/arm64/include/asm/pgtable.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,21 @@ extern int kern_addr_valid(unsigned long addr);
505505

506506
#define pgtable_cache_init() do { } while (0)
507507

508+
/*
509+
* On AArch64, the cache coherency is handled via the set_pte_at() function.
510+
*/
511+
static inline void update_mmu_cache(struct vm_area_struct *vma,
512+
unsigned long addr, pte_t *ptep)
513+
{
514+
/*
515+
* set_pte() does not have a DSB for user mappings, so make sure that
516+
* the page table write is visible.
517+
*/
518+
dsb(ishst);
519+
}
520+
521+
#define update_mmu_cache_pmd(vma, address, pmd) do { } while (0)
522+
508523
#endif /* !__ASSEMBLY__ */
509524

510525
#endif /* __ASM_PGTABLE_H */

arch/arm64/include/asm/tlbflush.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -154,20 +154,6 @@ static inline void __flush_tlb_pgtable(struct mm_struct *mm,
154154
asm("tlbi vae1is, %0" : : "r" (addr));
155155
dsb(ish);
156156
}
157-
/*
158-
* On AArch64, the cache coherency is handled via the set_pte_at() function.
159-
*/
160-
static inline void update_mmu_cache(struct vm_area_struct *vma,
161-
unsigned long addr, pte_t *ptep)
162-
{
163-
/*
164-
* set_pte() does not have a DSB for user mappings, so make sure that
165-
* the page table write is visible.
166-
*/
167-
dsb(ishst);
168-
}
169-
170-
#define update_mmu_cache_pmd(vma, address, pmd) do { } while (0)
171157

172158
#endif
173159

0 commit comments

Comments
 (0)