Hi Christoph,
On Thu, May 3, 2018 at 8:51 PM, Christoph Hellwig <hch@xxxxxx> 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.
Cheers,
Michael
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html