Received: by 10.192.165.148 with SMTP id m20csp454979imm; Fri, 4 May 2018 00:24:43 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpOpkZstD+XTnIU3QODJHXcQsBV6HSic+e1wyNbBin01QO2NWGAIoz59llur018CxNumBNE X-Received: by 2002:a63:7208:: with SMTP id n8-v6mr19310390pgc.420.1525418683510; Fri, 04 May 2018 00:24:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525418683; cv=none; d=google.com; s=arc-20160816; b=ZYxc/4F4+q0KWojyS/u40lM/aFP/P0M/kfe48yHFhhpi6nXe6o9jqdBrN2ibr/qWyZ ansKFyd9jBJIsBvCEQOfYI/mhu8uGZQNGmUQwcq3B2q+RPS/Un5waYmKyW3QC8urxAmw UAg2QW/EA509MIuT44CE2lACkJCx6+ubDsPWtWsS38BcJ6XQPHKTy5sdV8zjAsMzRAU8 tInOKMyqgEFxc2dGmJ9ePTN1kKddQVUS4xHVOpNHwfxRG0nWpzjqfNYL/5cmNyiXXOn1 xOmLXGWlWsaSKW87LE7Dj4WoLlB+1V5d/KX93n5WWMmkufeHyfR04l5GoOdS6TW/Y8wc NIoA== 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=Jgto7h+5vSO53Gx7D+TbxwxqgC1I8XwI6yKa1y8gpjA=; b=JVsua1/IenfJUDj2LAJKobE6A+RsOdELKMLFbSylhhs/amMYwdevMrml0yVbHKf+bF IrExOuDmjopWT5kdva/Vt9Df6Cb7yDwPjU+ajuci6HKaQSbaCyA5x7mHqss3auyNpfGV f/xzcAVKR9C9n/MJE52aWFTtAcvbKk6wEoFSBcSUHScoQbeFLy410ovlaRBSACC5HpCc SXXpeTtU/PQNGaeOjF4Dzj6pxFYXp2mnmTLoDoKMp6TCu0HSwiTFMAuBIdUZPSz7xgVW 7pyBdKekIk9tzW9AqIZupkhOlxkfH510+Ci6M6GX3cA6ayWmoFo6OMDE4GCkFCIpi76V MGMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=n5FyfK1L; 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 f7-v6si10782118pgc.320.2018.05.04.00.24.28; Fri, 04 May 2018 00:24:43 -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=n5FyfK1L; 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 S1751476AbeEDHYG (ORCPT + 99 others); Fri, 4 May 2018 03:24:06 -0400 Received: from mail-ua0-f196.google.com ([209.85.217.196]:42815 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751189AbeEDHYD (ORCPT ); Fri, 4 May 2018 03:24:03 -0400 Received: by mail-ua0-f196.google.com with SMTP id f3so13443997uan.9; Fri, 04 May 2018 00:24:03 -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=Jgto7h+5vSO53Gx7D+TbxwxqgC1I8XwI6yKa1y8gpjA=; b=n5FyfK1LuFWD5rtEHvioqXuiuUXjZPJJkUc8tl1/OCMquoCtPNpReCHezEIHFA2rz0 KSlQlAHBh4XcISNxS3zJMmsOEKK8TMqqA/NrB8FLVLrABlZSnZWSh2dLFkswoXnCCZ3l U+Ysk3HfYaWjDzknZS3TzwmkOSOaTwwTdhjUEumdq17MuKo+qF2AjcTLfBmrut2Ns4AU v8Jp4ZMRc62PJtRUVFjxiBWnJ8vB025SWGrlamhaeav3qJsDL73N5eaR4rHD14lkd20Y RWI8s3a2qh3wEn3icJNl8ScWHnmYCksX60P8DTq7IsailgP239WdouRm0csOdFPRAdN2 qtDg== 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=Jgto7h+5vSO53Gx7D+TbxwxqgC1I8XwI6yKa1y8gpjA=; b=lZjo1oBLT09hXYC83NBLp2M4t3FlDuzVAuSoyExaKmMXJeUQ/+5edvvGPAmoUDlbar gBW50gkrevLWEzdG9zHEUs4nkLDUGbuamRdPdYhnAHqRxzWki6BzkBtuwJFmYwx5ZgsC /mFqNNTUcEi8l2nuSsXT/d3+OgsNrss4WzzaGWALWZz+5jOm/WLTGQlPbZeasThiaCfO WIcNxJ6Hv5aIIdWE8X5TNVcpI6jwEVX+AcLGDAdwObu6M+yBCOcoqhV8kyezbOS7LoUB pFnEmIWA+BcY4+ruN6lhsKXFUAbTSsEb1NVZCwtofp0wO8wwfJGsjhTTPDAJjyWjwQ3E sOAw== X-Gm-Message-State: ALQs6tCDpBPd67EXpgg/upEiilxC9r8E2ie41lbUuB4/9f8e0S71d0EQ HPxPEBxBlFP78JjKuahwLv8Ca+bxx2hM1m3iKEI= X-Received: by 10.159.46.15 with SMTP id t15mr25246489uaj.114.1525418642547; Fri, 04 May 2018 00:24:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.122.10 with HTTP; Fri, 4 May 2018 00:24:02 -0700 (PDT) In-Reply-To: References: <20180503085120.GA14574@lst.de> From: Geert Uytterhoeven Date: Fri, 4 May 2018 09:24:02 +0200 X-Google-Sender-Auth: 9mBiBhep2sWeRF68X8upbYlV81g Message-ID: Subject: Re: [PATCH net] macmace: Set platform device coherent_dma_mask To: Michael Schmitz Cc: Christoph Hellwig , Finn Thain , "David S. Miller" , linux-m68k , netdev , 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 Michael, On Thu, May 3, 2018 at 10:24 PM, Michael Schmitz wrote: > On Thu, May 3, 2018 at 8:51 PM, Christoph Hellwig wrote: >> On Thu, May 03, 2018 at 10:46:56AM +0200, Geert Uytterhoeven wrote: >>> Perhaps you can add a new helper (platform_device_register_simple_dma()?) >>> that takes the DMA mask, too? >>> With people setting the mask to kill the WARNING splat, this may become >>> more common. >>> >>> struct platform_device_info already has a dma_mask field, but >>> platform_device_register_resndata() explicitly sets it to zero. >> >> Yes, that would be useful. The other assumption could be that >> platform devices always allow an all-0xff dma mask. > > That's not always true (Atari NCR5380 SCSI and floppy would use a 24 > bit DMA mask). We use bounce buffers allocated from a dedicated lowmem > pool there currently, and for all I know don't use the DMA API yet. > > I bet that is a rare exception though. Setting the default DMA mask > for platform devices to all-0xff and letting the few odd drivers force > a different setting seems the best way forward. I'd say that's usually a property of the platform, not of the device? So IMHO it belongs in the platform code, not in the device driver code. 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