Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/mm: delete unused cpu argument to leave_mm()

The argument is unused since commit 3d28ebceaffa ("x86/mm: Rework lazy
TLB to track the actual loaded mm"), delete it.

Link: https://lkml.kernel.org/r/20240126080644.1714297-1-yosryahmed@google.com
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov (AMD) <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Yosry Ahmed and committed by
Andrew Morton
7dbbc8f5 5cec4eb7

+6 -6
+1 -1
arch/x86/include/asm/mmu.h
··· 75 75 .lock = __MUTEX_INITIALIZER(mm.context.lock), \ 76 76 } 77 77 78 - void leave_mm(int cpu); 78 + void leave_mm(void); 79 79 #define leave_mm leave_mm 80 80 81 81 #endif /* _ASM_X86_MMU_H */
+1 -1
arch/x86/kernel/alternative.c
··· 1805 1805 * restoring the previous mm. 1806 1806 */ 1807 1807 if (this_cpu_read(cpu_tlbstate_shared.is_lazy)) 1808 - leave_mm(smp_processor_id()); 1808 + leave_mm(); 1809 1809 1810 1810 temp_state.mm = this_cpu_read(cpu_tlbstate.loaded_mm); 1811 1811 switch_mm_irqs_off(NULL, mm, current);
+1 -1
arch/x86/mm/tlb.c
··· 299 299 write_cr3(new_mm_cr3); 300 300 } 301 301 302 - void leave_mm(int cpu) 302 + void leave_mm(void) 303 303 { 304 304 struct mm_struct *loaded_mm = this_cpu_read(cpu_tlbstate.loaded_mm); 305 305
+1 -1
arch/x86/xen/mmu_pv.c
··· 913 913 struct mm_struct *mm = info; 914 914 915 915 if (this_cpu_read(cpu_tlbstate.loaded_mm) == mm) 916 - leave_mm(smp_processor_id()); 916 + leave_mm(); 917 917 918 918 /* 919 919 * If this cpu still has a stale cr3 reference, then make sure
+1 -1
drivers/cpuidle/cpuidle.c
··· 237 237 } 238 238 239 239 if (target_state->flags & CPUIDLE_FLAG_TLB_FLUSHED) 240 - leave_mm(dev->cpu); 240 + leave_mm(); 241 241 242 242 /* Take note of the planned idle state. */ 243 243 sched_idle_set_state(target_state);
+1 -1
include/linux/mmu_context.h
··· 11 11 #endif 12 12 13 13 #ifndef leave_mm 14 - static inline void leave_mm(int cpu) { } 14 + static inline void leave_mm(void) { } 15 15 #endif 16 16 17 17 /*