mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: will@kernel.org, bjorn.andersson@linaro.org
Cc: catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	stable@vger.kernel.org, broonie@kernel.org
Subject: Re: [PATCH] arm64: cpufeature: Enable Qualcomm erratas
Date: Tue, 29 Oct 2019 12:04:21 +0000	[thread overview]
Message-ID: <1d1a3dca-16ce-f541-5d78-e61ad24227e0@arm.com> (raw)
In-Reply-To: <20191029113956.GC12103@willie-the-truck>

On 10/29/2019 11:39 AM, Will Deacon wrote:
> 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.

Yes, it must be ARM64_CPUCAP_LOCAL_CPU_ERRATUM.

It may be a good idea to stick in a check to make sure that the scope is
set for all the capabilities in a separate patch. e.g,

diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index d260e3bdf07b..51a79b4a44eb 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -546,6 +546,8 @@ static void __init
  init_cpu_hwcaps_indirect_list_from_array(const struct 
arm64_cpu_capabilities *caps)
  {
  	for (; caps->matches; caps++) {
+		WARN(!cpucap_default_scope(caps),
+		     "Invalid scope for capability %d\n", caps->capability);
  		if (WARN(caps->capability >= ARM64_NCAPS,
  			"Invalid capability %d\n", caps->capability))
			continue;

Otherwise looks good to me.

>>   		.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
> 



Cheers
Suzuki

  reply	other threads:[~2019-10-29 12:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-29  6:04 Bjorn Andersson
2019-10-29  7:46 ` Ard Biesheuvel
2019-10-29 11:39 ` Will Deacon
2019-10-29 12:04   ` Suzuki K Poulose [this message]
2019-10-29 17:06     ` Bjorn Andersson
2019-10-29 17:03   ` Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1d1a3dca-16ce-f541-5d78-e61ad24227e0@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®