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 BC7BBC76196 for ; Fri, 31 Mar 2023 11:03:14 +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:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=peOx4Oyt0Hg5c8pw0pcqcH8gH6CMa+P8nwKRBeFyh3M=; b=RJ2+TPG85h1tr8 6IhJOskzGwcVHi1yRw2ZUFo0xhQSrCm3wCOjbEc6/Ct3FOoFqd/2bQshp4aBT5kHaN0vl5QemOxad jkOq9sCO2BeqnKe3D1TgPMWwdQLpUPkEw7Sb7G81vm878XkAQzShxXStlNMWDglwzk0rlOs+dGtM5 ncvQZE96OiUCl8APLM9qUUrVcM0nXK7W93ipXxcUfqPNZuub6Zc0XyyHmrZ/oqhmKCuSHOS/Lp5Pr HEw9bxUlaBPkonhWffUmrFyy24uglmHOyh9CBpr6WvQO9B4NTX8JaCjFiK8QrzfrOB3AwAgDSMg8E 8sKoX9aLY4fpnSYeF6Kg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1piCWR-0072GU-02; Fri, 31 Mar 2023 11:02:19 +0000 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1piCWM-0072By-0w for linux-arm-kernel@lists.infradead.org; Fri, 31 Mar 2023 11:02:17 +0000 Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-61-KKeVLz0_Nn2s0KMUR0InMw-1; Fri, 31 Mar 2023 12:02:05 +0100 X-MC-Unique: KKeVLz0_Nn2s0KMUR0InMw-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Fri, 31 Mar 2023 12:01:54 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Fri, 31 Mar 2023 12:01:54 +0100 From: David Laight To: 'Arnd Bergmann' , Russell King , Arnd Bergmann CC: Rich Felker , "linux-sh@vger.kernel.org" , Catalin Marinas , "Linus Walleij" , John Paul Adrian Glaubitz , "linux-mips@vger.kernel.org" , Max Filippov , Conor.Dooley , guoren , "linux-csky@vger.kernel.org" , "sparclinux@vger.kernel.org" , "linux-riscv@lists.infradead.org" , "Will Deacon" , Christoph Hellwig , Helge Deller , Geert Uytterhoeven , Vineet Gupta , "linux-snps-arc@lists.infradead.org" , "linux-xtensa@linux-xtensa.org" , Brian Cain , "Lad, Prabhakar" , "linux-m68k@lists.linux-m68k.org" , "Paul Walmsley" , Stafford Horne , "linux-arm-kernel@lists.infradead.org" , Neil Armstrong , Michal Simek , "Thomas Bogendoerfer" , "linux-parisc@vger.kernel.org" , "linux-openrisc@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , Dinh Nguyen , "Palmer Dabbelt" , "linux-hexagon@vger.kernel.org" , "linux-oxnas@groups.io" , Robin Murphy , "David S . Miller" Subject: RE: [PATCH 15/21] ARM: dma-mapping: always invalidate WT caches before DMA Thread-Topic: [PATCH 15/21] ARM: dma-mapping: always invalidate WT caches before DMA Thread-Index: AQHZY70jODQmP+MmIk+VbheoRzXsQa8Ut5Vg Date: Fri, 31 Mar 2023 11:01:54 +0000 Message-ID: References: <20230327121317.4081816-1-arnd@kernel.org> <20230327121317.4081816-16-arnd@kernel.org> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230331_040214_639180_693752FB X-CRM114-Status: GOOD ( 10.44 ) 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 From: Arnd Bergmann > Sent: 31 March 2023 11:39 ... > Most architectures that have write-through caches (m68k, > microblaze) or write-back caches but no speculation (all other > armv4/armv5, hexagon, openrisc, sh, most mips, later xtensa) > only invalidate before DMA but not after. > > OTOH, most machines that are actually in use today (armv6+, > powerpc, later mips, microblaze, riscv, nios2) also have to > deal with speculative accesses, so they end up having to > invalidate or flush both before and after a DMA_FROM_DEVICE > and DMA_BIDIRECTIONAL. nios2 is a simple in-order cpu with a short pipeline (it is a soft-cpu made from normal fpga logic elements). Definitely doesn't do speculative accesses. OTOH any one trying to run Linux on it needs their head examined. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel