Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _LINUX_MMU_CONTEXT_H
0003 #define _LINUX_MMU_CONTEXT_H
0004 
0005 #include <asm/mmu_context.h>
0006 #include <asm/mmu.h>
0007 
0008 /* Architectures that care about IRQ state in switch_mm can override this. */
0009 #ifndef switch_mm_irqs_off
0010 # define switch_mm_irqs_off switch_mm
0011 #endif
0012 
0013 #ifndef leave_mm
0014 static inline void leave_mm(int cpu) { }
0015 #endif
0016 
0017 /*
0018  * CPUs that are capable of running user task @p. Must contain at least one
0019  * active CPU. It is assumed that the kernel can run on all CPUs, so calling
0020  * this for a kernel thread is pointless.
0021  *
0022  * By default, we assume a sane, homogeneous system.
0023  */
0024 #ifndef task_cpu_possible_mask
0025 # define task_cpu_possible_mask(p)  cpu_possible_mask
0026 # define task_cpu_possible(cpu, p)  true
0027 #else
0028 # define task_cpu_possible(cpu, p)  cpumask_test_cpu((cpu), task_cpu_possible_mask(p))
0029 #endif
0030 
0031 #endif