Commit d463af45 authored by Philippe Gerum's avatar Philippe Gerum
Browse files

arm64/ipipe: hard protect cpu_switch_mm() directly

parent 80cb7b8e
......@@ -109,13 +109,9 @@ static inline void cpu_set_default_tcr_t0sz(void)
static inline void switch_new_context(struct mm_struct *mm)
{
unsigned long flags;
__new_context(mm);
local_irq_save(flags);
cpu_switch_mm(mm->pgd, mm);
local_irq_restore(flags);
}
static inline int
......
......@@ -41,8 +41,11 @@ extern u64 cpu_do_resume(phys_addr_t ptr, u64 idmap_ttbr);
#define cpu_switch_mm(pgd,mm) \
do { \
unsigned long __flags; \
BUG_ON(pgd == swapper_pg_dir); \
__flags = hard_local_irq_save(); \
cpu_do_switch_mm(virt_to_phys(pgd),mm); \
hard_local_irq_restore(__flags); \
} while (0)
#endif /* __ASSEMBLY__ */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment