Received: by 10.192.165.156 with SMTP id m28csp122583imm; Tue, 17 Apr 2018 07:31:54 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/f/EMWzejPFJtfrwNgMKvU3RHWpi9pdXwiJfGeQg4kerZ5xE/uyRiNx1/7ncFdfRTTNKfr X-Received: by 10.98.208.195 with SMTP id p186mr1273754pfg.250.1523975514226; Tue, 17 Apr 2018 07:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523975514; cv=none; d=google.com; s=arc-20160816; b=xJN++HOsOaiH0hZXNs4gsKmK3/OcuGhn5Y2kmASVksVKH2q25tRNfZYbTZeA+mKjks HtjAGOCVCIcnLFupQN7/nHKUHLvdGgYQC41ySoCDv/Lb4/vb6poe2w1c5gN0RwSDC1fZ xOTrpDgEstWeet+YimE2oit4tVP05EJc99SwnuoiprZIDnpG/ikYnsOBZK8uSpBxOH4g tfe0FlC6nnI/nJkTMgctBeNQGL0eJdYjAzru7TO/xk+AgiGEOcG5xK4BgvqK51Ec7W0y ooRzmSOdTyzrt7f3iDdBJsAAl8EQ86I3/E9IDOEdXnTFV+REpeMnQ7fOVjjux5BVc2DB x1+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=oEMZxkVbtuXrbY81TUJns4HaNO/02AIjcy5z337pgdA=; b=0dxEE3tRxkqvHtgIKltFTFpHgi0DSAmCD4igA+/2giSg8Jq6u1ECWcDyIaFGnj7MyG oYYb6QvcJHQwCeeFuDd9/zVfcws5/MViscu5JhPv2MJIr8hCyXVAJRTjQKXnQ/8/yKmP CK9Ht/W/wvaNszMi+lojJh2WkGliqNXAl3aSL30KomzPK+W1HXrLW+Wvhi5z1D7unfmb hob9S046xYap2RXlY/tdFRRomCulwCEEFvSOVx41z5rCr5AgAD/FyMobKfIAY0U20NDP YBlV5JNQW5iof5CCbz62gpchx/pipdLv//9uJnwvU9MYC2UATYBZmPclwB7tyzDnB3CU FzmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=W26H8ldn; 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 e38-v6si738758plb.291.2018.04.17.07.31.39; Tue, 17 Apr 2018 07:31:54 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=W26H8ldn; 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 S1752831AbeDQOaH (ORCPT + 99 others); Tue, 17 Apr 2018 10:30:07 -0400 Received: from mail-ua0-f196.google.com ([209.85.217.196]:37590 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752779AbeDQOaF (ORCPT ); Tue, 17 Apr 2018 10:30:05 -0400 Received: by mail-ua0-f196.google.com with SMTP id d3so12352909uae.4; Tue, 17 Apr 2018 07:30:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=oEMZxkVbtuXrbY81TUJns4HaNO/02AIjcy5z337pgdA=; b=W26H8ldn33gu8+Flym0x5KlekEZ90Ph1fmOugCCxFo9p9pRHXqiFtMtFb4sWE7HA8o 3eIgJigPzvIjPfTMh2kjE3w/uBItSEaOPdnT583OQ9cg4I07eMKiuvBgq6JLQclWUhJI faChh9H3Oj71x5OeXEXXHKrhL+zWLsFJjFJUg83ySFCpbch4zWMrGrPu4lwfMV+emL5e tpGZW2ykPraCQYbn6o6+wMAJ/Y0y3G96b6mMW+M3h0W/7uYcpZ7zDwETAY9BQWx3uJiq uJreXFp3z9whbFrjVHAKHSET2AvxyPM+vTUyT83U0icUqk4Wgyep/WxbKVZ0mce6s+o8 BcQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=oEMZxkVbtuXrbY81TUJns4HaNO/02AIjcy5z337pgdA=; b=C+fDSsVlHSF6yZfVy0ZguAR+xQL/5f/GfpnFY2PS2wcKUyCzOZfnNM6Z05T5RPNO2/ VfZkLpljNCStyslP4Fnkwh2rBJ8Egz70juDPPWJcGBIxfJQ2TIf0G/R9jrHwmAlFEgIF idxQG4oi56H+MsKw4wxLlfFBTSRhaXsSjfh0LoCiMc2fWmKGs2AaKVXA+y62I2rJ21zC 7JleTmHFKjt94LBzihl5v7vh1Hi7zm2R54z5X7jCzHk5T6sjjPzdjVHAL/CrRz7H18rg FVaH3XvpOSR4GzBMEaRBfnKB4tZb0LX3+AUgAFrML799JZ1DVmGqr5W1RovpoJyBnUvI dqQA== X-Gm-Message-State: ALQs6tAqFf91109ZCLz7h+sC8gIYK2se3cdqsybMI5k+WngTbhVBkxEE kWao84hS6THDBlxr3Voo9Y3sW2j8/9+coeAvxMU= X-Received: by 10.159.53.133 with SMTP id t5mr1764977uad.26.1523975404437; Tue, 17 Apr 2018 07:30:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.122.68 with HTTP; Tue, 17 Apr 2018 07:30:03 -0700 (PDT) In-Reply-To: <1523974393-10870-1-git-send-email-jacopo+renesas@jmondi.org> References: <1523974393-10870-1-git-send-email-jacopo+renesas@jmondi.org> From: Geert Uytterhoeven Date: Tue, 17 Apr 2018 16:30:03 +0200 X-Google-Sender-Auth: StLabxoYzQauCTcw-EbCEgXHdwA Message-ID: Subject: Re: [PATCH] sh: migor: Set DMA and DMA coherent mask To: Jacopo Mondi Cc: Christoph Hellwig , Yoshinori Sato , Rich Felker , Linux-Renesas , Linux-sh list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? BTW, there are plenty of other SH platforms that need similar fixes. > --- > 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