You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ARM vs ARM64 - Passing a NULL driver context to DMA functions #1619
I just wanted to bring up one more issue before I leave everyone alone for awhile.
A second major portability issue between arm32 and arm64 is passing a NULL driver to some of the various dma and memory allocation and deallocation functions. On arm32 this works fine, but for reasons I don't totally understand is broken on arm64.
Most of the upstream kernel these days do pass a driver context for better reporting and debugging. So I'm thinking this is being considered a "best practice" and being forced onto people.
Unfortunately, this can be very messy to fix in a 64 bit specific way with #ifdef since it often requires carrying around more pointers. A simple solution is to just store the pointer in a static global variable on 64 bit only since most of these drivers are have only have a single active instance. But I'm not sure that is the best way to go.
Activity
pelwell commentedon Aug 24, 2016
Is there any harm in using a valid driver context on arm32? Can you highlight some examples of where it gets tricky?
pelwell commentedon Aug 24, 2016
That's my logging code - it did the job, but I'm happy to improve it.
Let's aim to also use valid device contexts on arm32, in the least hacky way that isn't painful.