From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org, Peter Mamonov <pmamonov@gmail.com>,
Yann Sionneau <ysionneau@kalrayinc.com>
Subject: Re: [PATCH 1/4] sandbox: set DMA_ALIGNMENT instead of defining dma_alloc
Date: Wed, 10 Jan 2024 07:45:25 +0100 [thread overview]
Message-ID: <20240110064525.GJ1318922@pengutronix.de> (raw)
In-Reply-To: <20240108102438.1318473-1-a.fatoum@pengutronix.de>
On Mon, Jan 08, 2024 at 11:24:35AM +0100, Ahmad Fatoum wrote:
> <dma.h> will take care to define dma_alloc with DMA_ALIGNMENT as
> alignment. As 32 is the default and we for some reason, use 64 for
> sandbox, define DMA_ALIGNMENT and drop the now duplicate code.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> arch/sandbox/include/asm/dma.h | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
Applied, thanks
Sascha
>
> diff --git a/arch/sandbox/include/asm/dma.h b/arch/sandbox/include/asm/dma.h
> index ac8b408aae0b..cafbb7fe6a4c 100644
> --- a/arch/sandbox/include/asm/dma.h
> +++ b/arch/sandbox/include/asm/dma.h
> @@ -12,11 +12,7 @@
> #include <linux/string.h>
> #include <driver.h>
>
> -#define dma_alloc dma_alloc
> -static inline void *dma_alloc(size_t size)
> -{
> - return xmemalign(64, ALIGN(size, 64));
> -}
> +#define DMA_ALIGNMENT 64
>
> #define dma_alloc_coherent dma_alloc_coherent
> static inline void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle)
> --
> 2.39.2
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2024-01-10 6:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-08 10:24 Ahmad Fatoum
2024-01-08 10:24 ` [PATCH 2/4] kvx: " Ahmad Fatoum
2024-01-08 12:07 ` Yann Sionneau
2024-01-08 10:24 ` [PATCH 3/4] mips: " Ahmad Fatoum
2024-01-08 10:24 ` [PATCH 4/4] dma: don't allow override of dma_alloc/dma_free Ahmad Fatoum
2024-01-10 6:45 ` Sascha Hauer [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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240110064525.GJ1318922@pengutronix.de \
--to=sha@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=pmamonov@gmail.com \
--cc=ysionneau@kalrayinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox