diff options
author | Palmer Dabbelt <palmer@sifive.com> | 2018-10-02 15:15:02 -0400 |
---|---|---|
committer | Palmer Dabbelt <palmer@sifive.com> | 2018-10-22 20:03:36 -0400 |
commit | 46373cb442c56d2f8a4c8b3f777c89d20546c9d5 (patch) | |
tree | 54268e1abc962ff72a2c835cde3df095587b3d46 | |
parent | 177fae4515889e2407810c5167a5227da8b37cce (diff) |
RISC-V: Use mmgrab()
commit f1f1007644ff ("mm: add new mmgrab() helper") added a
helper that we missed out on.
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
-rw-r--r-- | arch/riscv/kernel/smpboot.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c index 4a232600cedb..17e748312afd 100644 --- a/arch/riscv/kernel/smpboot.c +++ b/arch/riscv/kernel/smpboot.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/irq.h> | 30 | #include <linux/irq.h> |
31 | #include <linux/of.h> | 31 | #include <linux/of.h> |
32 | #include <linux/sched/task_stack.h> | 32 | #include <linux/sched/task_stack.h> |
33 | #include <linux/sched/mm.h> | ||
33 | #include <asm/irq.h> | 34 | #include <asm/irq.h> |
34 | #include <asm/mmu_context.h> | 35 | #include <asm/mmu_context.h> |
35 | #include <asm/tlbflush.h> | 36 | #include <asm/tlbflush.h> |
@@ -101,7 +102,7 @@ asmlinkage void __init smp_callin(void) | |||
101 | struct mm_struct *mm = &init_mm; | 102 | struct mm_struct *mm = &init_mm; |
102 | 103 | ||
103 | /* All kernel threads share the same mm context. */ | 104 | /* All kernel threads share the same mm context. */ |
104 | atomic_inc(&mm->mm_count); | 105 | mmgrab(mm); |
105 | current->active_mm = mm; | 106 | current->active_mm = mm; |
106 | 107 | ||
107 | trap_init(); | 108 | trap_init(); |