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 X-Spam-Level: X-Spam-Status: No, score=-8.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 788CDC07E96 for ; Tue, 6 Jul 2021 13:33:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E33F61A06 for ; Tue, 6 Jul 2021 13:33:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231415AbhGFNf7 (ORCPT ); Tue, 6 Jul 2021 09:35:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:39962 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231400AbhGFNf6 (ORCPT ); Tue, 6 Jul 2021 09:35:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 61E7461983; Tue, 6 Jul 2021 13:33:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625578400; bh=WcDD30TViYNS4yatqktO0avnymB6mNK7bjMGHKx69Ss=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZnmRvc80v0apIs/ErVix0easCCnnBjRfyj/dv5xuHyBuG2KxowXTGWm4DyR/1ALwq q1Ro7cNCYL7ggvrEKW2r4710VOuYE/Kz80DTmB7tnpmofjyYF///c3IC2c3SD4NXoL ZAvgZ1L9vvlFA55MWSCxw+jCYTMk9PfBaJMkPE4QZbbVyxQ3WfyssQEOEXW8NIxM59 RNNl6V3uXlPPK3WsFiTdQGTOGyf+YPx/gFBYcyLo5fGOM7rlb/NMlhlsGl0kqHQjFP C9kVM1C9p3IYIEkKx8mtFOf0t8NyHTNa8jbJlNHxI17omLaM5ShKsc2y2C+FdYzqM/ CBfbzC5TIdbiw== Date: Tue, 6 Jul 2021 14:33:14 +0100 From: Will Deacon To: Robin Murphy Cc: Catalin Marinas , Yassine Oudjana , "ardb@kernel.org" , "arnd@arndb.de" , "kernel-team@android.com" , "linux-arm-kernel@lists.infradead.org" , "mark.rutland@arm.com" , "vincent.whitchurch@axis.com" , "linux-arm-msm@vger.kernel.org" Subject: Re: [PATCH] arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES) Message-ID: <20210706133314.GB20327@willie-the-truck> References: <20210527124356.22367-1-will@kernel.org> <20210706102634.GB24903@arm.com> <59800d6c-364a-f4be-e341-c5b531657ba3@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <59800d6c-364a-f4be-e341-c5b531657ba3@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Tue, Jul 06, 2021 at 02:29:07PM +0100, Robin Murphy wrote: > On 2021-07-06 11:26, Catalin Marinas wrote: > > On Tue, Jul 06, 2021 at 09:26:59AM +0000, Yassine Oudjana wrote: > > > In-Reply-To: <20210527124356.22367-1-will@kernel.org> > > > > Reduce ARCH_DMA_MINALIGN to 64 bytes and allow the warning/taint to > > > > indicate if there are machines that unknowingly rely on this. > > > > > > The warning is being triggered on Qualcomm MSM8996, as well as the out-of-spec taint: > > > > Is this booting with ACPI or DT? > > > > > ------------[ cut here ]------------ > > > rtc-pm8xxx 400f000.qcom,spmi:pmic@0:rtc@6000: ARCH_DMA_MINALIGN smaller than CTR_EL0.CWG (64 < 128) > > > WARNING: CPU: 0 PID: 1 at arch/arm64/mm/dma-mapping.c:45 arch_setup_dma_ops+0xf8/0x10c > > [...] > > > This warning is triggered with nearly every driver probe, not only rtc-pm8xxx. > > > > I have a suspicion none of the reported devices actually do any DMA, so > > in practice it should be safe but we need to figure out why > > arch_setup_dma_ops() gets called. > > It gets called because there's no straightforward way to know that a > platform device *isn't* DMA-capable, so we have to assume they are. > > I would also assume that in a Qcom SoC there really are at least some things > doing non-coherent DMA :( Agreed, unless this is a CPU erratum and the line size is being reported for a cache beyond the PoC, then I think we're going to have to revert the patch reducing ARCH_DMA_MINALIGN after all. I can't find much information about the original Kryo core at all... Will 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 X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAFB8C07E96 for ; Tue, 6 Jul 2021 13:35:11 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B8B9A61C8D for ; Tue, 6 Jul 2021 13:35:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B8B9A61C8D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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=/QazyZ7vZdBedH9HSllTCWJOznBlUanCZ3gJaG/Dkis=; b=jaA31Wg+iB1RN7 FF0nJJUOhEty9oFlZ6DiRQGgmiiJWBoy301CHwM9/N+0EaIV5gDY98GSuGfN0dxrHGlbAa5Rkiu9Q xDwmjE4Ic0S2A62NpBiVsh5R4tbk4rY5T3CPDRKZOrdB6sxYjT3ncnYgo1VLthPjjzjPM+4dA2/ka qQw0/y5/uKrCM71fhPzbATdhIzHRJjLoHB46C3G/Wak0A++XXLJLXj2uLYThwKiN9cPgDyZAFmnja GmZLj5P7tEZExNom5DPcXMreV4n6Dq3IZfQsaFj4n67ziwCohfSbpN1gHkTiGxiRk0muS2oOO1k6y 5mBqQxwJ5pmq0wuCuBNQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0lCW-00Btbx-6k; Tue, 06 Jul 2021 13:33:24 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0lCS-00Btay-LO for linux-arm-kernel@lists.infradead.org; Tue, 06 Jul 2021 13:33:21 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 61E7461983; Tue, 6 Jul 2021 13:33:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625578400; bh=WcDD30TViYNS4yatqktO0avnymB6mNK7bjMGHKx69Ss=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZnmRvc80v0apIs/ErVix0easCCnnBjRfyj/dv5xuHyBuG2KxowXTGWm4DyR/1ALwq q1Ro7cNCYL7ggvrEKW2r4710VOuYE/Kz80DTmB7tnpmofjyYF///c3IC2c3SD4NXoL ZAvgZ1L9vvlFA55MWSCxw+jCYTMk9PfBaJMkPE4QZbbVyxQ3WfyssQEOEXW8NIxM59 RNNl6V3uXlPPK3WsFiTdQGTOGyf+YPx/gFBYcyLo5fGOM7rlb/NMlhlsGl0kqHQjFP C9kVM1C9p3IYIEkKx8mtFOf0t8NyHTNa8jbJlNHxI17omLaM5ShKsc2y2C+FdYzqM/ CBfbzC5TIdbiw== Date: Tue, 6 Jul 2021 14:33:14 +0100 From: Will Deacon To: Robin Murphy Cc: Catalin Marinas , Yassine Oudjana , "ardb@kernel.org" , "arnd@arndb.de" , "kernel-team@android.com" , "linux-arm-kernel@lists.infradead.org" , "mark.rutland@arm.com" , "vincent.whitchurch@axis.com" , "linux-arm-msm@vger.kernel.org" Subject: Re: [PATCH] arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES) Message-ID: <20210706133314.GB20327@willie-the-truck> References: <20210527124356.22367-1-will@kernel.org> <20210706102634.GB24903@arm.com> <59800d6c-364a-f4be-e341-c5b531657ba3@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <59800d6c-364a-f4be-e341-c5b531657ba3@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210706_063320_759858_0C5AD69E X-CRM114-Status: GOOD ( 21.74 ) 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 Tue, Jul 06, 2021 at 02:29:07PM +0100, Robin Murphy wrote: > On 2021-07-06 11:26, Catalin Marinas wrote: > > On Tue, Jul 06, 2021 at 09:26:59AM +0000, Yassine Oudjana wrote: > > > In-Reply-To: <20210527124356.22367-1-will@kernel.org> > > > > Reduce ARCH_DMA_MINALIGN to 64 bytes and allow the warning/taint to > > > > indicate if there are machines that unknowingly rely on this. > > > > > > The warning is being triggered on Qualcomm MSM8996, as well as the out-of-spec taint: > > > > Is this booting with ACPI or DT? > > > > > ------------[ cut here ]------------ > > > rtc-pm8xxx 400f000.qcom,spmi:pmic@0:rtc@6000: ARCH_DMA_MINALIGN smaller than CTR_EL0.CWG (64 < 128) > > > WARNING: CPU: 0 PID: 1 at arch/arm64/mm/dma-mapping.c:45 arch_setup_dma_ops+0xf8/0x10c > > [...] > > > This warning is triggered with nearly every driver probe, not only rtc-pm8xxx. > > > > I have a suspicion none of the reported devices actually do any DMA, so > > in practice it should be safe but we need to figure out why > > arch_setup_dma_ops() gets called. > > It gets called because there's no straightforward way to know that a > platform device *isn't* DMA-capable, so we have to assume they are. > > I would also assume that in a Qcom SoC there really are at least some things > doing non-coherent DMA :( Agreed, unless this is a CPU erratum and the line size is being reported for a cache beyond the PoC, then I think we're going to have to revert the patch reducing ARCH_DMA_MINALIGN after all. I can't find much information about the original Kryo core at all... Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel