Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4515318imm; Tue, 11 Sep 2018 13:08:41 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZSo14a8rJAHbXkQhXq+GcsuiH9bY5dqFQcuZP/lY0AELSYQ6pKBwUiopA/lkOzlCcMLr0f X-Received: by 2002:a62:1c7:: with SMTP id 190-v6mr31238695pfb.1.1536696520949; Tue, 11 Sep 2018 13:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536696520; cv=none; d=google.com; s=arc-20160816; b=Jj59nN5fNirNltmeuSnPh3uEeqMN9U2wLis5Fyp9pdF4fd+Mz2q5v4RcqOOhzLWFKd SwYXbOcqPksiiIRgWAUR+yZJb0dOWEFfOEEJShm4xF8wBzmn/7YPDDlIRFponzUbbNjd gQmLRLw0keUp5yydaVsnpf5QQT+ULWjwySH9aVLjxEvQZIcb8lvt0oO/FveJHb6Rx/Ct cbJMF7t25m7djFHZXEbMyDGVQtqhjGsfbY+J44X4bUgxyUJGzixu3L8iuKHApj3lITpr bwDV+V+nZbkIkPgNctOv9ojDtMK/h8LuYFWtBzw1GmwuGpEs6QeyUdLEoK8kztDu+EtI 8quQ== 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=Zmy8lmeEgbC1D46UvzsEGNSly1UvAiau2WQAHZ/e6oCkMP457L311HXt57ImnndyXI egCDVn7Iy+ZFXe0p+70FvXx6N/+p7rriLfM5CoQFXehC1gyciw0R/OieTkeXCBPeP5mL XrvzkZv4rAGwAFeXIUTW1F0dyRX9dn4laxITqan3DckYYDNB0mbS2bwhLARLh9ROW8xD wlZYod4uvbgX7BR/Stt+i2jd+HCDRhTR36nmES+NdgChENnzDpE1qAW0Iw+kIyFKMLaN G/HoL8Fg4P/GD6Wz5loP1TGyLDnJd1+I/j9QaK3YalXVHr+SxMEjE+nQe1K2NVCzMOYy NZgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b="qsbOB/lz"; 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 t9-v6si21892297pfj.338.2018.09.11.13.08.25; Tue, 11 Sep 2018 13:08:40 -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="qsbOB/lz"; 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 S1727837AbeILBGg (ORCPT + 99 others); Tue, 11 Sep 2018 21:06:36 -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 S1726730AbeILBGe (ORCPT ); Tue, 11 Sep 2018 21:06:34 -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=1536696342; x=1568232342; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=DtzhQvMvxLSSEv9fq5kc/Y4PFD1IDH+eCGEVY+GherI=; b=qsbOB/lz4fhFN8FZExgZWrbJPD9Njk1ljb5VZMyW/XspFG1FKw8igaFI mPIn6f7pnD1BwWwReTTMjWZvg2vWr+6apJDjJlJKRd9tnCOM1Z/7XvYij VQvfZsYf29g1icbORBMO4qSL9HrQAz9V/5FYdibKl/JjUX8lDYBZ2OsHl jJog1AGJfZexkLBETlgT7cV2gX3pF0zIrbWpyyPF1tBe4cQnm8++dsK4n n0HFt0LhVUVLnHoWRr/C+QG0Xpi/I/SPC8jkvXYb6NEB9YFjWZgIddjyk s1td44pYd7N/NcsEhCKW/P7Eo2kSTQbv4tVQteM2HSh/lXTRBjIYBvwBw g==; X-IronPort-AV: E=Sophos;i="5.53,361,1531756800"; d="scan'208";a="193728827" 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:41 +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:15 -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:42 -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 04/12] RISC-V: Comment on the TLB flush in smp_callin() Date: Tue, 11 Sep 2018 13:05:31 -0700 Message-Id: <1536696339-15204-5-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 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