Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp264553imm; Thu, 30 Aug 2018 23:12:32 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbNjHHVpouocQonaV74kCbl9fqdYp9PE/YMrmAuixCAMlva/JpOLzDCiyVM81tw8TQ9O4GT X-Received: by 2002:a17:902:4403:: with SMTP id k3-v6mr13547710pld.243.1535695952056; Thu, 30 Aug 2018 23:12:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535695952; cv=none; d=google.com; s=arc-20160816; b=zKBIf13iw2CN9I91ca1KOYseLUbccvsqFPtE83KD1DLJUdv+gFNLQkFYVIMIAsDy+b pcQLrwmB3mCTG8RLK3YGGiE3yzuUXi+7RKVmzCxX2VXZouvbxQNRMSSPi4gnhvb/cdl/ R9Nq1tdENS1s4WUxi500N7ZAc3dCRU3DHiQ5miZp7bI85N3gjT0goF0yAPK1vW33hact pkzgjwPp/IV63yEvza2NIjDb7bNcVrlcG73XAbTQmjSiKnPHj7fsWmdYGFD+7ik31JKO EVMlq+5Rgt1fGV2mwQwlnxghg7TtojNFVklFig/7IEV2UAlbJ1fSN61TRZe3R5e/Azbj L97A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=h5DIRi/7pguCzoWiQZue73FmMTzLwp+f4iXfI1wTytM=; b=oXkYrhZSAxThMYIG5uutBbSPI8LZ35mEs3PuKTiKAeNF+HhptUpTr2zdw6lHN9nPl9 I8wW/1AVfu2gdlnS+8Nr1rlBvj+rjhkZIN3DhmJA3x+ripv0l2q/0c/slgzM6hAtnC/r U5sDhQZDu8CVd4tMYYcU+t8D8xkwUJi+9zfDSlxhU2kSn1PaXqFEbbx4BNn8iuxN3IWQ R3dp5Vo4/iXuxTfWVT/ZM/JepoSAC0P5soNYvmM5WhgMmnr+KvAwLpmHbnVEJjwtxau/ ADNo56RaZM0y/5TxV7hy7ZD4HSRmOq0jlGdcx6cvw/FgrAW7JmOpHoI63eRq96xr6InR vU2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=NeJIqgWU; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c126-v6si9397057pfa.130.2018.08.30.23.12.17; Thu, 30 Aug 2018 23:12:32 -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=@infradead.org header.s=bombadil.20170209 header.b=NeJIqgWU; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727316AbeHaKQ6 (ORCPT + 99 others); Fri, 31 Aug 2018 06:16:58 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:37294 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727197AbeHaKQ6 (ORCPT ); Fri, 31 Aug 2018 06:16:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=h5DIRi/7pguCzoWiQZue73FmMTzLwp+f4iXfI1wTytM=; b=NeJIqgWUitas4HA6cRH9WRpKx KAh7slWJItCmn/NNJVpzaj6geLZ08tgBLn5O5NM7WYXBV3dvK0r9Km0lbjsEqE3bXSf18DF4pWtAC 9qRnjOdSCWYpnsFSzZmPWWeua2Zo/arcB5VRZ9xECqJWxMLRqdL5uHgRj45zvk2h2b+qoJgaTzQCe pJJ2EGmzWbYw1dXTONaFUTrL/CtwL9MsY6wOY/waTmAIE0fBgOtV2hPbZS+aHiruJtdCaJ6p+DXrA yEpNJofvUjhWWXsb0MIlXUzhkc+Xxw2wUPVRS4I86guMJ71W7e3XpRcZVFidbhTHdmYPh3TZ9C9S3 wosgfbCew==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvce8-0002iG-5s; Fri, 31 Aug 2018 06:11:04 +0000 Date: Thu, 30 Aug 2018 23:11:04 -0700 From: Christoph Hellwig To: Atish Patra Cc: palmer@sifive.com, linux-riscv@lists.infradead.org, mark.rutland@arm.com, anup@brainfault.org, hch@infradead.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, damein@vger.kernel.org Subject: Re: [PATCH v2 2/3] RISC-V: Use Linux logical cpu number instead of hartid Message-ID: <20180831061104.GB19292@infradead.org> References: <1535445370-19004-1-git-send-email-atish.patra@wdc.com> <1535445370-19004-3-git-send-email-atish.patra@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1535445370-19004-3-git-send-email-atish.patra@wdc.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -#define flush_tlb_all() sbi_remote_sfence_vma(NULL, 0, -1) > +static inline void remote_sfence_vma(struct cpumask *cmask, unsigned long start, > + unsigned long size) > +{ > + struct cpumask hmask; > + > + riscv_cpuid_to_hartid_mask(cmask, &hmask); > + sbi_remote_sfence_vma(hmask.bits, start, size); > +} > + > +#define flush_tlb_all() remote_sfence_vma(NULL, 0, -1) flush_tlb_all passed NULL to sbi_remote_sfence_vma before, so this changes what we pass. I think we should keep the existing behavior. > @@ -93,10 +94,11 @@ static inline void plic_toggle(int ctxid, int hwirq, int enable) > static inline void plic_irq_toggle(struct irq_data *d, int enable) > { > int cpu; > + struct plic_handler *handler; > > writel(enable, plic_regs + PRIORITY_BASE + d->hwirq * PRIORITY_PER_ID); > for_each_cpu(cpu, irq_data_get_affinity_mask(d)) { > - struct plic_handler *handler = per_cpu_ptr(&plic_handlers, cpu); > + handler = per_cpu_ptr(&plic_handlers, cpu); This looks like a spurious change.