aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/arm64/signal/testcases/ssve_regs.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/arm64/signal/testcases/ssve_regs.c')
-rw-r--r--tools/testing/selftests/arm64/signal/testcases/ssve_regs.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/tools/testing/selftests/arm64/signal/testcases/ssve_regs.c b/tools/testing/selftests/arm64/signal/testcases/ssve_regs.c
index 9022a6cab4b3..d0a178945b1a 100644
--- a/tools/testing/selftests/arm64/signal/testcases/ssve_regs.c
+++ b/tools/testing/selftests/arm64/signal/testcases/ssve_regs.c
@@ -13,7 +13,10 @@
#include "test_signals_utils.h"
#include "testcases.h"
-struct fake_sigframe sf;
+static union {
+ ucontext_t uc;
+ char buf[1024 * 64];
+} context;
static unsigned int vls[SVE_VQ_MAX];
unsigned int nvls = 0;
@@ -55,8 +58,8 @@ static void setup_ssve_regs(void)
static int do_one_sme_vl(struct tdescr *td, siginfo_t *si, ucontext_t *uc,
unsigned int vl)
{
- size_t resv_sz, offset;
- struct _aarch64_ctx *head = GET_SF_RESV_HEAD(sf);
+ size_t offset;
+ struct _aarch64_ctx *head = GET_BUF_RESV_HEAD(context);
struct sve_context *ssve;
int ret;
@@ -73,11 +76,11 @@ static int do_one_sme_vl(struct tdescr *td, siginfo_t *si, ucontext_t *uc,
* in it.
*/
setup_ssve_regs();
- if (!get_current_context(td, &sf.uc))
+ if (!get_current_context(td, &context.uc, sizeof(context)))
return 1;
- resv_sz = GET_SF_RESV_SIZE(sf);
- head = get_header(head, SVE_MAGIC, resv_sz, &offset);
+ head = get_header(head, SVE_MAGIC, GET_BUF_RESV_SIZE(context),
+ &offset);
if (!head) {
fprintf(stderr, "No SVE context\n");
return 1;
@@ -101,16 +104,6 @@ static int sme_regs(struct tdescr *td, siginfo_t *si, ucontext_t *uc)
int i;
for (i = 0; i < nvls; i++) {
- /*
- * TODO: the signal test helpers can't currently cope
- * with signal frames bigger than struct sigcontext,
- * skip VLs that will trigger that.
- */
- if (vls[i] > 64) {
- printf("Skipping VL %u due to stack size\n", vls[i]);
- continue;
- }
-
if (do_one_sme_vl(td, si, uc, vls[i]))
return 1;
}