mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@barebox.org>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] mem: add flush callback to sync caches for execution
Date: Tue, 14 Apr 2026 08:31:02 +0200	[thread overview]
Message-ID: <ad3fJpN3kBt-WN7X@pengutronix.de> (raw)
In-Reply-To: <20260413102812.1481805-1-a.fatoum@barebox.org>

On Mon, Apr 13, 2026 at 12:28:12PM +0200, Ahmad Fatoum wrote:
> barebox always calls sync_caches_for_execution() on boot, but it can be
> useful to trigger it manually when testing:
> 
> - memcpy -s /dev/zero -d /dev/mem 0 $TFA_REGION_BASE $TFA_REGION_SIZE
> - sync /dev/mem # flush D$ and invalidate I$
> - smc -i        # check if PSCI monitor is still usable
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
> ---
>  drivers/misc/mem.c | 8 ++++++++
>  1 file changed, 8 insertions(+)

Reverted this one. It breaks compilation on riscv:

In file included from drivers/misc/mem.c:9:
arch/riscv/include/asm/cache.h: In function 'local_flush_icache_all':
arch/riscv/include/asm/cache.h:25:9: error: implicit declaration of function 'riscv_vendor_id' [-Werror=implicit-function-declaration]
   25 |  switch(riscv_vendor_id()) {

And PowerPC:

powerpc-603e-linux-gnu-ld: drivers/misc/mem.o: in function `mem_flush':
drivers/misc/mem.c:13:(.text.mem_flush+0xc): undefined reference to `sync_caches_for_execution'
make[1]: *** [Makefile:1099: barebox] Error 1

Sascha

-- 
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 |



      parent reply	other threads:[~2026-04-14  6:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-13 10:28 Ahmad Fatoum
2026-04-13 11:24 ` Sascha Hauer
2026-04-14  6:31 ` 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=ad3fJpN3kBt-WN7X@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=a.fatoum@barebox.org \
    --cc=barebox@lists.infradead.org \
    /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