From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AAB722F26 for ; Tue, 16 Aug 2022 09:01:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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; bh=rFcsh5EaXMjyQvBz6Px9JuV8hMB5E551U26Ntc3NwIA=; b=GJchraaCp4Klmfi3ZVHxYa9oRu b4agUH2uWZUTGNSV7SBi9fApi/iBoiVncfCPPHT8N/smFMxxCHdxc2qJL0NAbVmP78DMRliIAybve 8oFbik7+x32aIcWla7kp5/4bFOB86cScaS8UEumAsr9W+yElrNSfNFCf5pwnIHawItattmLVPtF9Q nfyPrB4EWP+fCEnqnTrsY0Kxaw8X+ypYlJQyIHjy3clqn11hb/eScLGNIiJg3D3XNKZAnZcpbMVi5 Sl+UKBGD4B3ss+b8KxyJ1OrSsUMsYYCNDfajqcuNNHcv/f0zui+onWZGz0gCItg5Kw8bJdifIBHG8 +E+BKhcw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNsRn-002ufq-7J; Tue, 16 Aug 2022 09:01:15 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 6E714980083; Tue, 16 Aug 2022 11:01:14 +0200 (CEST) Date: Tue, 16 Aug 2022 11:01:14 +0200 From: Peter Zijlstra To: Davidlohr Bueso Cc: Dan Williams , Mark Rutland , Dave Jiang , Jonathan Cameron , linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev, bwidawsk@kernel.org, ira.weiny@intel.com, vishal.l.verma@intel.com, alison.schofield@intel.com, a.manzanares@samsung.com, linux-arch@vger.kernel.org, Arnd Bergmann , linux-arm-kernel@lists.infradead.org, bp@alien8.de, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arch/cacheflush: Introduce flush_all_caches() Message-ID: References: <165791918718.2491387.4203738301057301285.stgit@djiang5-desk3.ch.intel.com> <165791937063.2491387.15277418618265930924.stgit@djiang5-desk3.ch.intel.com> <20220718053039.5whjdcxynukildlo@offworld> <4bedc81d-62fa-7091-029e-a2e56b4f8f7a@intel.com> <20220803183729.00002183@huawei.com> <9f3705e1-de21-0f3c-12af-fd011b6d613d@intel.com> <62f40fba338af_3ce6829466@dwillia2-xfh.jf.intel.com.notmuch> <20220815160706.tqd42dv24tgb7x7y@offworld> Precedence: bulk X-Mailing-List: nvdimm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220815160706.tqd42dv24tgb7x7y@offworld> On Mon, Aug 15, 2022 at 09:07:06AM -0700, Davidlohr Bueso wrote: > diff --git a/arch/x86/include/asm/cacheflush.h b/arch/x86/include/asm/cacheflush.h > index b192d917a6d0..ce2ec9556093 100644 > --- a/arch/x86/include/asm/cacheflush.h > +++ b/arch/x86/include/asm/cacheflush.h > @@ -10,4 +10,7 @@ > > void clflush_cache_range(void *addr, unsigned int size); > > +#define flush_all_caches() \ > + do { wbinvd_on_all_cpus(); } while(0) > + This is horrific... we've done our utmost best to remove all WBINVD usage and here you're adding it back in the most horrible form possible ?!? Please don't do this, do *NOT* use WBINVD. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E9AE4C2BB41 for ; Tue, 16 Aug 2022 09:02:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jHsTurquQsp7Uwr0VbV1SjMwM+tNMY8QKUeRQSs4NPY=; b=fDh8Ng/QdJsWgo sS6KDcvvAVyH9ov45XT3qm/G2e7hwUymr7b5nM3cSI1ssUMtiDctXloBMwDFBWQKCifeNv0BfD8+i dQebS7J13FeVx9MIUnOUfjumoB4TzjS8LOcU90JQRIZi/bSfl9S8Yy6ziT8CI4zaPCiSYzexjVWeM +S/YzTCwmUVQ21v2AZ4wzHrJTPSJZmY5pSbzN1nfnGJmnAyyTT6yhOczc762Be2H+Aood4kgOm5Of lnbKwXcwyuRenU0Pb2bo99yd0YfuILM3CZ+bNKmeEdKGfaidq+4GNesA7QFgM2YzeULxGIkezyYQ3 UMGddqZhkzwkbBIg/FOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNsRx-00H7v1-7u; Tue, 16 Aug 2022 09:01:25 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNsRv-00H7kW-AG for linux-arm-kernel@bombadil.infradead.org; Tue, 16 Aug 2022 09:01:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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; bh=rFcsh5EaXMjyQvBz6Px9JuV8hMB5E551U26Ntc3NwIA=; b=GJchraaCp4Klmfi3ZVHxYa9oRu b4agUH2uWZUTGNSV7SBi9fApi/iBoiVncfCPPHT8N/smFMxxCHdxc2qJL0NAbVmP78DMRliIAybve 8oFbik7+x32aIcWla7kp5/4bFOB86cScaS8UEumAsr9W+yElrNSfNFCf5pwnIHawItattmLVPtF9Q nfyPrB4EWP+fCEnqnTrsY0Kxaw8X+ypYlJQyIHjy3clqn11hb/eScLGNIiJg3D3XNKZAnZcpbMVi5 Sl+UKBGD4B3ss+b8KxyJ1OrSsUMsYYCNDfajqcuNNHcv/f0zui+onWZGz0gCItg5Kw8bJdifIBHG8 +E+BKhcw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNsRn-002ufq-7J; Tue, 16 Aug 2022 09:01:15 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 6E714980083; Tue, 16 Aug 2022 11:01:14 +0200 (CEST) Date: Tue, 16 Aug 2022 11:01:14 +0200 From: Peter Zijlstra To: Davidlohr Bueso Cc: Dan Williams , Mark Rutland , Dave Jiang , Jonathan Cameron , linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev, bwidawsk@kernel.org, ira.weiny@intel.com, vishal.l.verma@intel.com, alison.schofield@intel.com, a.manzanares@samsung.com, linux-arch@vger.kernel.org, Arnd Bergmann , linux-arm-kernel@lists.infradead.org, bp@alien8.de, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arch/cacheflush: Introduce flush_all_caches() Message-ID: References: <165791918718.2491387.4203738301057301285.stgit@djiang5-desk3.ch.intel.com> <165791937063.2491387.15277418618265930924.stgit@djiang5-desk3.ch.intel.com> <20220718053039.5whjdcxynukildlo@offworld> <4bedc81d-62fa-7091-029e-a2e56b4f8f7a@intel.com> <20220803183729.00002183@huawei.com> <9f3705e1-de21-0f3c-12af-fd011b6d613d@intel.com> <62f40fba338af_3ce6829466@dwillia2-xfh.jf.intel.com.notmuch> <20220815160706.tqd42dv24tgb7x7y@offworld> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220815160706.tqd42dv24tgb7x7y@offworld> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Aug 15, 2022 at 09:07:06AM -0700, Davidlohr Bueso wrote: > diff --git a/arch/x86/include/asm/cacheflush.h b/arch/x86/include/asm/cacheflush.h > index b192d917a6d0..ce2ec9556093 100644 > --- a/arch/x86/include/asm/cacheflush.h > +++ b/arch/x86/include/asm/cacheflush.h > @@ -10,4 +10,7 @@ > > void clflush_cache_range(void *addr, unsigned int size); > > +#define flush_all_caches() \ > + do { wbinvd_on_all_cpus(); } while(0) > + This is horrific... we've done our utmost best to remove all WBINVD usage and here you're adding it back in the most horrible form possible ?!? Please don't do this, do *NOT* use WBINVD. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel