* [PATCH] of/platform: Initialise default DMA masks @ 2018-07-27 14:14 Robin Murphy [not found] ` <9ffa7f2676c25adf39e85ec8114b26500b5680f6.1532699305.git.robin.murphy-5wv7dgnIgG8@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Robin Murphy @ 2018-07-27 14:14 UTC (permalink / raw) To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, frowand.list-Re5JQEeQqe8AvxtiuMwx3w Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, grygorii.strashko-l0cyMroinI0, krzk-DgEjT+Ai2ygdnm+yROfE0A, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, hch-jcswGhMUV9g, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r When of_dma_configure() was first born in 591c1ee465ce ("of: configure the platform device dma parameters"), everything DMA-related was factored out of of_platform_device_create_pdata() as seemed appropriate at the time. However, now that of_dma_configure() has grown into the generic handler for processing DMA-related properties from DT for all kinds of devices, it is no longer an appropriate place to be doing OF-platform-specific business. Since there are still plenty of platform drivers not setting their own masks and depending on the bus default, let's reinstate that inialisation in the OF-platform code itself, and restore the long-standing status quo from 0589342c2794 ("of: set dma_mask to point to coherent_dma_mask") CC: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> CC: Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Signed-off-by: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org> --- This shouldn't strictly depend on the changes currently queued in the dma-mapping tree, so should be OK to go through the DT tree in parallel. Ideally we'd fix all DMA-capable drivers to set their masks correctly, but in the short term everyone's going to get cross about -rc1 not booting... Robin. drivers/of/platform.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 6925d993e1f0..7ba90c290a42 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -185,6 +185,9 @@ static struct platform_device *of_platform_device_create_pdata( if (!dev) goto err_clear_flag; + dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); + if (!dev->dev.dma_mask) + dev->dev.dma_mask = &dev->dev.coherent_dma_mask; dev->dev.bus = &platform_bus_type; dev->dev.platform_data = platform_data; of_msi_configure(&dev->dev, dev->dev.of_node); -- 2.17.1.dirty ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <9ffa7f2676c25adf39e85ec8114b26500b5680f6.1532699305.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>]
* Re: [PATCH] of/platform: Initialise default DMA masks [not found] ` <9ffa7f2676c25adf39e85ec8114b26500b5680f6.1532699305.git.robin.murphy-5wv7dgnIgG8@public.gmane.org> @ 2018-07-27 14:20 ` Christoph Hellwig [not found] ` <20180727142054.GA29316-jcswGhMUV9g@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Christoph Hellwig @ 2018-07-27 14:20 UTC (permalink / raw) To: Robin Murphy Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, grygorii.strashko-l0cyMroinI0, krzk-DgEjT+Ai2ygdnm+yROfE0A, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, frowand.list-Re5JQEeQqe8AvxtiuMwx3w, hch-jcswGhMUV9g, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On Fri, Jul 27, 2018 at 03:14:15PM +0100, Robin Murphy wrote: > This shouldn't strictly depend on the changes currently queued in the > dma-mapping tree, so should be OK to go through the DT tree in parallel. > Ideally we'd fix all DMA-capable drivers to set their masks correctly, > but in the short term everyone's going to get cross about -rc1 not > booting... I'd prefer to pick this up through the dma-mapping tree, and in fact move it before the bus_dma_mask changes just to keep a bisectable tree. ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20180727142054.GA29316-jcswGhMUV9g@public.gmane.org>]
* Re: [PATCH] of/platform: Initialise default DMA masks [not found] ` <20180727142054.GA29316-jcswGhMUV9g@public.gmane.org> @ 2018-07-27 14:18 ` Robin Murphy [not found] ` <a5c6dd56-100a-e1cd-b4c4-2a30d8791ade-5wv7dgnIgG8@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Robin Murphy @ 2018-07-27 14:18 UTC (permalink / raw) To: Christoph Hellwig Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, grygorii.strashko-l0cyMroinI0, krzk-DgEjT+Ai2ygdnm+yROfE0A, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, frowand.list-Re5JQEeQqe8AvxtiuMwx3w, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On 27/07/18 15:20, Christoph Hellwig wrote: > On Fri, Jul 27, 2018 at 03:14:15PM +0100, Robin Murphy wrote: >> This shouldn't strictly depend on the changes currently queued in the >> dma-mapping tree, so should be OK to go through the DT tree in parallel. >> Ideally we'd fix all DMA-capable drivers to set their masks correctly, >> but in the short term everyone's going to get cross about -rc1 not >> booting... > > I'd prefer to pick this up through the dma-mapping tree, and in fact > move it before the bus_dma_mask changes just to keep a bisectable > tree. Sure, if Rob and Frank are OK with that I don't mind either way. Thanks, Robin. ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <a5c6dd56-100a-e1cd-b4c4-2a30d8791ade-5wv7dgnIgG8@public.gmane.org>]
* Re: [PATCH] of/platform: Initialise default DMA masks [not found] ` <a5c6dd56-100a-e1cd-b4c4-2a30d8791ade-5wv7dgnIgG8@public.gmane.org> @ 2018-07-27 16:50 ` Rob Herring [not found] ` <CAL_JsqJCtzhcO8s59d=SPEtYpDWhCkKo99cQiuK987Y1Oqgb9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Rob Herring @ 2018-07-27 16:50 UTC (permalink / raw) To: Robin Murphy Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Grygorii Strashko, Krzysztof Kozlowski, Linux IOMMU, Frank Rowand, Christoph Hellwig, moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE On Fri, Jul 27, 2018 at 8:18 AM Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org> wrote: > > On 27/07/18 15:20, Christoph Hellwig wrote: > > On Fri, Jul 27, 2018 at 03:14:15PM +0100, Robin Murphy wrote: > >> This shouldn't strictly depend on the changes currently queued in the > >> dma-mapping tree, so should be OK to go through the DT tree in parallel. > >> Ideally we'd fix all DMA-capable drivers to set their masks correctly, > >> but in the short term everyone's going to get cross about -rc1 not > >> booting... > > > > I'd prefer to pick this up through the dma-mapping tree, and in fact > > move it before the bus_dma_mask changes just to keep a bisectable > > tree. > > Sure, if Rob and Frank are OK with that I don't mind either way. NP. Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <CAL_JsqJCtzhcO8s59d=SPEtYpDWhCkKo99cQiuK987Y1Oqgb9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] of/platform: Initialise default DMA masks [not found] ` <CAL_JsqJCtzhcO8s59d=SPEtYpDWhCkKo99cQiuK987Y1Oqgb9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2018-07-27 17:03 ` Christoph Hellwig 0 siblings, 0 replies; 5+ messages in thread From: Christoph Hellwig @ 2018-07-27 17:03 UTC (permalink / raw) To: Rob Herring Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Grygorii Strashko, Robin Murphy, Krzysztof Kozlowski, Linux IOMMU, Frank Rowand, Christoph Hellwig, moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE On Fri, Jul 27, 2018 at 10:50:34AM -0600, Rob Herring wrote: > On Fri, Jul 27, 2018 at 8:18 AM Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org> wrote: > > > > On 27/07/18 15:20, Christoph Hellwig wrote: > > > On Fri, Jul 27, 2018 at 03:14:15PM +0100, Robin Murphy wrote: > > >> This shouldn't strictly depend on the changes currently queued in the > > >> dma-mapping tree, so should be OK to go through the DT tree in parallel. > > >> Ideally we'd fix all DMA-capable drivers to set their masks correctly, > > >> but in the short term everyone's going to get cross about -rc1 not > > >> booting... > > > > > > I'd prefer to pick this up through the dma-mapping tree, and in fact > > > move it before the bus_dma_mask changes just to keep a bisectable > > > tree. > > > > Sure, if Rob and Frank are OK with that I don't mind either way. > > NP. > > Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Ok, applied so that it gets into the next linux-next. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-07-27 17:03 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-07-27 14:14 [PATCH] of/platform: Initialise default DMA masks Robin Murphy [not found] ` <9ffa7f2676c25adf39e85ec8114b26500b5680f6.1532699305.git.robin.murphy-5wv7dgnIgG8@public.gmane.org> 2018-07-27 14:20 ` Christoph Hellwig [not found] ` <20180727142054.GA29316-jcswGhMUV9g@public.gmane.org> 2018-07-27 14:18 ` Robin Murphy [not found] ` <a5c6dd56-100a-e1cd-b4c4-2a30d8791ade-5wv7dgnIgG8@public.gmane.org> 2018-07-27 16:50 ` Rob Herring [not found] ` <CAL_JsqJCtzhcO8s59d=SPEtYpDWhCkKo99cQiuK987Y1Oqgb9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2018-07-27 17:03 ` Christoph Hellwig
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).