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

um: Stop tracking virtual CPUs via mm_cpumask()

In UML, each user address space is represented as a separate stub
process on the host. Therefore, user address spaces do not require
TLB management on UML virtual CPUs, and it's unnecessary to track
which virtual CPUs they have executed on.

Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Tiwei Bie and committed by
Johannes Berg
a73a9aad e047f9af

-11
-11
arch/um/include/asm/mmu_context.h
··· 13 13 #include <asm/mm_hooks.h> 14 14 #include <asm/mmu.h> 15 15 16 - #define activate_mm activate_mm 17 - static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) 18 - { 19 - } 20 - 21 16 static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, 22 17 struct task_struct *tsk) 23 18 { 24 - unsigned cpu = smp_processor_id(); 25 - 26 - if (prev != next) { 27 - cpumask_clear_cpu(cpu, mm_cpumask(prev)); 28 - cpumask_set_cpu(cpu, mm_cpumask(next)); 29 - } 30 19 } 31 20 32 21 #define init_new_context init_new_context