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=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS 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 0FD12C33CB2 for ; Fri, 31 Jan 2020 10:44:21 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 B2DB4206F0 for ; Fri, 31 Jan 2020 10:44:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="eh+m0Uxt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B2DB4206F0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 488DNz0LQBzDq62 for ; Fri, 31 Jan 2020 21:44:19 +1100 (AEDT) Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 488DJ7706KzDqcG for ; Fri, 31 Jan 2020 21:40:07 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=eh+m0Uxt; dkim-atps=neutral Received: by ozlabs.org (Postfix) id 488DJ53W5Bz9sSP; Fri, 31 Jan 2020 21:40:05 +1100 (AEDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 488DJ44WsFz9sSL; Fri, 31 Jan 2020 21:40:04 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1580467205; bh=t+s8IXmWy8smiLWcBN6/ROFxyXt50DgN0gQz63dthJs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=eh+m0UxtIKLSkLBM2+h1bfL7Sqbjt8HBh90YjNP4Rmh6apty+6QHqyakuoH5MivVz 1AVKSBRjL4LLJxYAl/MbKqfCvv7dlmlQ6zFRm90onc7za6+2tOMXKp6klsaVfIq9vc l4maU/5MoO05LVVvrZgtcp3TeOxB4UDWJWqbHDIIv6HbF4+Wr+3V1c8b9qylp07DNm ojI0PSCZuUcvtUyjvaKSz0thr/fU3zRP6IN1Zs+XS8a6UCXgSpJ6JHGcfwPv0HOaT0 nT25LXzSCa8/P8EYPWAJnD3Lm8cx6b9d+AnPDb3FU0X/e6RCQKy5rD167sAdsreVgM 6aAYUdIeub9fQ== From: Michael Ellerman To: Ulf Hansson Subject: Re: [PATCH] of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc In-Reply-To: References: <20200126115247.13402-1-mpe@ellerman.id.au> Date: Fri, 31 Jan 2020 21:40:03 +1100 Message-ID: <87mua3gb98.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: DTML , Linux Kernel Mailing List , linuxppc-dev@ozlabs.org, Rob Herring , Christian Zigotzky , Christoph Hellwig Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Ulf Hansson writes: > On Sun, 26 Jan 2020 at 12:53, Michael Ellerman wrote: >> There's an OF helper called of_dma_is_coherent(), which checks if a >> device has a "dma-coherent" property to see if the device is coherent >> for DMA. >> >> But on some platforms devices are coherent by default, and on some >> platforms it's not possible to update existing device trees to add the >> "dma-coherent" property. >> >> So add a Kconfig symbol to allow arch code to tell >> of_dma_is_coherent() that devices are coherent by default, regardless >> of the presence of the property. >> >> Select that symbol on powerpc when NOT_COHERENT_CACHE is not set, ie. >> when the system has a coherent cache. >> >> Fixes: 92ea637edea3 ("of: introduce of_dma_is_coherent() helper") >> Cc: stable@vger.kernel.org # v3.16+ >> Reported-by: Christian Zigotzky >> Tested-by: Christian Zigotzky >> Signed-off-by: Michael Ellerman > > Thanks Michael for helping out fixing and this! The patch looks good to me. > > Reviewed-by: Ulf Hansson Thanks for the review. cheers 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=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 1039EC33CB7 for ; Fri, 31 Jan 2020 10:40:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D06332467B for ; Fri, 31 Jan 2020 10:40:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="eh+m0Uxt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728391AbgAaKkK (ORCPT ); Fri, 31 Jan 2020 05:40:10 -0500 Received: from bilbo.ozlabs.org ([203.11.71.1]:33137 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728326AbgAaKkI (ORCPT ); Fri, 31 Jan 2020 05:40:08 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 488DJ44WsFz9sSL; Fri, 31 Jan 2020 21:40:04 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1580467205; bh=t+s8IXmWy8smiLWcBN6/ROFxyXt50DgN0gQz63dthJs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=eh+m0UxtIKLSkLBM2+h1bfL7Sqbjt8HBh90YjNP4Rmh6apty+6QHqyakuoH5MivVz 1AVKSBRjL4LLJxYAl/MbKqfCvv7dlmlQ6zFRm90onc7za6+2tOMXKp6klsaVfIq9vc l4maU/5MoO05LVVvrZgtcp3TeOxB4UDWJWqbHDIIv6HbF4+Wr+3V1c8b9qylp07DNm ojI0PSCZuUcvtUyjvaKSz0thr/fU3zRP6IN1Zs+XS8a6UCXgSpJ6JHGcfwPv0HOaT0 nT25LXzSCa8/P8EYPWAJnD3Lm8cx6b9d+AnPDb3FU0X/e6RCQKy5rD167sAdsreVgM 6aAYUdIeub9fQ== From: Michael Ellerman To: Ulf Hansson Cc: Rob Herring , DTML , Linux Kernel Mailing List , Christoph Hellwig , Christian Zigotzky , linuxppc-dev@ozlabs.org Subject: Re: [PATCH] of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc In-Reply-To: References: <20200126115247.13402-1-mpe@ellerman.id.au> Date: Fri, 31 Jan 2020 21:40:03 +1100 Message-ID: <87mua3gb98.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Ulf Hansson writes: > On Sun, 26 Jan 2020 at 12:53, Michael Ellerman wrote: >> There's an OF helper called of_dma_is_coherent(), which checks if a >> device has a "dma-coherent" property to see if the device is coherent >> for DMA. >> >> But on some platforms devices are coherent by default, and on some >> platforms it's not possible to update existing device trees to add the >> "dma-coherent" property. >> >> So add a Kconfig symbol to allow arch code to tell >> of_dma_is_coherent() that devices are coherent by default, regardless >> of the presence of the property. >> >> Select that symbol on powerpc when NOT_COHERENT_CACHE is not set, ie. >> when the system has a coherent cache. >> >> Fixes: 92ea637edea3 ("of: introduce of_dma_is_coherent() helper") >> Cc: stable@vger.kernel.org # v3.16+ >> Reported-by: Christian Zigotzky >> Tested-by: Christian Zigotzky >> Signed-off-by: Michael Ellerman > > Thanks Michael for helping out fixing and this! The patch looks good to me. > > Reviewed-by: Ulf Hansson Thanks for the review. cheers