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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,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 66D9AC07E96 for ; Tue, 6 Jul 2021 13:29:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 497AA61C97 for ; Tue, 6 Jul 2021 13:29:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231618AbhGFNb5 (ORCPT ); Tue, 6 Jul 2021 09:31:57 -0400 Received: from foss.arm.com ([217.140.110.172]:42426 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231453AbhGFNb5 (ORCPT ); Tue, 6 Jul 2021 09:31:57 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 667CC1FB; Tue, 6 Jul 2021 06:29:18 -0700 (PDT) Received: from [10.57.40.45] (unknown [10.57.40.45]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B294E3F73B; Tue, 6 Jul 2021 06:29:16 -0700 (PDT) Subject: Re: [PATCH] arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES) To: Catalin Marinas , Yassine Oudjana Cc: "will@kernel.org" , "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" References: <20210527124356.22367-1-will@kernel.org> <20210706102634.GB24903@arm.com> From: Robin Murphy Message-ID: <59800d6c-364a-f4be-e341-c5b531657ba3@arm.com> Date: Tue, 6 Jul 2021 14:29:07 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210706102634.GB24903@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 :( Robin.