mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <>
To: Antony Pavlov <>,
	Sascha Hauer <>
Cc: barebox <>
Subject: Re: move dma_ops to common code
Date: Mon, 20 Jun 2022 16:52:18 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Hello Antony,

On 16.06.22 09:53, Antony Pavlov wrote:
> Hi!
> In 0e885ce81d0e ('RISC-V: dma: support multiple dma_alloc_coherent backends') ,
> (see
> multiple dma_alloc_coherent backends was introduced for RISC-V.
> At the moment MIPS dma_alloc_coherent stuff is messy and I want to rework it.
> I can reuse some parts of 0e885ce81d0e by moving it to the common code.
> Any comments or suggestions?
I have been meaning to clean this dma API stuff up, so I find it very nice
that you are going to do it :)

Currently, we have two ways to influence this:

  - dma_set_ops
  - define static inline helpers in <asm/dma.h> and #define macros, so the generic
    implementation isn't used

As first step, one could clean up the repetition in the <asm/dma.h> files, e.g.
dma_alloc_coherent is nearly identical in a couple of places. Then as next step
we could have (just example names)


     The current !PBL and/or !MMU case


     For those not using dma_set_ops


     For those using dma_set_ops

This should allows us to get rid of the macros and then each arch could just
select the appropriate symbol.

What do you think?



Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       |  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

      reply	other threads:[~2022-06-20 14:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16  7:53 Antony Pavlov
2022-06-20 14:52 ` Ahmad Fatoum [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \
    --subject='Re: move dma_ops to common code' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox