public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
* Is __dma_direct_alloc_pages broken on s390?
@ 2019-07-18  7:17 Petr Tesarik
  2019-07-18 11:36 ` Heiko Carstens
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Tesarik @ 2019-07-18  7:17 UTC (permalink / raw)
  To: linux-s390; +Cc: Heiko Carstens, Halil Pasic

Hi all,

while looking into DMA allocation, I noticed that
__dma_direct_optimal_gfp_mask() in kernel/dma/direct.c can probably be
improved. It uses GFP_DMA if dev->coherent_dma_mask is less than
DMA_BIT_MASK(ARCH_ZONE_DMA_BITS). There is no s390-specific definition
of ARCH_ZONE_DMA_BITS. The default is 24 bits, but the DMA zone on s390
is 31 bits. CCW subchannel devices set sch->dev.coherent_dma_mask to
DMA_BIT_MASK(31), which is greater than DMA_BIT_MASK(24), so buffers
are allocated from the Normal zone first.

Would it make sense to set ARCH_ZONE_BITS to 31 on s390, or did I miss
something?

Petr T

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-07-18 14:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-18  7:17 Is __dma_direct_alloc_pages broken on s390? Petr Tesarik
2019-07-18 11:36 ` Heiko Carstens
2019-07-18 11:51   ` Petr Tesarik
2019-07-18 12:50     ` Halil Pasic
2019-07-18 13:10       ` Christoph Hellwig
2019-07-18 14:27         ` Halil Pasic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox