qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: qemu-devel@nongnu.org
Cc: Max Filippov <jcmvbkbc@gmail.com>
Subject: [PATCH 4/4] tests/tcg/xtensa: fix SR test for configs with MPU
Date: Thu, 11 Jan 2024 20:21:28 -0800	[thread overview]
Message-ID: <20240112042128.3569220-5-jcmvbkbc@gmail.com> (raw)
In-Reply-To: <20240112042128.3569220-1-jcmvbkbc@gmail.com>

- atomctl is available not only in the presence of s32c1i, but also with
  the exclusive access option
- cacheadrdis SR has the same number as cacheattr, mpuenb SR has the
  same number as rasid and mpucfg SR has the same number as dtlbcfg,
  add MPU case to the tests of these SR numbers

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 tests/tcg/xtensa/test_sr.S | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/tests/tcg/xtensa/test_sr.S b/tests/tcg/xtensa/test_sr.S
index 34441c7afff7..661ef6c66ed1 100644
--- a/tests/tcg/xtensa/test_sr.S
+++ b/tests/tcg/xtensa/test_sr.S
@@ -62,7 +62,7 @@ test_sr_mask /*acchi*/17, 0, 0
 test_sr_mask /*acclo*/16, 0, 0
 #endif
 
-#if XCHAL_HAVE_S32C1I && XCHAL_HW_VERSION >= 230000
+#if XCHAL_HAVE_S32C1I && XCHAL_HW_VERSION >= 230000 || XCHAL_HAVE_EXCLUSIVE
 test_sr atomctl, 1
 #else
 test_sr_mask /*atomctl*/99, 0, 0
@@ -74,7 +74,11 @@ test_sr br, 1
 test_sr_mask /*br*/4, 0, 0
 #endif
 
+#if XCHAL_HAVE_MPU
+test_sr cacheadrdis, 1
+#else
 test_sr_mask /*cacheattr*/98, 0, 0
+#endif
 
 #if XCHAL_HAVE_CCOUNT
 test_sr ccompare0, 1
@@ -106,6 +110,8 @@ test_sr depc, 1
 
 #if XCHAL_HAVE_PTP_MMU
 test_sr dtlbcfg, 1
+#elif XCHAL_HAVE_MPU
+test_sr_mask /*mpucfg*/92, 0, 3
 #else
 test_sr_mask /*dtlbcfg*/92, 0, 0
 #endif
@@ -205,9 +211,15 @@ test_sr ps, 1
 
 #if XCHAL_HAVE_PTP_MMU
 test_sr ptevaddr, 1
-test_sr rasid, 1
 #else
 test_sr_mask /*ptevaddr*/83, 0, 0
+#endif
+
+#if XCHAL_HAVE_PTP_MMU
+test_sr rasid, 1
+#elif XCHAL_HAVE_MPU
+test_sr mpuenb, 1
+#else
 test_sr_mask /*rasid*/90, 0, 0
 #endif
 
-- 
2.39.2



      parent reply	other threads:[~2024-01-12  4:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-12  4:21 [PATCH 0/4] target/xtensa: provide configuration with MPU Max Filippov
2024-01-12  4:21 ` [PATCH 1/4] target/xtensa: add translation for wsr.mpucfg Max Filippov
2024-01-12  4:21 ` [PATCH 2/4] target/xtensa: import sample_controller32 core Max Filippov
2024-01-12  4:21 ` [PATCH 3/4] tests/tcg/xtensa: tidy test linker script Max Filippov
2024-01-12  4:21 ` Max Filippov [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=20240112042128.3569220-5-jcmvbkbc@gmail.com \
    --to=jcmvbkbc@gmail.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).