Skip to content

ARM vs ARM64 - Passing a NULL driver context to DMA functions #1619

Closed

Description

Hi,

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

  1. pelwell commented on Aug 24, 2016

    @pelwell
    Contributor

    Is there any harm in using a valid driver context on arm32? Can you highlight some examples of where it gets tricky?

  2. pelwell commented on Aug 24, 2016

    @pelwell
    Contributor

    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.

  3. ghost closed this as completedon Aug 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions