diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h index 1404f43a598650ce45fadbb4dd81ff9304282f3c..1f1e5add0b974810f0c5e98b537b8c488b832d3a 100644 --- a/arch/x86/include/asm/tlbflush.h +++ b/arch/x86/include/asm/tlbflush.h @@ -270,6 +270,11 @@ static inline void arch_tlbbatch_add_pending(struct arch_tlbflush_unmap_batch *b cpumask_or(&batch->cpumask, &batch->cpumask, mm_cpumask(mm)); } +static inline void arch_flush_tlb_batched_pending(struct mm_struct *mm) +{ + flush_tlb_mm(mm); +} + extern void arch_tlbbatch_flush(struct arch_tlbflush_unmap_batch *batch); #endif /* !MODULE */ diff --git a/mm/rmap.c b/mm/rmap.c index 38eafa951fe01f4f41bf459a06c1eb835e07115e..816db3edc116da9e67dff22d50a06913bcc33418 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -677,7 +677,7 @@ static bool should_defer_flush(struct mm_struct *mm, enum ttu_flags flags) void flush_tlb_batched_pending(struct mm_struct *mm) { if (data_race(mm->tlb_flush_batched)) { - flush_tlb_mm(mm); + arch_flush_tlb_batched_pending(mm); /* * Do not allow the compiler to re-order the clearing of