LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Michael Schmitz <schmitzmic@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Finn Thain <fthain@telegraphics.com.au>,
	"David S. Miller" <davem@davemloft.net>,
	linux-m68k <linux-m68k@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] macmace: Set platform device coherent_dma_mask
Date: Fri, 4 May 2018 09:24:02 +0200	[thread overview]
Message-ID: <CAMuHMdW+waQSQxLvBXEZkhCAj_kh=4SR1hZ4FAeC8YWXtRKg1A@mail.gmail.com> (raw)
In-Reply-To: <CAOmrzk+y5pmm2anaw15pch--y_gqoUO4NQemSbSanAXpEnttkg@mail.gmail.com>

Hi Michael,

On Thu, May 3, 2018 at 10:24 PM, Michael Schmitz <schmitzmic@gmail.com> wrote:
> On Thu, May 3, 2018 at 8:51 PM, Christoph Hellwig <hch@lst.de> 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

  reply	other threads:[~2018-05-04  7:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <S1751632AbeECEYA/20180503042400Z+254@vger.kernel.org>
2018-05-03  7:25 ` Geert Uytterhoeven
2018-05-03  8:38   ` Finn Thain
2018-05-03  8:46     ` Geert Uytterhoeven
2018-05-03  8:51       ` Christoph Hellwig
2018-05-03 20:24         ` Michael Schmitz
2018-05-04  7:24           ` Geert Uytterhoeven [this message]
2018-05-04  8:16             ` Michael Schmitz
2018-05-10  1:25         ` Finn Thain
2018-05-10  1:25       ` Finn Thain
2018-05-10 20:27         ` Michael Schmitz
2018-05-10 23:55           ` Finn Thain
2018-05-11  2:11             ` Michael Schmitz
2018-05-11  3:28               ` Finn Thain
2018-05-11  4:18                 ` Michael Schmitz
2018-05-11  5:28                   ` Finn Thain
2018-05-11  9:30                     ` Michael Schmitz
2018-05-11 10:06                       ` Finn Thain
2018-05-11 22:02                         ` Michael Schmitz
2018-05-03  4:23 Finn Thain

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='CAMuHMdW+waQSQxLvBXEZkhCAj_kh=4SR1hZ4FAeC8YWXtRKg1A@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=davem@davemloft.net \
    --cc=fthain@telegraphics.com.au \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=schmitzmic@gmail.com \
    --subject='Re: [PATCH net] macmace: Set platform device coherent_dma_mask' \
    /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

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).