On Mon, 13 Mar 2023 21:28:28 +0900, "Chan Kim" said:

> which is 32-bit addressable.  Even if the device indicates (via the DMA
> mask)
> that it may address the upper 32-bits, consistent allocation will only
> return > 32-bit addresses for DMA if the consistent DMA mask has been
> explicitly changed via dma_set_coherent_mask().  This is true of the
> dma_pool interface as well.
> ------------------------------

> By context I guess it returns the address in lower 32bit address range even
> it the coherent_dma_mask is set to some bigger value.

No, you have that backwards.   It's not "even if".  It wil give you a 32-bit
address *UNLESS* the driver has called dma_set_coherent_mask() to set a wider
mask *and* the device indicates it supports more than 32 bit addresses...

Attachment: pgptUYVQP566D.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to