Re: returned dma address value of dma_alloc_coherent, is it always in the lower 4GB range?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: pgpBiSaA_pWc0.pgp
Description: PGP signature

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

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux