Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed2f3e9f authored by Dave Martin's avatar Dave Martin Committed by Will Deacon
Browse files

arm64/sve: Fix a couple of magic numbers for the Z-reg count



There are some hand-written instances of "32" to express the number
of SVE Z-registers.

Since this code was written a #define was added for this, so
convert trivial instances of this magic number as appropriate.

No functional change.

Reviewed-by: default avatarJulien Grall <julien.grall@arm.com>
Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarDave Martin <Dave.Martin@arm.com>
Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent d16af870
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -412,7 +412,7 @@ static void __fpsimd_to_sve(void *sst, struct user_fpsimd_state const *fst,
	unsigned int i;
	__uint128_t *p;

	for (i = 0; i < 32; ++i) {
	for (i = 0; i < SVE_NUM_ZREGS; ++i) {
		p = (__uint128_t *)ZREG(sst, vq, i);
		*p = arm64_cpu_to_le128(fst->vregs[i]);
	}
@@ -466,7 +466,7 @@ static void sve_to_fpsimd(struct task_struct *task)
		return;

	vq = sve_vq_from_vl(task->thread.sve_vl);
	for (i = 0; i < 32; ++i) {
	for (i = 0; i < SVE_NUM_ZREGS; ++i) {
		p = (__uint128_t const *)ZREG(sst, vq, i);
		fst->vregs[i] = arm64_le128_to_cpu(*p);
	}