Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1689415imm; Tue, 2 Oct 2018 12:16:00 -0700 (PDT) X-Google-Smtp-Source: ACcGV60hNVK6aB6LGf6jBhZwo6PxC5fuJ/fDjEJA7yIrOOpBA3bR5+KSUSOIAY75D1KfP0mYn5Nq X-Received: by 2002:a63:6385:: with SMTP id x127-v6mr15693102pgb.10.1538507760810; Tue, 02 Oct 2018 12:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538507760; cv=none; d=google.com; s=arc-20160816; b=kVa7i5LtIDCzFAwXuY3ZtQav3d/7XDXUr/+5t+iF5U+hgOPfFPVLrL7dVITIev0biy 2Qiuox0D2tDp7Yw4W4tA9v+HHz4Q1onBJd7M4jTdc6DAnFsjBHfC+2JHgcNYUG4BKKNu qKco9V6YnW1vQZcjp+seJh0MBfgHuPc9qmi6N1KSVyQy49VTMdZ8akTrBEdY+VfRKHmQ tn7PC5zDx4L3VmIHHGQ7VG2IO3I0VFLweAJalwjj/zpdIGpxwZpTqv6VAC5VFmEtrG1+ EItDbGaixdx4civDSi4mWsBYE5Ik2SLSpQr8tCyX48av3s8JbrVDA0FcmFbv5QUlmB2q G+dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=zr629tvLgRpIGLIT9a90TCET176yehwtgxKL7KCbysA=; b=pgAm1W3IrB739y3h5SJ80kVh0+y3pNkYK/uO0+04LFJ9zcwuHCtJVG4SBo/Ce7h1Hj yfFX//cpbkMJcJC6oehYtGquKO8m7io9vZf8FIq2WFLTjAcvw3e0LH7VXnP0ufALc6m2 f6lFdrNC10eys1aWncan6qccEiggLIK7m4VHilnGLKAjaSrkABWsxNCeOvkVAAgY5Rur nZJK7WnNa66ODu4cb39DXXa44T0NXQaDNmKDdO/Ye7uTBCmjcUrvzGWSIWLleFtTfbZ7 Pgj4yuU5hpBaerzh3o/FvlVCDGVk/ziJIoowbZhOPfGYYn/P2V+jLupKG0q8Jumg4toN 2/+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=LSlk9JBw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v9-v6si1350004pfj.167.2018.10.02.12.15.45; Tue, 02 Oct 2018 12:16:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=LSlk9JBw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728110AbeJCCAG (ORCPT + 99 others); Tue, 2 Oct 2018 22:00:06 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:61573 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727585AbeJCCAC (ORCPT ); Tue, 2 Oct 2018 22:00:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1538507711; x=1570043711; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=YFrlU3OmqRZtyf8NLoWNxfiOD2AxshO648ddxoKLstQ=; b=LSlk9JBwZGUs/z9/TiQAOKviOZeh0rY7lYpcI5grNRla67Yk+a74aUPS FnpwM6lSLnFtv/0fs2BO5MzURMY6nyZ6ZDHmPqmyQ24m0HOVNvHSm5UJ1 W5P5T5pmLwgAoJolKvbx07E7/3F00gxO/4+32JHHg+XZmh1xdpJeO4nfz ZofTLcBvB9jJblbCRku/Cb2h041ddwBSO4bI+iej3K+lHVKD0IAIYtY8b D4bD5W+lYPb1HBxlp67P7wd1r2xkYHYso4+YRP5+pMJdjJdgIL6NnlJ9C XpbqiG8gYaacW2/RUHpLceKLkMd10stjJiQvC58HiMONS9RzShAcB/MS+ w==; X-IronPort-AV: E=Sophos;i="5.54,332,1534780800"; d="scan'208";a="91076749" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 03 Oct 2018 03:15:09 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 02 Oct 2018 12:00:51 -0700 Received: from jedi-01.sdcorp.global.sandisk.com (HELO jedi-01.int.fusionio.com) ([10.11.143.218]) by uls-op-cesaip02.wdc.com with ESMTP; 02 Oct 2018 12:15:10 -0700 From: Atish Patra To: linux-riscv@lists.infradead.org, palmer@sifive.com Cc: anup@brainfault.org, hch@infradead.org, linux-kernel@vger.kernel.org, atish.patra@wdc.com Subject: [PATCH v6 09/14] RISC-V: Use mmgrab() Date: Tue, 2 Oct 2018 12:15:02 -0700 Message-Id: <1538507707-22299-10-git-send-email-atish.patra@wdc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538507707-22299-1-git-send-email-atish.patra@wdc.com> References: <1538507707-22299-1-git-send-email-atish.patra@wdc.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Palmer Dabbelt commit f1f1007644ff ("mm: add new mmgrab() helper") added a helper that we missed out on. Signed-off-by: Palmer Dabbelt Reviewed-by: Christoph Hellwig Signed-off-by: Atish Patra --- 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 #include #include +#include #include #include #include @@ -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