public inbox for kvmarm@lists.cs.columbia.edu
 help / color / mirror / Atom feed
From: Suzuki K Poulose <Suzuki.Poulose@arm.com>
To: Catalin Marinas <catalin.marinas@arm.com>,
	James Morse <james.morse@arm.com>
Cc: Jonathan.Zhang@cavium.com, Marc Zyngier <marc.zyngier@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	Dongjiu Geng <gengdongjiu@huawei.com>,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v6 01/13] arm64: cpufeature: __this_cpu_has_cap() shouldn't stop early
Date: Tue, 16 Jan 2018 15:09:20 +0000	[thread overview]
Message-ID: <c7f9ff6c-252f-17fc-7642-e32181181487@arm.com> (raw)
In-Reply-To: <20180116150430.rlbw6qxb7v465gcv@armageddon.cambridge.arm.com>

On 16/01/18 15:04, Catalin Marinas wrote:
> On Mon, Jan 15, 2018 at 07:38:54PM +0000, James Morse wrote:
>> diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
>> index 9ef84d0def9a..d88cd0e88606 100644
>> --- a/arch/arm64/kernel/cpufeature.c
>> +++ b/arch/arm64/kernel/cpufeature.c
>> @@ -1303,8 +1303,8 @@ static bool __this_cpu_has_cap(const struct arm64_cpu_capabilities *cap_array,
>>   	if (WARN_ON(preemptible()))
>>   		return false;
>>   
>> -	for (caps = cap_array; caps->desc; caps++)
>> -		if (caps->capability == cap && caps->matches)
>> +	for (caps = cap_array; caps->matches; caps++)
>> +		if (caps->capability == cap)
>>   			return caps->matches(caps, SCOPE_LOCAL_CPU);
>>   
>>   	return false;
> 
> Just to make sure I applied this correctly on top of for-next/core:
> 
> diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
> index a11311397430..630a40ec1332 100644
> --- a/arch/arm64/kernel/cpufeature.c
> +++ b/arch/arm64/kernel/cpufeature.c
> @@ -1149,9 +1149,8 @@ static bool __this_cpu_has_cap(const struct arm64_cpu_capabilities *cap_array,
>   	if (WARN_ON(preemptible()))
>   		return false;
>   
> -	for (caps = cap_array; caps->desc; caps++)
> +	for (caps = cap_array; caps->matches; caps++)
>   		if (caps->capability == cap &&
> -		    caps->matches &&
>   		    caps->matches(caps, SCOPE_LOCAL_CPU))
>   			return true;
>   	return false;
> 

Looks correct to me.

Thanks
Suzuki

  reply	other threads:[~2018-01-16 15:04 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15 19:38 [PATCH v6 00/13] arm64/KVM: RAS & IESB for firmware first support James Morse
2018-01-15 19:38 ` [PATCH v6 01/13] arm64: cpufeature: __this_cpu_has_cap() shouldn't stop early James Morse
2018-01-16  9:51   ` Marc Zyngier
2018-01-16 15:04   ` Catalin Marinas
2018-01-16 15:09     ` Suzuki K Poulose [this message]
2018-01-15 19:38 ` [PATCH v6 02/13] arm64: sysreg: Move to use definitions for all the SCTLR bits James Morse
2018-01-15 19:38 ` [PATCH v6 03/13] arm64: cpufeature: Detect CPU RAS Extentions James Morse
2018-01-16 10:26   ` Suzuki K Poulose
2018-01-16 11:17   ` gengdongjiu
2018-01-22 19:32     ` James Morse
2018-01-23  9:06       ` gengdongjiu
2018-01-23 19:05         ` James Morse
2018-01-25  8:27           ` gengdongjiu
2018-01-15 19:38 ` [PATCH v6 04/13] arm64: kernel: Survive corrected RAS errors notified by SError James Morse
2018-01-15 19:38 ` [PATCH v6 05/13] arm64: Unconditionally enable IESB on exception entry/return for firmware-first James Morse
2018-01-16  9:55   ` Marc Zyngier
2018-01-15 19:38 ` [PATCH v6 06/13] arm64: kernel: Prepare for a DISR user James Morse
2018-01-16 11:11   ` Suzuki K Poulose
2018-01-15 19:39 ` [PATCH v6 07/13] KVM: arm/arm64: mask/unmask daif around VHE guests James Morse
2018-01-16 10:01   ` Marc Zyngier
2018-01-15 19:39 ` [PATCH v6 08/13] KVM: arm64: Set an impdef ESR for Virtual-SError using VSESR_EL2 James Morse
2018-01-16 10:05   ` Marc Zyngier
2018-01-15 19:39 ` [PATCH v6 09/13] KVM: arm64: Save/Restore guest DISR_EL1 James Morse
2018-01-15 19:39 ` [PATCH v6 10/13] KVM: arm64: Save ESR_EL2 on guest SError James Morse
2018-01-16  9:41   ` Marc Zyngier
2018-01-15 19:39 ` [PATCH v6 11/13] KVM: arm64: Handle RAS SErrors from EL1 on guest exit James Morse
2018-01-16  9:29   ` Marc Zyngier
2018-01-19 19:20   ` Christoffer Dall
2018-01-22 18:18     ` James Morse
2018-01-23 15:32       ` Christoffer Dall
2018-01-30 19:18         ` James Morse
2018-01-15 19:39 ` [PATCH v6 12/13] KVM: arm64: Handle RAS SErrors from EL2 " James Morse
2018-01-16  9:36   ` Marc Zyngier
2018-01-19 19:54   ` Christoffer Dall
2018-01-15 19:39 ` [PATCH v6 13/13] KVM: arm64: Emulate RAS error registers and set HCR_EL2's TERR & TEA James Morse
2018-01-16 17:36 ` [PATCH v6 00/13] arm64/KVM: RAS & IESB for firmware first support Catalin Marinas

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=c7f9ff6c-252f-17fc-7642-e32181181487@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=Jonathan.Zhang@cavium.com \
    --cc=catalin.marinas@arm.com \
    --cc=gengdongjiu@huawei.com \
    --cc=james.morse@arm.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=marc.zyngier@arm.com \
    --cc=will.deacon@arm.com \
    /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