From: jacopo mondi <jacopo@jmondi.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>,
Christoph Hellwig <hch@lst.de>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
Linux-sh list <linux-sh@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sh: migor: Set DMA and DMA coherent mask
Date: Tue, 17 Apr 2018 16:39:10 +0200 [thread overview]
Message-ID: <20180417143910.GC3519@w540> (raw)
In-Reply-To: <CAMuHMdUqGgovaorxXDSCPK3dg2PLQwYoxm1mQdj=Dqi1-sDE7g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3390 bytes --]
Hi Geert,
On Tue, Apr 17, 2018 at 04:30:03PM +0200, Geert Uytterhoeven wrote:
> Hi Jacopo,
>
> CC Christoph
>
> On Tue, Apr 17, 2018 at 4:13 PM, Jacopo Mondi <jacopo+renesas@jmondi.org> wrote:
> > As of commit 205e1b7f51e4 ("dma-mapping: warn when there is no
> > coherent_dma_mask") the Migo-R platform devices registered without a DMA
> > mask and coherent DMA mask issue the following warning
> >
> > WARNING: CPU: 0 PID: 1 at ./include/linux/dma-mapping.h:516 0x40159e20
> >
> > Set dma mask and coherent DMA mask for Migo-R platforms devices to 32
> > bits as all other SH4a platforms do.
> >
> > Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
>
> Thanks for your patch!
>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> I guess usbf_device.dev.dma_mask should be fixed as well?
I don't get any warning for that. The only platform devices on which
platform_resource_setup_memory() is called on before registering them
are the ones this patch modifies, if I'm not wrong.
>
> BTW, there are plenty of other SH platforms that need similar fixes.
Oh, why am I not surprised? :/
Thanks
j
>
> > ---
> > arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
> > index 6b3a26e..3fe1ea7 100644
> > --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
> > +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
> > @@ -7,6 +7,7 @@
> > * License. See the file "COPYING" in the main directory of this archive
> > * for more details.
> > */
> > +#include <linux/dma-mapping.h>
> > #include <linux/init.h>
> > #include <linux/mm.h>
> > #include <linux/platform_device.h>
> > @@ -347,6 +348,8 @@ static struct platform_device vpu_device = {
> > .name = "uio_pdrv_genirq",
> > .id = 0,
> > .dev = {
> > + .dma_mask = &vpu_device.dev.coherent_dma_mask,
> > + .coherent_dma_mask = DMA_BIT_MASK(32),
> > .platform_data = &vpu_platform_data,
> > },
> > .resource = vpu_resources,
> > @@ -375,6 +378,8 @@ static struct platform_device veu_device = {
> > .name = "uio_pdrv_genirq",
> > .id = 1,
> > .dev = {
> > + .dma_mask = &veu_device.dev.coherent_dma_mask,
> > + .coherent_dma_mask = DMA_BIT_MASK(32),
> > .platform_data = &veu_platform_data,
> > },
> > .resource = veu_resources,
> > @@ -403,6 +408,8 @@ static struct platform_device jpu_device = {
> > .name = "uio_pdrv_genirq",
> > .id = 2,
> > .dev = {
> > + .dma_mask = &jpu_device.dev.coherent_dma_mask,
> > + .coherent_dma_mask = DMA_BIT_MASK(32),
> > .platform_data = &jpu_platform_data,
> > },
> > .resource = jpu_resources,
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: jacopo mondi <jacopo@jmondi.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>,
Christoph Hellwig <hch@lst.de>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
Linux-sh list <linux-sh@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sh: migor: Set DMA and DMA coherent mask
Date: Tue, 17 Apr 2018 14:39:10 +0000 [thread overview]
Message-ID: <20180417143910.GC3519@w540> (raw)
In-Reply-To: <CAMuHMdUqGgovaorxXDSCPK3dg2PLQwYoxm1mQdj=Dqi1-sDE7g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3390 bytes --]
Hi Geert,
On Tue, Apr 17, 2018 at 04:30:03PM +0200, Geert Uytterhoeven wrote:
> Hi Jacopo,
>
> CC Christoph
>
> On Tue, Apr 17, 2018 at 4:13 PM, Jacopo Mondi <jacopo+renesas@jmondi.org> wrote:
> > As of commit 205e1b7f51e4 ("dma-mapping: warn when there is no
> > coherent_dma_mask") the Migo-R platform devices registered without a DMA
> > mask and coherent DMA mask issue the following warning
> >
> > WARNING: CPU: 0 PID: 1 at ./include/linux/dma-mapping.h:516 0x40159e20
> >
> > Set dma mask and coherent DMA mask for Migo-R platforms devices to 32
> > bits as all other SH4a platforms do.
> >
> > Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
>
> Thanks for your patch!
>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> I guess usbf_device.dev.dma_mask should be fixed as well?
I don't get any warning for that. The only platform devices on which
platform_resource_setup_memory() is called on before registering them
are the ones this patch modifies, if I'm not wrong.
>
> BTW, there are plenty of other SH platforms that need similar fixes.
Oh, why am I not surprised? :/
Thanks
j
>
> > ---
> > arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
> > index 6b3a26e..3fe1ea7 100644
> > --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
> > +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
> > @@ -7,6 +7,7 @@
> > * License. See the file "COPYING" in the main directory of this archive
> > * for more details.
> > */
> > +#include <linux/dma-mapping.h>
> > #include <linux/init.h>
> > #include <linux/mm.h>
> > #include <linux/platform_device.h>
> > @@ -347,6 +348,8 @@ static struct platform_device vpu_device = {
> > .name = "uio_pdrv_genirq",
> > .id = 0,
> > .dev = {
> > + .dma_mask = &vpu_device.dev.coherent_dma_mask,
> > + .coherent_dma_mask = DMA_BIT_MASK(32),
> > .platform_data = &vpu_platform_data,
> > },
> > .resource = vpu_resources,
> > @@ -375,6 +378,8 @@ static struct platform_device veu_device = {
> > .name = "uio_pdrv_genirq",
> > .id = 1,
> > .dev = {
> > + .dma_mask = &veu_device.dev.coherent_dma_mask,
> > + .coherent_dma_mask = DMA_BIT_MASK(32),
> > .platform_data = &veu_platform_data,
> > },
> > .resource = veu_resources,
> > @@ -403,6 +408,8 @@ static struct platform_device jpu_device = {
> > .name = "uio_pdrv_genirq",
> > .id = 2,
> > .dev = {
> > + .dma_mask = &jpu_device.dev.coherent_dma_mask,
> > + .coherent_dma_mask = DMA_BIT_MASK(32),
> > .platform_data = &jpu_platform_data,
> > },
> > .resource = jpu_resources,
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2018-04-17 14:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-17 14:13 [PATCH] sh: migor: Set DMA and DMA coherent mask Jacopo Mondi
2018-04-17 14:13 ` Jacopo Mondi
2018-04-17 14:30 ` Geert Uytterhoeven
2018-04-17 14:30 ` Geert Uytterhoeven
2018-04-17 14:39 ` jacopo mondi [this message]
2018-04-17 14:39 ` jacopo mondi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180417143910.GC3519@w540 \
--to=jacopo@jmondi.org \
--cc=dalias@libc.org \
--cc=geert@linux-m68k.org \
--cc=hch@lst.de \
--cc=jacopo+renesas@jmondi.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=ysato@users.sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.