Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1039856imm; Thu, 13 Sep 2018 11:40:00 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaXdl4p7Qoa4RaV3JD3EA+zB/VQHdE70wquChfKAhkluOIjrL5Kdr8z5pWrsqMB9gOCfTpp X-Received: by 2002:a17:902:748b:: with SMTP id h11-v6mr8536798pll.192.1536864000186; Thu, 13 Sep 2018 11:40:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536864000; cv=none; d=google.com; s=arc-20160816; b=trQQ/gkREeAAFRVeQqTHp8BSyDW8x39QqklIMRTtBwGF1iMYhpKhXl/KKJ65dvI89u ByyEkRofvtjkaAxTk11fN/NVke9VyWJoe8LNu1nczAo5h2mwiAWwGdHDoM6+exuAfpS+ zwVWaoL1dlEtyWeFu00tEPydGKR3RhxR4nwCcgRkQw0wQ166JQFBroLFmJjcQptAhBZa zEjJWM82v+w8jVFn8yP59QRcFmHxy1SOSJgM/67vXFvgpL0asq1+hzwYVPH1/LJiV1g0 N+iy30x6hp7uafYJC5RTTG/FuBcFZiWaKezdFLoSduqZ+XxHGbiOoWNrj8d8nzvqOETe 7m2w== 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=TCY57aJFhWRggPX0QA4sUQFDjFq1dI54X6QoyEmOv0T769RPLEGPIdrMQMLVuSMFzg oAZrXOp3sCoPnQIj+SLTlNQ2am6HQ9GwSrqGEy2UdmRs9rRQkeKvA0O44X1564E+3dUe pLA0OGTu++26adEsYPjwtDik0uBrg0A1NWM3BS1GHBA0LulisGYnn7rG6Qyn9TfX3+au i649r4UgvrjaBtzagKbWbMn5P/Z34M6GqRA5sqJklgOOy44YGc5/KaukG4O2Shoyr+Mm usBEJHzUEtmt411aVBJy5uiz5StxTlOKgEfWExWop6SEJ8iiFe8jRVJkg8hPd4cepjC/ c0bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=aQprcnoZ; 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 cf13-v6si5031231plb.334.2018.09.13.11.39.45; Thu, 13 Sep 2018 11:40: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=aQprcnoZ; 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 S1728162AbeIMXru (ORCPT + 99 others); Thu, 13 Sep 2018 19:47:50 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:26981 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728122AbeIMXrt (ORCPT ); Thu, 13 Sep 2018 19:47: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=1536863828; x=1568399828; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=DtzhQvMvxLSSEv9fq5kc/Y4PFD1IDH+eCGEVY+GherI=; b=aQprcnoZpNjypnm4pZdgulVyXM2Co3ktXvodYSxbdiEt8j5GOBusC2/M Fw9Qv9n2sXwVI3TOPfuhxvQbEOVYnsrXksTtGHRvmIou+/Dt8zjcS1U78 xWGFushP5ttNoyajBz9LUfVYWtNrpPGs6orTnPPucIMdbjx9R5/9S08k1 ENTm1ZLdkrmouwA0X/dQdvggT1xCU/Sc775xFsu3Y2ccoMlkUcXFWIT4r x9rh1xZz6hw7LOtXdg8F/YqFfNOto0bNWsjtePUPvvxVYVuegZMPqy1Xi RofykOOFYMzbuRpgxGE18jZEHvcve4a4zrJQS1omk/vZMTdcVxuofM4ri w==; X-IronPort-AV: E=Sophos;i="5.53,370,1531756800"; d="scan'208";a="89712015" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 14 Sep 2018 02:37:08 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 13 Sep 2018 11:23:38 -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; 13 Sep 2018 11:37:07 -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, schwab@linux-m68k.org Subject: [PATCH v5 04/12] RISC-V: Comment on the TLB flush in smp_callin() Date: Thu, 13 Sep 2018 11:36:57 -0700 Message-Id: <1536863825-66808-5-git-send-email-atish.patra@wdc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536863825-66808-1-git-send-email-atish.patra@wdc.com> References: <1536863825-66808-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