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.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 A4478C388F2 for ; Mon, 2 Nov 2020 13:02:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 11D37223B0 for ; Mon, 2 Nov 2020 13:02:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gzXQ3Y5z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 11D37223B0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com 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=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=p9sAc9w9gtvfMo8HfrdTSUKFUzx74QEz2qPZE9kLoV0=; b=gzXQ3Y5zuv3m5M6RfWDCHEOo3 9bXlaZP3Jb41xmHCDs6kHmIavbUVZ7KkjT1myW8RGtrHtK9uvpnZl0ZkN9qeCNblmvdEKBZKDBxU+ yMghOpfl9SaEcodS7/5hb1OT9v6lw7V7OSviHNP+eKDQFVkIoQGpVRmoWQ8VwyjxyPYyTPpCS0oqJ XRyRvfDhp5GxkfCrumqKjHsDqGooR4aRGB0DaG3W3bKSnf8pYZnBk+gNekyYeCbjmOvT3V6uAEWNA OjXpo59MlpoW/dYJunvWxtaUVL6wDpWJcQoepraI+Icvbcu2jgqIB1d+f0fF0K7HYkjBCkjI6DghP TtMM/U0WA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZZSw-0005Pw-Nj; Mon, 02 Nov 2020 13:01:42 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZZSt-0005Om-M2 for linux-arm-kernel@lists.infradead.org; Mon, 02 Nov 2020 13:01:40 +0000 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 9FA7930E; Mon, 2 Nov 2020 05:01:37 -0800 (PST) Received: from [10.57.54.223] (unknown [10.57.54.223]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 886703F66E; Mon, 2 Nov 2020 05:01:36 -0800 (PST) Subject: Re: [PATCH] arm64: dts: ti: k3-am65: mark dss as dma-coherent To: Tomi Valkeinen , Nishanth Menon , Nikhil Devshatwar References: <20201029141159.190621-1-tomi.valkeinen@ti.com> <20201029144100.bf35vierhfignips@NiksLab> <20201029145217.zjazhjvylgwez4do@husked> <8532a1c0-29db-d67a-441f-b58b232f7c98@ti.com> From: Robin Murphy Message-ID: <59747093-4171-937d-70a3-ce6ee788cf79@arm.com> Date: Mon, 2 Nov 2020 13:01:34 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <8532a1c0-29db-d67a-441f-b58b232f7c98@ti.com> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201102_080139_785306_BB2F7C86 X-CRM114-Status: GOOD ( 16.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tero Kristo , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020-10-30 14:08, Tomi Valkeinen wrote: > On 29/10/2020 16:52, Nishanth Menon wrote: >> On 20:11-20201029, Nikhil Devshatwar wrote: >>> On 16:11-20201029, Tomi Valkeinen wrote: >>>> DSS is IO coherent on AM65, so we can mark it as such with >>>> 'dma-coherent' property in the DT file. >>>> >>>> Signed-off-by: Tomi Valkeinen >>> Acked-by: Nikhil Devshatwar >>> >> >> Tomi: Do you need to add Fixes: tag to percolate this to stable? if >> yes, please comment, makes it easier for me to queue for 5.10 if >> possible > > I don't see this as a fix, but an optimization. Nothing is broken without this. Note that if the driver doesn't have explicit control over what type of memory access the device makes, that's not necessarily true. If coherent DMA buffers are allocated from regular kernel memory, there's still a cacheable alias kicking around that can be speculatively fetched into a cache somewhere. If the device is genuinely non-coherent, or configured to make non-snooping accesses, then that's not an issue, but it it's hard-wired to make snooping accesses it can start hitting that cached alias and not see subsequent updates to the buffer, since those are written straight to RAM via the non-cacheable mapping. At that point it becomes an actual problem (and it's not just theoretical - we've hit a real-world example of this recently with GPUs on certain Amlogic devices). Robin. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel