Re: Trouble with allocating memory on platform driver

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

 



On Fri, 17 Apr 2020 10:47:33 +0200, "s.achterop@xxxxxx" said:

>      I found a working solution. I actually don't know what I am doing but it works.
> Before the call to dma_zalloc_coherent I added:
>
>    pdev->dev.coherent_dma_mask = 0xffffffff;
DMA_BIT_MASK(32) rather than a hex constant would be a better choice.

>
> Now it works.

Note that "works" and "is correct" are two different things.  That should be
a mask that tells how many bits of the value are actually used by the hardware.
On most 32-bit systems, 32 will be correct, but there's other values in use
(on S/390, it's either 31 or 64 bits, the PowerPC can have 44, and the old PNP
stuff on x86 weirds out at the 24-bit line).

Attachment: pgpkvVV7A69ip.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