Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1691724imm; Tue, 2 Oct 2018 12:18:14 -0700 (PDT) X-Google-Smtp-Source: ACcGV63Ivv0l0tNmZlxagWFPrRw9dQ7UdJ/rUt/2P6HzzotOX/L7e8NPKLtP26zQCNkSZQLTrnKY X-Received: by 2002:aa7:8001:: with SMTP id j1-v6mr17579579pfi.73.1538507894232; Tue, 02 Oct 2018 12:18:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538507894; cv=none; d=google.com; s=arc-20160816; b=p6tM+2fkHMLXIUPYsrAAmBqpyXFHHcQw/GF6XQZ98KXy8xXzuixG33l28vAGTrxL7O 5dkShOKXBO2CaKlA+IXmrAQ0LieCMFw74wfYbCKnbUNuVtqHvTdLVf/dkkRRG5xf8fid HWepzpAcPwHGI7va9UYXWClaEw6jap0ug7PALXhat+RqPhUk7Hav2mgZsJnE+Y3ToS8l UB0pRcoroGzoB7xHCi2XtYUw1kbbalTHSli2rIo+amfGiqAfUzLs7m/HUTjwEuvUEcUr IHKfnM1bSSgTkbkEq9mlDla9YJJUeggec9L+3cBvXzx2cfg8y+iWNlb/Tbry/MVbtVOj i3bQ== 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=t7pP88zW1d4Nw5t2Q1YSUwAE6XYa1NWhF479ncAQLDY=; b=kOO0OzwZbnV6tkcOqJy440a/W1Rs3icG+tZLw5M9C+OV9mLOpAl5961OyYRub/VEc9 k5sgEZLI+jt7jyc4yk7dGzZRvC1zfJwuE0zGo0+7wJi3JDkr/vWlVHSydCC9/Z6CBcQC kxZiv/8wYy1RbNauDhTuPm1b85Z8t5gf7ctLXHHQC87JHiM47t1vXFGUrADw3UeEZIho 3UwdId2Gv3he7IMjl5wkutrnkBWddp116PRD1YMG1rpk+st/OlCEL/6gPPcmenYxPhfd hJbNp37eqJ4yjvuGUppl08f4zsxMe7UZX2Ui8H3HIQQCqy+YxUess0Uu600qXJaxiVqE 4kmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=DjbtAlQi; 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 i90-v6si16518045pli.274.2018.10.02.12.17.58; Tue, 02 Oct 2018 12:18:14 -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=DjbtAlQi; 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 S1728381AbeJCCA7 (ORCPT + 99 others); Tue, 2 Oct 2018 22:00:59 -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 S1727768AbeJCCAB (ORCPT ); Tue, 2 Oct 2018 22:00:01 -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=1538507710; x=1570043710; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=DtzhQvMvxLSSEv9fq5kc/Y4PFD1IDH+eCGEVY+GherI=; b=DjbtAlQirnLUuRaEqPYsMdv8/hsRzJbKE+LttoUXitu7esJmtuK1/6LA OI3s7/FZ7q+htLHzfdX5G2PP/6waIeH9sCJLCcjq38ay5yCVwGQDYCg+D GU+sm1/+Mq3XGditIXmjoGbRHmt++MZBy1NOJ9LxSBS0X2sFmol1L5v5S TJ8VR2LzeroKXSIUa9JONK58QihvoGKdad8Z4GW5YDnwfZ3FD+8Ajj9HT 2twoJA0GnU7vTlw7M7dtCb8oztHFz2AKZ1XBj78X9bs/BDLMpXxwQrTeh PNX2C0gkm2im0twun6jCCgPomEbehg1QrOOgJjmu2nrvEufCQPe/R6+Yg A==; X-IronPort-AV: E=Sophos;i="5.54,332,1534780800"; d="scan'208";a="91076740" 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:50 -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 04/14] RISC-V: Comment on the TLB flush in smp_callin() Date: Tue, 2 Oct 2018 12:14:57 -0700 Message-Id: <1538507707-22299-5-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 This isn't readily apparent from reading the code. Signed-off-by: Palmer Dabbelt [Atish: code comment formatting update] Signed-off-by: Atish Patra Reviewed-by: Christoph Hellwig --- 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