* [PATCH] of: dma: protect list write operation by spin_lock
@ 2013-01-28 15:24 Andy Shevchenko
[not found] ` <1359386694-20548-1-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2013-01-28 15:24 UTC (permalink / raw)
To: Grant Likely, Rob Herring,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Arnd Bergmann
Cc: Andy Shevchenko
Signed-off-by: Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
---
drivers/of/dma.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/of/dma.c b/drivers/of/dma.c
index 59631b2..1ae6120 100644
--- a/drivers/of/dma.c
+++ b/drivers/of/dma.c
@@ -117,7 +117,9 @@ int of_dma_controller_register(struct device_node *np,
ofdma->use_count = 0;
/* Now queue of_dma controller structure in list */
+ spin_lock(&of_dma_lock);
list_add_tail(&ofdma->of_dma_controllers, &of_dma_list);
+ spin_unlock(&of_dma_lock);
return 0;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] of: dma: protect list write operation by spin_lock
[not found] ` <1359386694-20548-1-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
@ 2013-01-28 15:52 ` Rob Herring
[not found] ` <51069EA0.4040004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2013-01-28 15:52 UTC (permalink / raw)
To: Andy Shevchenko, Vinod Koul; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
On 01/28/2013 09:24 AM, Andy Shevchenko wrote:
> Signed-off-by: Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> ---
> drivers/of/dma.c | 2 ++
> 1 file changed, 2 insertions(+)
You need to cc whomever has this file in their tree which is Vinod.
Acked-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
Vinod, it's probably better to move drivers/of/dma.c to drivers/dma.
That's been the direction we've been taking with new OF binding code. I
must have missed that in the review.
Rob
>
> diff --git a/drivers/of/dma.c b/drivers/of/dma.c
> index 59631b2..1ae6120 100644
> --- a/drivers/of/dma.c
> +++ b/drivers/of/dma.c
> @@ -117,7 +117,9 @@ int of_dma_controller_register(struct device_node *np,
> ofdma->use_count = 0;
>
> /* Now queue of_dma controller structure in list */
> + spin_lock(&of_dma_lock);
> list_add_tail(&ofdma->of_dma_controllers, &of_dma_list);
> + spin_unlock(&of_dma_lock);
>
> return 0;
> }
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] of: dma: protect list write operation by spin_lock
[not found] ` <51069EA0.4040004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-01-28 16:07 ` Vinod Koul
[not found] ` <20130128160757.GA6396-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Vinod Koul @ 2013-01-28 16:07 UTC (permalink / raw)
To: Rob Herring; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Andy Shevchenko
On Mon, Jan 28, 2013 at 09:52:00AM -0600, Rob Herring wrote:
> On 01/28/2013 09:24 AM, Andy Shevchenko wrote:
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> > ---
> > drivers/of/dma.c | 2 ++
> > 1 file changed, 2 insertions(+)
>
> You need to cc whomever has this file in their tree which is Vinod.
>
> Acked-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
>
> Vinod, it's probably better to move drivers/of/dma.c to drivers/dma.
> That's been the direction we've been taking with new OF binding code. I
> must have missed that in the review.
ok, do you have any patches on your tree for this if not then I can update my tree
for this change and then we can apply changes thru slave-dma tree.
--
~Vinod
>
> Rob
>
> >
> > diff --git a/drivers/of/dma.c b/drivers/of/dma.c
> > index 59631b2..1ae6120 100644
> > --- a/drivers/of/dma.c
> > +++ b/drivers/of/dma.c
> > @@ -117,7 +117,9 @@ int of_dma_controller_register(struct device_node *np,
> > ofdma->use_count = 0;
> >
> > /* Now queue of_dma controller structure in list */
> > + spin_lock(&of_dma_lock);
> > list_add_tail(&ofdma->of_dma_controllers, &of_dma_list);
> > + spin_unlock(&of_dma_lock);
> >
> > return 0;
> > }
> >
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] of: dma: protect list write operation by spin_lock
[not found] ` <20130128160757.GA6396-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2013-01-29 15:36 ` Rob Herring
[not found] ` <5107EC8D.5070001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2013-01-29 15:36 UTC (permalink / raw)
To: Vinod Koul; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Andy Shevchenko
On 01/28/2013 10:07 AM, Vinod Koul wrote:
> On Mon, Jan 28, 2013 at 09:52:00AM -0600, Rob Herring wrote:
>> On 01/28/2013 09:24 AM, Andy Shevchenko wrote:
>>> Signed-off-by: Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
>>> ---
>>> drivers/of/dma.c | 2 ++
>>> 1 file changed, 2 insertions(+)
>>
>> You need to cc whomever has this file in their tree which is Vinod.
>>
>> Acked-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
>>
>> Vinod, it's probably better to move drivers/of/dma.c to drivers/dma.
>> That's been the direction we've been taking with new OF binding code. I
>> must have missed that in the review.
> ok, do you have any patches on your tree for this if not then I can update my tree
> for this change and then we can apply changes thru slave-dma tree.
No, I don't have one prepared.
Rob
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] of: dma: protect list write operation by spin_lock
[not found] ` <5107EC8D.5070001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-02-12 17:20 ` Vinod Koul
[not found] ` <20130212172027.GT3789-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Vinod Koul @ 2013-02-12 17:20 UTC (permalink / raw)
To: Rob Herring, Arnd Bergmann
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Andy Shevchenko
On Tue, Jan 29, 2013 at 09:36:45AM -0600, Rob Herring wrote:
> >> Vinod, it's probably better to move drivers/of/dma.c to drivers/dma.
> >> That's been the direction we've been taking with new OF binding code. I
> >> must have missed that in the review.
> > ok, do you have any patches on your tree for this if not then I can update my tree
> > for this change and then we can apply changes thru slave-dma tree.
>
> No, I don't have one prepared.
Okay, I have committed and pushed drivers/of/dma.c to be moved to
drivers/dma/of-dma.c
From: Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Date: Tue, 12 Feb 2013 09:15:02 -0800
Subject: [PATCH] dmaengine: move drivers/of/dma.c -> drivers/dma/of-dma.c
as requested by Rob
Suggested-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/{of/dma.c => dma/of-dma.c} | 0
1 files changed, 0 insertions(+), 0 deletions(-)
rename drivers/{of/dma.c => dma/of-dma.c} (100%)
diff --git a/drivers/of/dma.c b/drivers/dma/of-dma.c
similarity index 100%
rename from drivers/of/dma.c
rename to drivers/dma/of-dma.c
--
1.7.0.4
Anyone cares to Ack?
--
~Vinod
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] of: dma: protect list write operation by spin_lock
[not found] ` <20130212172027.GT3789-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2013-02-13 7:48 ` Andy Shevchenko
2013-02-13 10:48 ` Vinod Koul
0 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2013-02-13 7:48 UTC (permalink / raw)
To: Vinod Koul; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Andy Shevchenko
On Tue, 2013-02-12 at 09:20 -0800, Vinod Koul wrote:
> On Tue, Jan 29, 2013 at 09:36:45AM -0600, Rob Herring wrote:
> > >> Vinod, it's probably better to move drivers/of/dma.c to drivers/dma.
> > >> That's been the direction we've been taking with new OF binding code. I
> > >> must have missed that in the review.
> > > ok, do you have any patches on your tree for this if not then I can update my tree
> > > for this change and then we can apply changes thru slave-dma tree.
> >
> > No, I don't have one prepared.
> Okay, I have committed and pushed drivers/of/dma.c to be moved to
> drivers/dma/of-dma.c
>
> From: Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Date: Tue, 12 Feb 2013 09:15:02 -0800
> Subject: [PATCH] dmaengine: move drivers/of/dma.c -> drivers/dma/of-dma.c
>
> as requested by Rob
>
> Suggested-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> Signed-off-by: Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> ---
> drivers/{of/dma.c => dma/of-dma.c} | 0
> 1 files changed, 0 insertions(+), 0 deletions(-)
> rename drivers/{of/dma.c => dma/of-dma.c} (100%)
>
What about Kconfig(s) / Makefile(s)?
And I think the of_dma.c looks better as a name of the file.
> diff --git a/drivers/of/dma.c b/drivers/dma/of-dma.c
> similarity index 100%
> rename from drivers/of/dma.c
> rename to drivers/dma/of-dma.c
> --
> 1.7.0.4
>
> Anyone cares to Ack?
>
> --
> ~Vinod
--
Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Intel Finland Oy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] of: dma: protect list write operation by spin_lock
2013-02-13 7:48 ` Andy Shevchenko
@ 2013-02-13 10:48 ` Vinod Koul
0 siblings, 0 replies; 7+ messages in thread
From: Vinod Koul @ 2013-02-13 10:48 UTC (permalink / raw)
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Andy Shevchenko
On Wed, Feb 13, 2013 at 09:48:29AM +0200, Andy Shevchenko wrote:
> On Tue, 2013-02-12 at 09:20 -0800, Vinod Koul wrote:
> > On Tue, Jan 29, 2013 at 09:36:45AM -0600, Rob Herring wrote:
> > > >> Vinod, it's probably better to move drivers/of/dma.c to drivers/dma.
> > > >> That's been the direction we've been taking with new OF binding code. I
> > > >> must have missed that in the review.
> > > > ok, do you have any patches on your tree for this if not then I can update my tree
> > > > for this change and then we can apply changes thru slave-dma tree.
> > >
> > > No, I don't have one prepared.
> > Okay, I have committed and pushed drivers/of/dma.c to be moved to
> > drivers/dma/of-dma.c
> What about Kconfig(s) / Makefile(s)?
Here is the complete patch in my tree
----
From: Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Date: Tue, 12 Feb 2013 09:15:02 -0800
Subject: [PATCH] dmaengine: move drivers/of/dma.c -> drivers/dma/of-dma.c
as requested by Rob
Suggested-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/dma/Kconfig | 4 ++++
drivers/dma/Makefile | 2 ++
drivers/{of/dma.c => dma/of-dma.c} | 0
drivers/of/Makefile | 2 +-
4 files changed, 7 insertions(+), 1 deletions(-)
rename drivers/{of/dma.c => dma/of-dma.c} (100%)
diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 0b408bb..e92b5f0 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -325,6 +325,10 @@ config DMA_ENGINE
config DMA_VIRTUAL_CHANNELS
tristate
+config DMA_OF
+ def_bool y
+ depends on OF
+
comment "DMA Clients"
depends on DMA_ENGINE
diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
index 7428fea..c1ed644 100644
--- a/drivers/dma/Makefile
+++ b/drivers/dma/Makefile
@@ -3,6 +3,8 @@ ccflags-$(CONFIG_DMADEVICES_VDEBUG) += -DVERBOSE_DEBUG
obj-$(CONFIG_DMA_ENGINE) += dmaengine.o
obj-$(CONFIG_DMA_VIRTUAL_CHANNELS) += virt-dma.o
+obj-$(CONFIG_DMA_OF) += of-dma.o
+
obj-$(CONFIG_NET_DMA) += iovlock.o
obj-$(CONFIG_INTEL_MID_DMAC) += intel_mid_dma.o
obj-$(CONFIG_DMATEST) += dmatest.o
diff --git a/drivers/of/dma.c b/drivers/dma/of-dma.c
similarity index 100%
rename from drivers/of/dma.c
rename to drivers/dma/of-dma.c
diff --git a/drivers/of/Makefile b/drivers/of/Makefile
index eafa107..e027f44 100644
--- a/drivers/of/Makefile
+++ b/drivers/of/Makefile
@@ -1,4 +1,4 @@
-obj-y = base.o dma.o
+obj-y = base.o
obj-$(CONFIG_OF_FLATTREE) += fdt.o
obj-$(CONFIG_OF_PROMTREE) += pdt.o
obj-$(CONFIG_OF_ADDRESS) += address.o
--
1.7.0.4
>
> And I think the of_dma.c looks better as a name of the file.
we have both a-b.c and a_b.c is the drivers/dma...
--
~Vinod
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-02-13 10:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-28 15:24 [PATCH] of: dma: protect list write operation by spin_lock Andy Shevchenko
[not found] ` <1359386694-20548-1-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-01-28 15:52 ` Rob Herring
[not found] ` <51069EA0.4040004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-01-28 16:07 ` Vinod Koul
[not found] ` <20130128160757.GA6396-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-01-29 15:36 ` Rob Herring
[not found] ` <5107EC8D.5070001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-02-12 17:20 ` Vinod Koul
[not found] ` <20130212172027.GT3789-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-02-13 7:48 ` Andy Shevchenko
2013-02-13 10:48 ` Vinod Koul
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).