mmu_context.h 855 B

12345678910111213141516171819202122232425262728293031
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _LINUX_MMU_CONTEXT_H
  3. #define _LINUX_MMU_CONTEXT_H
  4. #include <asm/mmu_context.h>
  5. #include <asm/mmu.h>
  6. /* Architectures that care about IRQ state in switch_mm can override this. */
  7. #ifndef switch_mm_irqs_off
  8. # define switch_mm_irqs_off switch_mm
  9. #endif
  10. #ifndef leave_mm
  11. static inline void leave_mm(int cpu) { }
  12. #endif
  13. /*
  14. * CPUs that are capable of running user task @p. Must contain at least one
  15. * active CPU. It is assumed that the kernel can run on all CPUs, so calling
  16. * this for a kernel thread is pointless.
  17. *
  18. * By default, we assume a sane, homogeneous system.
  19. */
  20. #ifndef task_cpu_possible_mask
  21. # define task_cpu_possible_mask(p) cpu_possible_mask
  22. # define task_cpu_possible(cpu, p) true
  23. #else
  24. # define task_cpu_possible(cpu, p) cpumask_test_cpu((cpu), task_cpu_possible_mask(p))
  25. #endif
  26. #endif