Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp223899imm; Thu, 6 Sep 2018 01:09:00 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaLp09TYf9DSe8NGPZshnrnuYbJ7PyIYsl3UaXo4pL0CVsoS588xfU0RacF4smspC4EdCn+ X-Received: by 2002:a63:510c:: with SMTP id f12-v6mr1626807pgb.30.1536221340252; Thu, 06 Sep 2018 01:09:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536221340; cv=none; d=google.com; s=arc-20160816; b=xBCeEoyiqh72sc31via2eohqpM59LNq0py/fhnsE13zYA+laJYhfoa5kGfxgDVriMQ SagzoxDfuS0NAfKKLlWFKIsx5PFWBTS1YOGoyZKzVMrK6OirOUZgimkVg+SopTkIS5NK 2I+K5Fmew2mDcKTn2qrqEOdPK7ujdojEXWHCZTyO5VFsfONGslIFnUJYdgi3Y1EuaECJ rklLuKqK5uWSkshB+/m3x/W1zM10hRcQHAiBfJW/jfy5+p77fGrMs39xxWccSnnwp0MX 32ukBZd8FSngaP0tuWMhiGap77whPWxMMJ/kHd16xkMJKIszXTsTk13Q9TOROEI26Pbx LYIg== 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=va9xLnFwg9de/ren4hFmykzJux+BFzGeWjj06QD8DIA=; b=UJ/QznVXEYuviysBUrlvAjBNDUubFr4nTx8a4T+PAVRiW2Gvp4EBS3tUP1kpMtEkOg qVdi7ggLj2vOLPGy5+Z3GAvFLoW7Nm1njlzavidF1Dso/Vr997OhkWevmc9LfRh7OY/c HHMuwz0KSYXEKRhRU+yX2ZYEz0+5k0MFdMSsvyAwhWJ+KufnZqY0PnFq2iSvaXm1dDg7 N8g9re1r77jBUjFO1GM27p98u9ilnyOTWUiEGfxNU/sbKUUYsuC6XE/9HIF3kw1CFImS zU/4AcYoyalfPJAorVh7R6e0iqiNM7r1LgGlmRjFgtDMJcduZ98orUOo/xdtG4nhKxZw SC+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=p0wmvMcM; 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 f62-v6si4682252pfg.35.2018.09.06.01.08.45; Thu, 06 Sep 2018 01:09: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=p0wmvMcM; 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 S1728268AbeIFMkx (ORCPT + 99 others); Thu, 6 Sep 2018 08:40:53 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:53549 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727959AbeIFMjt (ORCPT ); Thu, 6 Sep 2018 08:39:49 -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=1536221194; x=1567757194; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Sz9aiXUeol0D5G2xGuxSOpv8o7m6ObTOOiPVmWa1qF4=; b=p0wmvMcMcol351tr/RarOdxiiqMubC6w6wtOp+dPjS8NDAulQeKAsNte MjQjoIdzL9RXJ8433sKWM2wYnsLf4+n+ngm+LMTiHIUS9D5i3ZQAScloN q0/f1SOy+RqUfAEE68/O7CbQiFZBr4vDTS7QQcGli3FRof7WFfWCta+pG wKX9bK7lhNKuDI86lPDsl67IeBoIHG+g5wUD2g1maZyb3LIGMgQprsrLZ 32+RqCOd/o/4K1WxiRaC0Egqm5P77AsLqnOTiD5xCSyfMlzOJioyhB5OG i1mwRDB8532afTWEQcTPNJub/M9RXVD7lcg/fegKpgr1GInyGs2Qpc4Xj A==; X-IronPort-AV: E=Sophos;i="5.53,337,1531756800"; d="scan'208";a="186673943" 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:33 +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:12 -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:37 -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 03/12] RISC-V: Comment on the TLB flush in smp_callin() Date: Thu, 6 Sep 2018 01:05:26 -0700 Message-Id: <1536221135-182613-4-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 This isn't readily apparent from reading the code. Signed-off-by: Palmer Dabbelt [Atish: code comment formatting update] Signed-off-by: Atish Patra --- arch/riscv/kernel/smpboot.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c index 56abab6a..712e9ca8 100644 --- a/arch/riscv/kernel/smpboot.c +++ b/arch/riscv/kernel/smpboot.c @@ -106,6 +106,10 @@ asmlinkage void __init smp_callin(void) trap_init(); notify_cpu_starting(smp_processor_id()); set_cpu_online(smp_processor_id(), 1); + /* + * Remote TLB flushes are ignored while the CPU is offline, so emit + * a local TLB flush right now just in case. + */ local_flush_tlb_all(); local_irq_enable(); preempt_disable(); -- 2.7.4