APPPLIED: [SRU B][PATCH] UBUNTU: SAUCE: Move SSBS snippet from arm64_elf_hwcaps to arm64_features
William Breathitt Gray
william.gray at canonical.com
Mon Feb 8 14:19:08 UTC 2021
On Fri, Jan 22, 2021 at 01:29:25PM +0800, Ike Panhc wrote:
> BugLink: https://launchpad.net/bugs/1911376
>
> The SSBS snippet in arch/arm64/kernel/cpufeature.c shall be in
> arm64_features not in arm64_elf_hwcaps. It seems when we backport
> patch d71be2b6c0e1 ("arm64: cpufeature: Detect SSBS and advertise
> to userspace") and put it in wrong place.
>
> This problem does not affect ubuntu-focal kernel.
>
> Signed-off-by: Ike Panhc <ike.pan at canonical.com>
> ---
> arch/arm64/kernel/cpufeature.c | 26 +++++++++++++-------------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
> index 63d44403d781..cbc61d9240a9 100644
> --- a/arch/arm64/kernel/cpufeature.c
> +++ b/arch/arm64/kernel/cpufeature.c
> @@ -1194,6 +1194,19 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
> .cpu_enable = cpu_clear_disr,
> },
> #endif /* CONFIG_ARM64_RAS_EXTN */
> +#ifdef CONFIG_ARM64_SSBD
> + {
> + .desc = "Speculative Store Bypassing Safe (SSBS)",
> + .capability = ARM64_SSBS,
> + .type = ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE,
> + .matches = has_cpuid_feature,
> + .sys_reg = SYS_ID_AA64PFR1_EL1,
> + .field_pos = ID_AA64PFR1_SSBS_SHIFT,
> + .sign = FTR_UNSIGNED,
> + .min_field_value = ID_AA64PFR1_SSBS_PSTATE_ONLY,
> + .cpu_enable = cpu_enable_ssbs,
> + },
> +#endif
> {},
> };
>
> @@ -1252,19 +1265,6 @@ static const struct arm64_cpu_capabilities arm64_elf_hwcaps[] = {
> HWCAP_CAP(SYS_ID_AA64PFR1_EL1, ID_AA64PFR1_SSBS_SHIFT, FTR_UNSIGNED, ID_AA64PFR1_SSBS_PSTATE_INSNS, CAP_HWCAP, HWCAP_SSBS),
> #ifdef CONFIG_ARM64_SVE
> HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_SVE_SHIFT, FTR_UNSIGNED, ID_AA64PFR0_SVE, CAP_HWCAP, HWCAP_SVE),
> -#endif
> -#ifdef CONFIG_ARM64_SSBD
> - {
> - .desc = "Speculative Store Bypassing Safe (SSBS)",
> - .capability = ARM64_SSBS,
> - .type = ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE,
> - .matches = has_cpuid_feature,
> - .sys_reg = SYS_ID_AA64PFR1_EL1,
> - .field_pos = ID_AA64PFR1_SSBS_SHIFT,
> - .sign = FTR_UNSIGNED,
> - .min_field_value = ID_AA64PFR1_SSBS_PSTATE_ONLY,
> - .cpu_enable = cpu_enable_ssbs,
> - },
> #endif
> {},
> };
> --
> 2.25.1
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Applied to bionic:linux/master-next.
William Breathitt Gray <william.gray at canonical.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20210208/5ce66474/attachment-0001.sig>
More information about the kernel-team
mailing list