OpenSBI Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Zong-You Xie <ben717@andestech.com>
To: <opensbi@lists.infradead.org>
Subject: [PATCH 0/7] Fix and improve the Andes ATCSMU and LLC drivers
Date: Tue, 28 Jul 2026 16:10:34 +0800	[thread overview]
Message-ID: <20260728081041.2724668-1-ben717@andestech.com> (raw)

Fixes and cleanups for the Andes last level cache, HSM and suspend
drivers, collected while bringing up suspend to RAM on the AE350
platform.

Below is the summary of this patch set:
- Patch 1 makes andes_llcache_enable() return 0 on success, as the
  cache_enable() callback is documented to. Nothing checks it today, but
  patch 7 does.
- Patch 2 puts the SMU and LLC register regions in the root domain, so
  the supervisor can reach them under Smepmp.
- Patch 3 pairs the non-retentive CSR save and restore with an explicit
  flag instead of inferring it from the boot count and sleep type.
- Patch 4 restores those CSRs on the system-suspend resume path, which
  never reached the old call site.
- Patch 5 wakes a sleeping hart with a plain IPI and drops the SMU
  WAKEUP_CMD path.
- Patch 6 polls the secondary harts until they are really asleep instead
  of checking once.
- Patch 7 arms the SMU last and unwinds an aborted suspend rather than
  leaving the hart half configured.

Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>

Ben Zong-You Xie (7):
  lib: utils/cache: fix andes_llcache_enable() return value
  lib: utils/andes: add the SMU and LLC registers to the root domain
  platform: generic/andes: pair non-retentive CSR save/restore with a
    flag
  lib: utils/suspend: restore Andes CSRs on system-suspend resume
  lib: utils/hsm: wake sleeping Andes harts with an IPI
  lib: utils/suspend: wait for the secondary Andes harts to sleep
  lib: utils/andes: arm the SMU sleep command last

 include/sbi_utils/hsm/fdt_hsm_andes_atcsmu.h |  8 ++-
 lib/utils/cache/fdt_andes_llcache.c          | 23 +++++--
 lib/utils/hsm/fdt_hsm_andes_atcsmu.c         | 64 ++++++++----------
 lib/utils/suspend/fdt_suspend_andes_atcsmu.c | 70 ++++++++++++++------
 platform/generic/andes/ae350.c               | 26 ++++++--
 platform/generic/include/andes/andes.h       |  4 ++
 6 files changed, 129 insertions(+), 66 deletions(-)

--
2.34.1

-- 
opensbi mailing list
opensbi@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi

             reply	other threads:[~2026-07-28  8:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  8:10 Ben Zong-You Xie [this message]
2026-07-28  8:10 ` [PATCH 1/7] lib: utils/cache: fix andes_llcache_enable() return value Ben Zong-You Xie
2026-07-28  8:10 ` [PATCH 2/7] lib: utils/andes: add the SMU and LLC registers to the root domain Ben Zong-You Xie
2026-07-28  8:10 ` [PATCH 3/7] platform: generic/andes: pair non-retentive CSR save/restore with a flag Ben Zong-You Xie
2026-07-28  8:10 ` [PATCH 4/7] lib: utils/suspend: restore Andes CSRs on system-suspend resume Ben Zong-You Xie
2026-07-28  8:10 ` [PATCH 5/7] lib: utils/hsm: wake sleeping Andes harts with an IPI Ben Zong-You Xie
2026-07-28  8:10 ` [PATCH 6/7] lib: utils/suspend: wait for the secondary Andes harts to sleep Ben Zong-You Xie
2026-07-28  8:10 ` [PATCH 7/7] lib: utils/andes: arm the SMU sleep command last Ben Zong-You Xie

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=20260728081041.2724668-1-ben717@andestech.com \
    --to=ben717@andestech.com \
    --cc=opensbi@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