Received: by 10.192.165.156 with SMTP id m28csp132950imm; Tue, 17 Apr 2018 07:41:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx48rffYSW2e8Nw9PcV24IPrz4AbN+JxP/snzjEGkFlhpRPUnumTntoK+PSPmmBMav5yKZ0bo X-Received: by 10.101.102.3 with SMTP id w3mr2018259pgv.151.1523976090750; Tue, 17 Apr 2018 07:41:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523976090; cv=none; d=google.com; s=arc-20160816; b=PiuCq8Qu1Wn6FojSKZKKT8TB8SRNDo85r+NNUp6b+gbS/0Ux2LpjNxPlSmoiWKNqUB WJHI78jq23Ukj2pyk8NxvCSHOuluRPRqbxOzsDxu7C/CliIvT9hEUMCsaA7FxLFDacYI OsGFu79zYjSQBOrzr/wo0W/g9+LL+MITSm1paGAHTgDwO6TfFYA9IH2Q6qG/qQiCV3vN NIP/6Yc3FvM+Yetnjg2AB8rSQIUBoS4q86+0rMqDS8iS6I0BOslh9LU4GpiAgV9J5gzK RLIjI31RD2Z/0RcQBIDG94maOWY3a0eT0Zvqvl/Dz+DTnd08mU+ueNFyGETkXGqQqAkn muVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=ZTnsGCvE/s8/7iNxGiM6GOqFn0YDKaEiXOHb+b+zEB0=; b=gFOgb70g29ZiZz0psZ3GobDmioXGV9GQkG2o+hKSYeznhLtpAMnuKcSpduH4XiV6WX f+M0drxsF5DMGFV1BpVTguUEn5nmWUyl4t2Nw1NRm89swJzqaFXR6ZbJ0F24ZzRwo8Rb roVFJJLXSI9Kk3ZCjKYvvC5R2h51sWe1zjhEbA2Cxp9FihAzAIGYP/c0sHoJO7yUC1BU wIVSltsWU7Nx5GOk0ltZ8T54Uw4YYsMlQ2WQLv4GjQiD0nNm8MSmjofNoYSwUIuXGqHb AHQs/ilPEU6erOIekmxSFboRau9zEMn4Q3LhzKOtSQsJnFWxG6zN4002PnFyGm8cKTGI BAig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s85si13177829pfi.32.2018.04.17.07.41.17; Tue, 17 Apr 2018 07:41:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753256AbeDQOjS (ORCPT + 99 others); Tue, 17 Apr 2018 10:39:18 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:52959 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752199AbeDQOjP (ORCPT ); Tue, 17 Apr 2018 10:39:15 -0400 X-Originating-IP: 193.205.81.22 Received: from w540 (nat-wifi.sssup.it [193.205.81.22]) (Authenticated sender: jacopo@jmondi.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 006D7E0005; Tue, 17 Apr 2018 16:39:12 +0200 (CEST) Date: Tue, 17 Apr 2018 16:39:10 +0200 From: jacopo mondi To: Geert Uytterhoeven Cc: Jacopo Mondi , Christoph Hellwig , Yoshinori Sato , Rich Felker , Linux-Renesas , Linux-sh list , Linux Kernel Mailing List Subject: Re: [PATCH] sh: migor: Set DMA and DMA coherent mask Message-ID: <20180417143910.GC3519@w540> References: <1523974393-10870-1-git-send-email-jacopo+renesas@jmondi.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="96YOpH+ONegL0A3E" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --96YOpH+ONegL0A3E Content-Type: text/plain; charset=utf-8 Content-Disposition: inline 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 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 > > Thanks for your patch! > > Reviewed-by: Geert Uytterhoeven > > 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 > > #include > > #include > > #include > > @@ -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 --96YOpH+ONegL0A3E Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJa1gcOAAoJEHI0Bo8WoVY8nmYP/jkMsvdFjnqbrfEqBSi1l914 rnXw654LqET2WryDLB/VgctQGzv4NBpZ6gWSMsos5WB1S+Vp6VSyS7BOll+PIkYN +GOz0FcHb193vxKOgpqF3aO0j576C90bDyE1RUqWlLWc/vWSbN3j2OpkXBasBh9f Ov0L8v6vq6KZJKxGqsX6ED4bHUUPAdAL3HKWvgJF6dtxYwC99kZxMcxIKe/3VHvO 84I7qKlMaivBSDXBUEDZFvPPhtKXlVZT2u37BPpOBLV0h8QFjVPtWWPs87Cp18tP Ho9NNImM+SK/7lCzHgFCeSVE/RCvquFQ5NYQC4/EtUXnoq/jRIpR4ljm/Nd66391 OifPTvo7mUWcsZMKUb6VaT9SyRRZQXg6Mg3Qgi5pts5iZ7WY7zP+93IjEV05arD9 i57HwlUS4uhllGPHtLdSqkMu4F4E6Q0Q+XIZ3TAkV2tiz2YMgO5bU5w/Yy47JT1e yrqU5EC9nt0xAS7u0UaFzuoxeCHOiUGnn+LQCeRbhzaxd7+jZG1+QSal7UNjI+15 8S4ht/TBEL+ykPob2cQT4fRtzzGtrTzE2BLEYEXzwBPE14R4RslxhyRqkqvp0X21 lCoY2KFnPWJEedGrO6eVmi0r1AmNnaDPC5ce1Ey93yVxgS4VmcO954t6IXrxnMR+ NlgDgNeIoICCZ+oG1jQA =+l8n -----END PGP SIGNATURE----- --96YOpH+ONegL0A3E--