Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp2544712rwe; Sat, 15 Apr 2023 23:42:29 -0700 (PDT) X-Google-Smtp-Source: AKy350ZUXwPHN5hQqJFgPVj4IizZP7s9HbYD4ORWxoVtaH1GKynHcwP4rd3+kimfEcop7F4yokse X-Received: by 2002:a17:902:db0e:b0:19e:29bd:8411 with SMTP id m14-20020a170902db0e00b0019e29bd8411mr10390500plx.30.1681627349170; Sat, 15 Apr 2023 23:42:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681627349; cv=none; d=google.com; s=arc-20160816; b=kj9gw380VN3x97btuoc7eieAfjSGWxgfsM/YvdGxCsLwD1qOt+cyQqX22v4J1Ttbr8 8utja63L7v6okWNGWulOQzDu+nRHinfUeLx/ayYiAOMnrYOuAKTiH1R/CT4z5FRnWcg/ j8wWmh3mu92EkhH+DPO0ienxwSyK01PHwGGSXTd9PR7J6NwApk9whar8gRVy3L/kHppF Qo7RuFNVCIRyIqHwZefe2L72IUcGcSMVAYuz/vHDJ/9ov0ZBJ3p14zl+4tKIPWPh6IS3 U7tzEJe2l334TS+N8IyInX4ZUL7ruLofDf1bpyxrGM4AW+xxkmlcGJyr6so8qdXME9Ov vgTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Yid6tM5sM5sj1d7PSjr3CMn+Z5CGKGd05TydVUWUs5o=; b=EkuuFWVUrbqn0dtu9urcJA953vYbkTfzJuXKi9rjzKLvhyNyH5fjnkwXurCVRImotE IgeZ9ISsxo9R0QRFj42KBFiDJHPCDS3hAWiSDYVFFWM0EIgfiSb8u+LpXKYAsxm0OV7z wSba/dgYgM9NBvdboEwFjuLdB9qS+Lkl+XNHXys18jpaKAsCjfexgIUwjR9nYyIk45Ep TQWdwiD/AQ0/qZ4Zw/VymVXuX1DojDMPVZt7r9E5nqOfBIU2O2GNE5wVNM2bjhzltwKr 8dnWHgkSBmfUmNGLNbjipWlL8vvEiOFbUK+oHwRUPzKjqXhL+dLW7xEJD7tU4h3uzgDT 6c9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d10-20020a170902b70a00b001a242dbbd27si8526206pls.513.2023.04.15.23.42.18; Sat, 15 Apr 2023 23:42:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230044AbjDPGaf (ORCPT + 99 others); Sun, 16 Apr 2023 02:30:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229582AbjDPGad (ORCPT ); Sun, 16 Apr 2023 02:30:33 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E110AF4 for ; Sat, 15 Apr 2023 23:30:32 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 26E9067373; Sun, 16 Apr 2023 08:30:29 +0200 (CEST) Date: Sun, 16 Apr 2023 08:30:28 +0200 From: Christoph Hellwig To: Zhiqiang Hou Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org, hch@lst.de, m.szyprowski@samsung.com, robin.murphy@arm.com Subject: Re: [RFC PATCH] dma: coherent: respect to device 'dma-coherent' property Message-ID: <20230416063028.GA6276@lst.de> References: <20230414080307.35114-1-Zhiqiang.Hou@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230414080307.35114-1-Zhiqiang.Hou@nxp.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 14, 2023 at 04:03:07PM +0800, Zhiqiang Hou wrote: > From: Hou Zhiqiang > > Currently, the coherent DMA memory is always mapped as writecombine > and uncached, ignored the 'dma-coherent' property in device node, > this patch is to map the memory as writeback and cached when the > device has 'dma-coherent' property. What is the use case here? The somewhat misnamed per-device coherent memory is intended for small per-device pools of sram or such used for staging memory.