diff mbox series

arm64: cpufeature: Enable Qualcomm erratas

Message ID 20191029060432.1208859-1-bjorn.andersson@linaro.org
State New
Headers show
Series arm64: cpufeature: Enable Qualcomm erratas | expand

Commit Message

Bjorn Andersson Oct. 29, 2019, 6:04 a.m. UTC
With the introduction of 'cce360b54ce6 ("arm64: capabilities: Filter the
entries based on a given mask")' the Qualcomm erratas are no long
applied.

The result of not applying errata 1003 is that MSM8996 runs into various
RCU stalls and fails to boot most of the times.

Give both 1003 and 1009 a "type" to ensure they are not filtered out in
update_cpu_capabilities().

Fixes: cce360b54ce6 ("arm64: capabilities: Filter the entries based on a given mask")
Cc: stable@vger.kernel.org
Reported-by: Mark Brown <broonie@kernel.org>
Suggested-by: Will Deacon <will@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

---
 arch/arm64/kernel/cpu_errata.c | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.23.0

Comments

Will Deacon Oct. 29, 2019, 11:39 a.m. UTC | #1
On Mon, Oct 28, 2019 at 11:04:32PM -0700, Bjorn Andersson wrote:
> With the introduction of 'cce360b54ce6 ("arm64: capabilities: Filter the

> entries based on a given mask")' the Qualcomm erratas are no long

> applied.

> 

> The result of not applying errata 1003 is that MSM8996 runs into various

> RCU stalls and fails to boot most of the times.

> 

> Give both 1003 and 1009 a "type" to ensure they are not filtered out in

> update_cpu_capabilities().


Oh nasty. Thanks for debugging and fixing this.

> Fixes: cce360b54ce6 ("arm64: capabilities: Filter the entries based on a given mask")

> Cc: stable@vger.kernel.org

> Reported-by: Mark Brown <broonie@kernel.org>

> Suggested-by: Will Deacon <will@kernel.org>

> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> ---

>  arch/arm64/kernel/cpu_errata.c | 2 ++

>  1 file changed, 2 insertions(+)

> 

> diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c

> index df9465120e2f..cdd8df033536 100644

> --- a/arch/arm64/kernel/cpu_errata.c

> +++ b/arch/arm64/kernel/cpu_errata.c

> @@ -780,6 +780,7 @@ const struct arm64_cpu_capabilities arm64_errata[] = {

>  	{

>  		.desc = "Qualcomm Technologies Falkor/Kryo erratum 1003",

>  		.capability = ARM64_WORKAROUND_QCOM_FALKOR_E1003,

> +		.type = ARM64_CPUCAP_SCOPE_LOCAL_CPU,

>  		.matches = cpucap_multi_entry_cap_matches,


This should probably be ARM64_CPUCAP_LOCAL_CPU_ERRATUM instead, but I'll
want Suzuki's ack before I take the change.

>  		.match_list = qcom_erratum_1003_list,

>  	},

> @@ -788,6 +789,7 @@ const struct arm64_cpu_capabilities arm64_errata[] = {

>  	{

>  		.desc = "Qualcomm erratum 1009, ARM erratum 1286807",

>  		.capability = ARM64_WORKAROUND_REPEAT_TLBI,

> +		.type = ARM64_CPUCAP_SCOPE_LOCAL_CPU,

>  		ERRATA_MIDR_RANGE_LIST(arm64_repeat_tlbi_cpus),


ERRATA_MIDR_RANGE_LIST sets the type already, so I think this is redundant.

Will
diff mbox series

Patch

diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c
index df9465120e2f..cdd8df033536 100644
--- a/arch/arm64/kernel/cpu_errata.c
+++ b/arch/arm64/kernel/cpu_errata.c
@@ -780,6 +780,7 @@  const struct arm64_cpu_capabilities arm64_errata[] = {
 	{
 		.desc = "Qualcomm Technologies Falkor/Kryo erratum 1003",
 		.capability = ARM64_WORKAROUND_QCOM_FALKOR_E1003,
+		.type = ARM64_CPUCAP_SCOPE_LOCAL_CPU,
 		.matches = cpucap_multi_entry_cap_matches,
 		.match_list = qcom_erratum_1003_list,
 	},
@@ -788,6 +789,7 @@  const struct arm64_cpu_capabilities arm64_errata[] = {
 	{
 		.desc = "Qualcomm erratum 1009, ARM erratum 1286807",
 		.capability = ARM64_WORKAROUND_REPEAT_TLBI,
+		.type = ARM64_CPUCAP_SCOPE_LOCAL_CPU,
 		ERRATA_MIDR_RANGE_LIST(arm64_repeat_tlbi_cpus),
 	},
 #endif