[{"id":1760954,"web_url":"http://patchwork.ozlabs.org/comment/1760954/","msgid":"<20170831125930.GA2873@lst.de>","date":"2017-08-31T12:59:30","subject":"Re: [PATCH v2] of: Restrict DMA configuration","submitter":{"id":82,"url":"http://patchwork.ozlabs.org/api/people/82/","name":"Christoph Hellwig","email":"hch@lst.de"},"content":"Thanks Robin.  I'll wait for any additional comments until tomorrow\nand will apply it unless anyone objects.","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjjCs1YYPz9sPm\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 23:00:41 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xjjCs03Z2zDqXc\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 23:00:41 +1000 (AEST)","from newverein.lst.de (verein.lst.de [213.95.11.211])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xjjBY3pbpzDqGX\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 31 Aug 2017 22:59:33 +1000 (AEST)","by newverein.lst.de (Postfix, from userid 2407)\n\tid 2240168C4E; Thu, 31 Aug 2017 14:59:30 +0200 (CEST)"],"Date":"Thu, 31 Aug 2017 14:59:30 +0200","From":"Christoph Hellwig <hch@lst.de>","To":"Robin Murphy <robin.murphy@arm.com>","Subject":"Re: [PATCH v2] of: Restrict DMA configuration","Message-ID":"<20170831125930.GA2873@lst.de>","References":"<5fc6930c9645c934de2586179ca3f80a055689cb.1504175330.git.robin.murphy@arm.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<5fc6930c9645c934de2586179ca3f80a055689cb.1504175330.git.robin.murphy@arm.com>","User-Agent":"Mutt/1.5.17 (2007-11-01)","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,\n\trobh+dt@kernel.org, frowand.list@gmail.com, hch@lst.de,\n\tlinux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1761291,"web_url":"http://patchwork.ozlabs.org/comment/1761291/","msgid":"<CAL_JsqKC6w_RH6bu3=he28NJn74JO_XLxQPfRLg15k9eSWsiuQ@mail.gmail.com>","date":"2017-08-31T20:04:45","subject":"Re: [PATCH v2] of: Restrict DMA configuration","submitter":{"id":67416,"url":"http://patchwork.ozlabs.org/api/people/67416/","name":"Rob Herring","email":"robh+dt@kernel.org"},"content":"On Thu, Aug 31, 2017 at 5:32 AM, Robin Murphy <robin.murphy@arm.com> wrote:\n> Moving DMA configuration to happen later at driver probe time had the\n> unnoticed side-effect that we now perform DMA configuration for *every*\n> device represented in DT, rather than only those explicitly created by\n> the of_platform and PCI code.\n>\n> As Christoph points out, this is not really the best thing to do. Whilst\n> there may well be other DMA-capable buses that can benefit from having\n> their children automatically configured after the bridge has probed,\n> there are also plenty of others like USB, MDIO, etc. that definitely do\n> not support DMA and should not be indiscriminately processed.\n>\n> The good news is that in most cases the DT \"dma-ranges\" property serves\n> as an appropriate indicator - per a strict interpretation of the spec,\n> anything lacking a \"dma-ranges\" property should be considered not to\n> have a mapping of DMA address space from its children to its parent,\n> thus anything for which of_dma_get_range() does not succeed does not\n> need DMA configuration. Certain bus types have a general expectation of\n> DMA capability and carry a well-established precedent that an absent\n> \"dma-ranges\" implies the same as the empty property, so we automatically\n> opt those in to DMA configuration regardless, to avoid regressing most\n> existing platforms.\n>\n> Fixes: 09515ef5ddad (\"of/acpi: Configure dma operations at probe time for platform/amba/pci bus devices\")\n> Reported-by: Christoph Hellwig <hch@lst.de>\n> Signed-off-by: Robin Murphy <robin.murphy@arm.com>\n> ---\n>\n> v2: Updated commit message to be more reasonable\n>\n>  drivers/of/device.c | 48 ++++++++++++++++++++++++++++++++----------------\n>  1 file changed, 32 insertions(+), 16 deletions(-)\n\nAcked-by: Rob Herring <robh@kernel.org>","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjtft5ynmz9s8P\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 06:06:14 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xjtft4kFszDqgn\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 06:06:14 +1000 (AEST)","from mail.kernel.org (mail.kernel.org [198.145.29.99])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xjtdc66C6zDqRM\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri,  1 Sep 2017 06:05:08 +1000 (AEST)","from mail-qt0-f180.google.com (mail-qt0-f180.google.com\n\t[209.85.216.180])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby mail.kernel.org (Postfix) with ESMTPSA id A807621AC3\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 31 Aug 2017 20:05:06 +0000 (UTC)","by mail-qt0-f180.google.com with SMTP id x36so3177901qtx.2\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 31 Aug 2017 13:05:06 -0700 (PDT)","by 10.12.153.1 with HTTP; Thu, 31 Aug 2017 13:04:45 -0700 (PDT)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mail.kernel.org A807621AC3","Authentication-Results":["mail.kernel.org;\n\tdmarc=none (p=none dis=none) header.from=kernel.org","mail.kernel.org;\n\tspf=none smtp.mailfrom=robh+dt@kernel.org"],"X-Gm-Message-State":"AHYfb5jiY7fIb9djUcJ7zteOW8ptVIbXpGr7HrYeqyIBZp3fQ7R5u/DD\n\tDV5e644xS6Mqq8I1L6k9GNoOXV4lWw==","X-Google-Smtp-Source":"ADKCNb5v9WlKmxHUKrPa1Ls574fOAOmj0x5N7HXOhv7Mx8VSftOYIOgTIeKT1hK9x1Vmr5P3DiZ8Ex0NIYgzNE17pUM=","X-Received":"by 10.200.63.206 with SMTP id v14mr8468742qtk.174.1504209905935; \n\tThu, 31 Aug 2017 13:05:05 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<5fc6930c9645c934de2586179ca3f80a055689cb.1504175330.git.robin.murphy@arm.com>","References":"<5fc6930c9645c934de2586179ca3f80a055689cb.1504175330.git.robin.murphy@arm.com>","From":"Rob Herring <robh+dt@kernel.org>","Date":"Thu, 31 Aug 2017 15:04:45 -0500","X-Gmail-Original-Message-ID":"<CAL_JsqKC6w_RH6bu3=he28NJn74JO_XLxQPfRLg15k9eSWsiuQ@mail.gmail.com>","Message-ID":"<CAL_JsqKC6w_RH6bu3=he28NJn74JO_XLxQPfRLg15k9eSWsiuQ@mail.gmail.com>","Subject":"Re: [PATCH v2] of: Restrict DMA configuration","To":"Robin Murphy <robin.murphy@arm.com>","Content-Type":"text/plain; charset=\"UTF-8\"","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"\"devicetree@vger.kernel.org\" <devicetree@vger.kernel.org>,\n\tFrank Rowand <frowand.list@gmail.com>,\n\tlinuxppc-dev <linuxppc-dev@lists.ozlabs.org>,\n\tChristoph Hellwig <hch@lst.de>, \"linux-arm-kernel@lists.infradead.org\"\n\t<linux-arm-kernel@lists.infradead.org>, \n\tMarek Szyprowski <m.szyprowski@samsung.com>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}}]