Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1577008

Re: [PATCH v6] arm64: Work around Falkor erratum 1003

From Christopher Covington <cov@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH v6] arm64: Work around Falkor erratum 1003
Date 2017-02-08 21:10 +0100
Message-ID <t8GIW-4OC-29@gated-at.bofh.it> (permalink)
References <t8osG-1w6-13@gated-at.bofh.it> <t8DrJ-2DS-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 02/08/2017 11:34 AM, Catalin Marinas wrote:
> On Tue, Feb 07, 2017 at 07:35:16PM -0500, Christopher Covington wrote:
>> --- a/arch/arm64/Kconfig
>> +++ b/arch/arm64/Kconfig
>> @@ -480,6 +480,18 @@ config CAVIUM_ERRATUM_27456
>>  
>>  	  If unsure, say Y.
>>  
>> +config QCOM_FALKOR_ERRATUM_1003
>> +	bool "Falkor E1003: Incorrect translation due to ASID change"
>> +	default y
>> +	select ARM64_PAN if ARM64_SW_TTBR0_PAN
>> +	help
>> +	  On Falkor v1, an incorrect ASID may be cached in the TLB when ASID
>> +	  and BADDR are changed together in TTBRx_EL1. The workaround for this
>> +	  issue is to use a reserved ASID in cpu_do_switch_mm() before
>> +	  switching to the new ASID.
>> +
>> +	  If unsure, say Y.
> 
> It would be good to have a comment here on why PAN is selected.
> 
>> --- a/arch/arm64/mm/context.c
>> +++ b/arch/arm64/mm/context.c
>> @@ -79,6 +79,13 @@ void verify_cpu_asid_bits(void)
>>  	}
>>  }
>>  
>> +static void set_reserved_asid_bits(void)
>> +{
>> +	if (IS_ENABLED(CONFIG_QCOM_FALKOR_ERRATUM_1003) &&
>> +	    cpus_have_cap(ARM64_WORKAROUND_QCOM_FALKOR_E1003))
>> +		__set_bit(FALKOR_RESERVED_ASID, asid_map);
>> +}
> 
> You should use cpus_have_const_cap() as it would be optimised using jump
> labels.

Thanks Catalin. Done in v7.

Cov

-- 
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code
Aurora Forum, a Linux Foundation Collaborative Project.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v6] arm64: Work around Falkor erratum 1003 Christopher Covington <cov@codeaurora.org> - 2017-02-08 01:40 +0100
  Re: [PATCH v6] arm64: Work around Falkor erratum 1003 Catalin Marinas <catalin.marinas@arm.com> - 2017-02-08 17:40 +0100
    Re: [PATCH v6] arm64: Work around Falkor erratum 1003 Christopher Covington <cov@codeaurora.org> - 2017-02-08 21:10 +0100

csiph-web