Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4513138imm; Tue, 11 Sep 2018 13:06:36 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYwlsLf0HahjVA+G0TJa1ClCtVeH3npq2L4OBecM6psd//O9sLQUKut2A2q6vbETMBB3AbU X-Received: by 2002:a63:2c8e:: with SMTP id s136-v6mr30702315pgs.390.1536696396186; Tue, 11 Sep 2018 13:06:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536696396; cv=none; d=google.com; s=arc-20160816; b=vxcX7wk5enkhbqejmsld/IkvtLav5Uk3e/KiZuHiyYM5/hTEacF4IzHNdcEtqR6kuX f3EwKmhLdHj2TryD+y7+HaSXvwObDfuWr66G+DBLsMhtUeO2vGqj5T/8Nb2gbyYtv4Ck pBO0EOWIWC5gQ/W6636+wKU6g+/I/c3g9nfwB9m4iJHEj1+KJQGoYbvEmsSa4QjzqOd6 ckvRN5nRE5K8TgJirR4rh+ERXajX9Z05QQEES0AJJuGfMtX4JZjyOX1Px4TihDChxmNw 0Z/Q9+NgcoXneVh8k+sXLM32Yju1RyGVxfxLJ1b1B//DmBmHuVoo1Zvxkc3gTYKgRZI4 u5cA== 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=EdEKIz+vFLc22u/t/71PFV5IRFLUg9Y0DKDkSf2kgr5iAdYAvjMYtjxLMDwhy5TnIW ZyBAFFinU6V8K9IsTt718nIJLpxfj4EpYxZ2606YCvo85vMk0deFvzvHK5zO4u+37pHV auyp98oTdCVPon4NJuGNdknWyvpbFSStny8s8xyzXaxq7CSmw/XDQSFguZNBIRSZR1Ms F65LDGu5US5X5DqNoFPF8OLGVie178ZJYzFYnfLhrUZUMlOc+ayWbbSI1CX0VgEIHCQQ i4W5ydrJ3JFdGsE+sukmzsAE9vOL2dLvCxctN72jSZfnaoI3COaIWGmuIo0QMCv/iHzy 4obA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=oOUiT6xQ; 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 f8-v6si21958175pln.5.2018.09.11.13.06.21; Tue, 11 Sep 2018 13:06:36 -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=oOUiT6xQ; 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 S1728124AbeILBGj (ORCPT + 99 others); Tue, 11 Sep 2018 21:06:39 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:52878 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726775AbeILBGh (ORCPT ); Tue, 11 Sep 2018 21:06:37 -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=1536696345; x=1568232345; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=YFrlU3OmqRZtyf8NLoWNxfiOD2AxshO648ddxoKLstQ=; b=oOUiT6xQuIuzq4kkrocO24do7fWZmQGaagglNVPG9XcBtXjsOHMUOTRS MYjSdbV69GVGlJDSeRyM7EqSTGGJiKOEeLTMt9yXPIkvTNH5eA4poyHlE 2b6gyCcQpF+ExHG8G77VXqfAXdVgSDLXIpl2Ln8XqCgH3gmYFe/CJPPTJ r/uwN5f3y07Ie6VrJmv54maKcl21mB/yjEciF77Ro/LDm75x0A2tuCF7m JzbzkEVVc9xBHNob0ERBug9HnzShkkg67TNdjAVfyuHkdFarm9JAQKB6n JkHA+/6cDphc9GtSP4NHlzLhn1Sf1b2wXCbLIt5EVG5FzRBUzSF4G3ddJ A==; X-IronPort-AV: E=Sophos;i="5.53,361,1531756800"; d="scan'208";a="193728837" 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; 12 Sep 2018 04:05:43 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 11 Sep 2018 12:52:17 -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; 11 Sep 2018 13:05:43 -0700 From: Atish Patra To: palmer@sifive.com, linux-riscv@lists.infradead.org Cc: mark.rutland@arm.com, hch@infradead.org, anup@brainfault.org, 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 Subject: [PATCH v4 09/12] RISC-V: Use mmgrab() Date: Tue, 11 Sep 2018 13:05:36 -0700 Message-Id: <1536696339-15204-10-git-send-email-atish.patra@wdc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536696339-15204-1-git-send-email-atish.patra@wdc.com> References: <1536696339-15204-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