Merge tag 'pci-v6.16-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
[linux-block.git] / include / linux / mmu_context.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
3d2d827f
MT
2#ifndef _LINUX_MMU_CONTEXT_H
3#define _LINUX_MMU_CONTEXT_H
4
f98db601 5#include <asm/mmu_context.h>
bf9282dc 6#include <asm/mmu.h>
f98db601 7
f98db601
AL
8/* Architectures that care about IRQ state in switch_mm can override this. */
9#ifndef switch_mm_irqs_off
10# define switch_mm_irqs_off switch_mm
11#endif
12
bf9282dc 13#ifndef leave_mm
7dbbc8f5 14static inline void leave_mm(void) { }
bf9282dc
PZ
15#endif
16
9ae606bc
WD
17/*
18 * CPUs that are capable of running user task @p. Must contain at least one
19 * active CPU. It is assumed that the kernel can run on all CPUs, so calling
20 * this for a kernel thread is pointless.
21 *
22 * By default, we assume a sane, homogeneous system.
23 */
24#ifndef task_cpu_possible_mask
25# define task_cpu_possible_mask(p) cpu_possible_mask
26# define task_cpu_possible(cpu, p) true
3a544661 27# define task_cpu_fallback_mask(p) housekeeping_cpumask(HK_TYPE_TICK)
9ae606bc
WD
28#else
29# define task_cpu_possible(cpu, p) cpumask_test_cpu((cpu), task_cpu_possible_mask(p))
30#endif
31
f7d30434
KS
32#ifndef mm_untag_mask
33static inline unsigned long mm_untag_mask(struct mm_struct *mm)
34{
35 return -1UL;
36}
37#endif
38
23e5d9ec
KS
39#ifndef arch_pgtable_dma_compat
40static inline bool arch_pgtable_dma_compat(struct mm_struct *mm)
41{
42 return true;
43}
44#endif
45
3d2d827f 46#endif