Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp222267imm; Thu, 6 Sep 2018 01:07:01 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaWYPN4sgshNj3ksZnz298MIrLzQ1dVKvR6eZ/qVPW5R19iIa+8lyz2NqV9wijLpD74bo7u X-Received: by 2002:a63:7058:: with SMTP id a24-v6mr1560460pgn.206.1536221221325; Thu, 06 Sep 2018 01:07:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536221221; cv=none; d=google.com; s=arc-20160816; b=P4ESCRjZhvTb/38COlfG2jMutu4yKmaNEx9c+9VWl4DahltDjIJt/g8pl8chgaYkGC aFIM+6CC/z9ZvRlHC2Tkk6H3eV+Ut8B3myDA3tR5lzbXwXRv69k6QnUltMxO0aNZrv3Y LZgoFiH75rsUyW/E6ir/iZG/bS1u7xGRJcKvzZN2WSmbE31M80n2aLUBu8V+oR221aot gRl5nZTVI8VYzHuw9UCaGu1OScIYNGIOrbt1cE6omgA3Ri2Ik9PLr99GuINXKvVIJwCl y2ogy/qMlEQwtPISDAoOqctln+yDWgIEkT5mQhdi6XS9/nsgeB5E+Os6XruIHQvjLOsw DvkA== 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=hiy9qLD9e6Ou8w1D/eVEpDy2Y9Vqb1ucBzIElLSeJCQmr0IJfWW93CUGkgCONe7NPx O5j9A/FwYwN49m222On99gWhdO+bg5+jjTLvL3fiR+FMxZHaNO5Zhq7daQUod3cQUKPJ tJAHlXQWlRYLJhs4v9Jgka9EooPM5n2cBG8D1o2JBIUc/NHRM5fjCfkOO/HmwNpwMAJx hF1OEV0d9eHK048agy4DoBLqZDqD0a/1va4bvqadU8NNWQKBCVmAhrLrWJqzReIFW8S3 bO0QYLTXmMmOukdIuR5BNw45LdK9v7HhxFbCTCAlge1mNnBYTTCvQAnX8EKJUHMULnso I12w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=k4AFoV2B; 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 o18-v6si4499280pgn.190.2018.09.06.01.06.45; Thu, 06 Sep 2018 01:07:01 -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=k4AFoV2B; 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 S1728146AbeIFMjw (ORCPT + 99 others); Thu, 6 Sep 2018 08:39:52 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:53554 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728075AbeIFMjv (ORCPT ); Thu, 6 Sep 2018 08:39: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=1536221196; x=1567757196; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=YFrlU3OmqRZtyf8NLoWNxfiOD2AxshO648ddxoKLstQ=; b=k4AFoV2B879FTQpeUehVQfuoWwGslVJr/h/KQTVWVEKOueH4qsbIhjnP ezNbeC5WX4wqYUFgT6+7LDQ2tbkIyIMQlcxhB3Uls1uDMn9Y4cQKkjGYR 4ywqWihBmLpRe7L6FlCCORxZFvBWmz1o6YxrHgL3sfHdNQdHIOyaTrjgL YjVjvu7IS5R8RukdONlvHyNzzVrgh3fpNZhBWayhlIyixr481rixejneL R0oge4mAIU7BbPu9/IAgJSYdtcp4UZ57acYqWFmgZ6EH/VM8bkbb0AmRU s0vWd8BBivYNm9bFHEP8vkKJdzVIGiF6nFkZR2qZiv89KXSm6rDUrSUUN A==; X-IronPort-AV: E=Sophos;i="5.53,337,1531756800"; d="scan'208";a="186673960" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 06 Sep 2018 16:06:36 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 06 Sep 2018 00:52:14 -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; 06 Sep 2018 01:05:38 -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 Subject: [PATCH v3 08/12] RISC-V: Use mmgrab() Date: Thu, 6 Sep 2018 01:05:31 -0700 Message-Id: <1536221135-182613-9-git-send-email-atish.patra@wdc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536221135-182613-1-git-send-email-atish.patra@wdc.com> References: <1536221135-182613-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