mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
arm64/sme: Don't use streaming mode to probe the maximum SME VL
[ Upstream commitfcd3d2c082] During development the architecture added the RDSVL instruction which means we do not need to enter streaming mode to enumerate the SME VLs, use it when we probe the maximum supported VL. Other users were already updated. No functional change. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20221223-arm64-sme-probe-max-v1-1-cbde68f67ad0@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Stable-dep-of:01948b09ed("arm64/fpsimd: Only provide the length to cpufeature for xCR registers") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1d9a735d4e
commit
8efd042029
@@ -1296,7 +1296,6 @@ u64 read_smcr_features(void)
|
|||||||
unsigned int vq_max;
|
unsigned int vq_max;
|
||||||
|
|
||||||
sme_kernel_enable(NULL);
|
sme_kernel_enable(NULL);
|
||||||
sme_smstart_sm();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the maximum possible VL.
|
* Set the maximum possible VL.
|
||||||
@@ -1306,11 +1305,9 @@ u64 read_smcr_features(void)
|
|||||||
|
|
||||||
smcr = read_sysreg_s(SYS_SMCR_EL1);
|
smcr = read_sysreg_s(SYS_SMCR_EL1);
|
||||||
smcr &= ~(u64)SMCR_ELx_LEN_MASK; /* Only the LEN field */
|
smcr &= ~(u64)SMCR_ELx_LEN_MASK; /* Only the LEN field */
|
||||||
vq_max = sve_vq_from_vl(sve_get_vl());
|
vq_max = sve_vq_from_vl(sme_get_vl());
|
||||||
smcr |= vq_max - 1; /* set LEN field to maximum effective value */
|
smcr |= vq_max - 1; /* set LEN field to maximum effective value */
|
||||||
|
|
||||||
sme_smstop_sm();
|
|
||||||
|
|
||||||
return smcr;
|
return smcr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user