2022-12-18 10:00:57

by Zenghui Yu

[permalink] [raw]
Subject: [PATCH 1/2] kselftest/arm64: Remove the local NUM_VL definition

It was introduced in commit b77e995e3b96 ("kselftest/arm64: Add a test
program to exercise the syscall ABI") but never actually used. Remove it.

Signed-off-by: Zenghui Yu <[email protected]>
---
tools/testing/selftests/arm64/abi/syscall-abi.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/tools/testing/selftests/arm64/abi/syscall-abi.c b/tools/testing/selftests/arm64/abi/syscall-abi.c
index 9800f9dc6b35..24a498029c78 100644
--- a/tools/testing/selftests/arm64/abi/syscall-abi.c
+++ b/tools/testing/selftests/arm64/abi/syscall-abi.c
@@ -20,8 +20,6 @@

#include "syscall-abi.h"

-#define NUM_VL ((SVE_VQ_MAX - SVE_VQ_MIN) + 1)
-
static int default_sme_vl;

extern void do_syscall(int sve_vl, int sme_vl);
--
2.33.0


2022-12-18 10:20:13

by Zenghui Yu

[permalink] [raw]
Subject: [PATCH 2/2] kselftest/arm64: Correct buffer size for SME ZA storage

It looks like a copy-paste error to describe the ZA buffer size using (the
number of P registers * the maximum size of a Z register). This doesn't
have practical impact though as we're always allocating enough space even
for the architectural maximum ZA storage, with SVL equals to 2048 bits.

Switch to use ZA_SIG_REGS_SIZE(SVE_VQ_MAX). setup_za() will need to
initialize two 64MB arraies with this change and can be optimized later (if
someone complain).

Signed-off-by: Zenghui Yu <[email protected]>
---
tools/testing/selftests/arm64/abi/syscall-abi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/arm64/abi/syscall-abi.c b/tools/testing/selftests/arm64/abi/syscall-abi.c
index 24a498029c78..4adeb21f500e 100644
--- a/tools/testing/selftests/arm64/abi/syscall-abi.c
+++ b/tools/testing/selftests/arm64/abi/syscall-abi.c
@@ -282,8 +282,8 @@ static int check_svcr(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
return errors;
}

-uint8_t za_in[SVE_NUM_PREGS * __SVE_ZREG_SIZE(SVE_VQ_MAX)];
-uint8_t za_out[SVE_NUM_PREGS * __SVE_ZREG_SIZE(SVE_VQ_MAX)];
+uint8_t za_in[ZA_SIG_REGS_SIZE(SVE_VQ_MAX)];
+uint8_t za_out[ZA_SIG_REGS_SIZE(SVE_VQ_MAX)];

static void setup_za(struct syscall_cfg *cfg, int sve_vl, int sme_vl,
uint64_t svcr)
--
2.33.0

2022-12-19 12:08:27

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 1/2] kselftest/arm64: Remove the local NUM_VL definition

On Sun, Dec 18, 2022 at 05:29:41PM +0800, Zenghui Yu wrote:
> It was introduced in commit b77e995e3b96 ("kselftest/arm64: Add a test
> program to exercise the syscall ABI") but never actually used. Remove it.

Reviewed-by: Mark Brown <[email protected]>


Attachments:
(No filename) (260.00 B)
signature.asc (499.00 B)
Download all attachments

2022-12-19 12:18:59

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 2/2] kselftest/arm64: Correct buffer size for SME ZA storage

On Sun, Dec 18, 2022 at 05:29:42PM +0800, Zenghui Yu wrote:
> It looks like a copy-paste error to describe the ZA buffer size using (the
> number of P registers * the maximum size of a Z register). This doesn't
> have practical impact though as we're always allocating enough space even
> for the architectural maximum ZA storage, with SVL equals to 2048 bits.

Reviewed-by: Mark Brown <[email protected]>


Attachments:
(No filename) (414.00 B)
signature.asc (499.00 B)
Download all attachments

2023-01-20 18:56:08

by Catalin Marinas

[permalink] [raw]
Subject: Re: [PATCH 1/2] kselftest/arm64: Remove the local NUM_VL definition

On Sun, 18 Dec 2022 17:29:41 +0800, Zenghui Yu wrote:
> It was introduced in commit b77e995e3b96 ("kselftest/arm64: Add a test
> program to exercise the syscall ABI") but never actually used. Remove it.
>
>

Applied to arm64 (for-next/kselftest), thanks!

[1/2] kselftest/arm64: Remove the local NUM_VL definition
https://git.kernel.org/arm64/c/00598857e38f
[2/2] kselftest/arm64: Correct buffer size for SME ZA storage
https://git.kernel.org/arm64/c/daac835347a5

--
Catalin