[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1536221135-182613-9-git-send-email-atish.patra@wdc.com>
Date: Thu, 6 Sep 2018 01:05:31 -0700
From: Atish Patra <atish.patra@....com>
To: palmer@...ive.com, linux-riscv@...ts.infradead.org,
hch@...radead.org, anup@...infault.org
Cc: mark.rutland@....com, atish.patra@....com, tglx@...utronix.de,
linux-kernel@...r.kernel.org, Damien.LeMoal@....com,
marc.zyngier@....com, jeremy.linton@....com,
gregkh@...uxfoundation.org, jason@...edaemon.net,
catalin.marinas@....com, dmitriy@...-tech.org,
ard.biesheuvel@...aro.org
Subject: [PATCH v3 08/12] RISC-V: Use mmgrab()
From: Palmer Dabbelt <palmer@...ive.com>
commit f1f1007644ff ("mm: add new mmgrab() helper") added a
helper that we missed out on.
Signed-off-by: Palmer Dabbelt <palmer@...ive.com>
Reviewed-by: Christoph Hellwig <hch@....de>
Signed-off-by: Atish Patra <atish.patra@....com>
---
arch/riscv/kernel/smpboot.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c
index 4a232600..17e74831 100644
--- a/arch/riscv/kernel/smpboot.c
+++ b/arch/riscv/kernel/smpboot.c
@@ -30,6 +30,7 @@
#include <linux/irq.h>
#include <linux/of.h>
#include <linux/sched/task_stack.h>
+#include <linux/sched/mm.h>
#include <asm/irq.h>
#include <asm/mmu_context.h>
#include <asm/tlbflush.h>
@@ -101,7 +102,7 @@ asmlinkage void __init smp_callin(void)
struct mm_struct *mm = &init_mm;
/* All kernel threads share the same mm context. */
- atomic_inc(&mm->mm_count);
+ mmgrab(mm);
current->active_mm = mm;
trap_init();
--
2.7.4
Powered by blists - more mailing lists