Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1037893imm; Thu, 13 Sep 2018 11:37:57 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdajvp2ZIFrn+Ux8EqTGY4Ie6a9vHIVwBQpDQ7/7pkfEP6zoPNT8x90fi8C4+AtmlXJJ+mps X-Received: by 2002:a63:dc53:: with SMTP id f19-v6mr8247627pgj.56.1536863877387; Thu, 13 Sep 2018 11:37:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536863877; cv=none; d=google.com; s=arc-20160816; b=meHeyF+tH9GsmWAUTB8itBXtKmSdUyBAulApz4sIqJqdwd561ZDChUkBvxlUsEuv2e ONNYJNTUb7FWdnlPFxPJlG9V9TwogYG7sGGjSWzeFJMJtS4zZj8JnY86jE94ZUODu16G XAuW0Jr6S9sAzF8VOmJN8ApLOA5ZbOympCZnl86kOeSo1eLaMx49ABNXvoU8BIosJ3aM C7K+TULawLEy+yy8SWOBpxTi66rasm1PYb0OOCID/eQsn/IRP8AdZMwaCXaFJNH0QoZ5 veCkIyF6jR2dBEHRTNdCOVwdaSCLyGwLAVs/2J02wRiuAa3ZbOp1jNBHGD2dXZG0/0p+ 0K6Q== 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=eJ1xSMVRFRo9sWMoVqjaNHGzW7StLNWgij/orl6G7BSm20BVts1UBC9zMyS6wIa7Oz Mxmg35DGA/t2cdHCSFU8/7I9BRG0Tsy3SebUncaqmPckrFlvX7VS2Bq7rXrnG2cho8Ks bk20YVMMxKeaEdZ85bDUZI7/KH/BHgskPyrBtm4B6GQLDK3mVXzJ1S6h8BjZVQCQox3A 3r6Qs8Mfs8DGkUbzqh+SnMaj7BCA4k41QNA60Xv68DijxJzQLiBfbgxviZMpu+yAf1ik ZKEw3ctqQjp2EGYIWy2bosco5SJbslphontz+xSIvap35EGbzlPtvUZUU09SwbCHKBnF /5bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=Lz2hAVuj; 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 t1-v6si4558831pfb.208.2018.09.13.11.37.41; Thu, 13 Sep 2018 11:37:57 -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=Lz2hAVuj; 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 S1728230AbeIMXrw (ORCPT + 99 others); Thu, 13 Sep 2018 19:47:52 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:26981 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728186AbeIMXrv (ORCPT ); Thu, 13 Sep 2018 19:47:51 -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=1536863830; x=1568399830; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=YFrlU3OmqRZtyf8NLoWNxfiOD2AxshO648ddxoKLstQ=; b=Lz2hAVuj5NIFJqqsIJjacfZrfhfzbJ1si8jBp7TunEyu3NevEFzJrhC3 MDAUBrDuvf7h6/wrd8b4KppLpY3thBV7vm1xKs8Lg1eiGtlYTlTuyaEow LT75AudAiJ/2uFukf6ng98ENbcGZBpPMMhOjIj/R6ofinI9PbbLKK4nli 10b06h90jiT+6BatGOcqfQYY/Rgd5DBXmKUzhf6YdZPkMw4k+vDWjVczz uHTa0+XZZYY3xJFb+dPWvV2M1RAA6+G2PaMdVTXsQDlmsHv33PhDdx0Su FAhSYerqf41uCICYi4zPZhoAe0d2AFpUSJS9KyNSmDcZ+INLWpqXOQpMJ A==; X-IronPort-AV: E=Sophos;i="5.53,370,1531756800"; d="scan'208";a="89712027" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 14 Sep 2018 02:37:10 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 13 Sep 2018 11:23:40 -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; 13 Sep 2018 11:37:09 -0700 From: Atish Patra To: palmer@sifive.com, linux-riscv@lists.infradead.org, hch@infradead.org, anup@brainfault.org Cc: mark.rutland@arm.com, atish.patra@wdc.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, Damien.LeMoal@wdc.com, marc.zyngier@arm.com, jeremy.linton@arm.com, gregkh@linuxfoundation.org, jason@lakedaemon.net, catalin.marinas@arm.com, dmitriy@oss-tech.org, ard.biesheuvel@linaro.org, schwab@linux-m68k.org Subject: [PATCH v5 09/12] RISC-V: Use mmgrab() Date: Thu, 13 Sep 2018 11:37:02 -0700 Message-Id: <1536863825-66808-10-git-send-email-atish.patra@wdc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536863825-66808-1-git-send-email-atish.patra@wdc.com> References: <1536863825-66808-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