linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] irqchip: Replace compared GIC version with ID_AA64PFR0_EL1_GIC_V4P1
@ 2024-07-24  5:46 Anshuman Khandual
  2024-07-24 14:36 ` Marc Zyngier
  2024-07-25  0:49 ` Zenghui Yu
  0 siblings, 2 replies; 4+ messages in thread
From: Anshuman Khandual @ 2024-07-24  5:46 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Anshuman Khandual, Marc Zyngier, Thomas Gleixner, Catalin Marinas,
	Will Deacon, linux-kernel

Replace open encoding for GIC version code with ID_AA64PFR0_EL1_GIC_V4P1 in
gic_cpuif_has_vsgi().

Cc: Marc Zyngier <maz@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
Applies after the following patch that fixes the given field in tools sysreg.

https://lore.kernel.org/all/20240718215532.616447-1-rananta@google.com/

 drivers/irqchip/irq-gic-v4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic-v4.c b/drivers/irqchip/irq-gic-v4.c
index ca32ac19d284..58c28895f8c4 100644
--- a/drivers/irqchip/irq-gic-v4.c
+++ b/drivers/irqchip/irq-gic-v4.c
@@ -97,7 +97,7 @@ bool gic_cpuif_has_vsgi(void)
 
 	fld = cpuid_feature_extract_unsigned_field(reg, ID_AA64PFR0_EL1_GIC_SHIFT);
 
-	return fld >= 0x3;
+	return fld >= ID_AA64PFR0_EL1_GIC_V4P1;
 }
 #else
 bool gic_cpuif_has_vsgi(void)
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] irqchip: Replace compared GIC version with ID_AA64PFR0_EL1_GIC_V4P1
  2024-07-24  5:46 [PATCH] irqchip: Replace compared GIC version with ID_AA64PFR0_EL1_GIC_V4P1 Anshuman Khandual
@ 2024-07-24 14:36 ` Marc Zyngier
  2024-07-25  8:28   ` Anshuman Khandual
  2024-07-25  0:49 ` Zenghui Yu
  1 sibling, 1 reply; 4+ messages in thread
From: Marc Zyngier @ 2024-07-24 14:36 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: linux-arm-kernel, Thomas Gleixner, Catalin Marinas, Will Deacon,
	linux-kernel

On Wed, 24 Jul 2024 06:46:23 +0100,
Anshuman Khandual <anshuman.khandual@arm.com> wrote:
> 
> Replace open encoding for GIC version code with ID_AA64PFR0_EL1_GIC_V4P1 in
> gic_cpuif_has_vsgi().

Please fix the subject format to say "irqchip/gic-v4.1".

> 
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
> Applies after the following patch that fixes the given field in tools sysreg.
> 
> https://lore.kernel.org/all/20240718215532.616447-1-rananta@google.com/
> 
>  drivers/irqchip/irq-gic-v4.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/irq-gic-v4.c b/drivers/irqchip/irq-gic-v4.c
> index ca32ac19d284..58c28895f8c4 100644
> --- a/drivers/irqchip/irq-gic-v4.c
> +++ b/drivers/irqchip/irq-gic-v4.c
> @@ -97,7 +97,7 @@ bool gic_cpuif_has_vsgi(void)
>  
>  	fld = cpuid_feature_extract_unsigned_field(reg, ID_AA64PFR0_EL1_GIC_SHIFT);
>  
> -	return fld >= 0x3;
> +	return fld >= ID_AA64PFR0_EL1_GIC_V4P1;
>  }
>  #else
>  bool gic_cpuif_has_vsgi(void)

Please repost this *once* the dependent patch is actually merged, so
that we don't have to think of the dependencies.

With that:

Acked-by: Marc Zyngier <maz@kernel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] irqchip: Replace compared GIC version with ID_AA64PFR0_EL1_GIC_V4P1
  2024-07-24  5:46 [PATCH] irqchip: Replace compared GIC version with ID_AA64PFR0_EL1_GIC_V4P1 Anshuman Khandual
  2024-07-24 14:36 ` Marc Zyngier
@ 2024-07-25  0:49 ` Zenghui Yu
  1 sibling, 0 replies; 4+ messages in thread
From: Zenghui Yu @ 2024-07-25  0:49 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: linux-arm-kernel, Marc Zyngier, Thomas Gleixner, Catalin Marinas,
	Will Deacon, linux-kernel

On 2024/7/24 13:46, Anshuman Khandual wrote:
> Replace open encoding for GIC version code with ID_AA64PFR0_EL1_GIC_V4P1 in
> gic_cpuif_has_vsgi().
> 
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
> Applies after the following patch that fixes the given field in tools sysreg.
> 
> https://lore.kernel.org/all/20240718215532.616447-1-rananta@google.com/

Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] irqchip: Replace compared GIC version with ID_AA64PFR0_EL1_GIC_V4P1
  2024-07-24 14:36 ` Marc Zyngier
@ 2024-07-25  8:28   ` Anshuman Khandual
  0 siblings, 0 replies; 4+ messages in thread
From: Anshuman Khandual @ 2024-07-25  8:28 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: linux-arm-kernel, Thomas Gleixner, Catalin Marinas, Will Deacon,
	linux-kernel



On 7/24/24 20:06, Marc Zyngier wrote:
> On Wed, 24 Jul 2024 06:46:23 +0100,
> Anshuman Khandual <anshuman.khandual@arm.com> wrote:
>>
>> Replace open encoding for GIC version code with ID_AA64PFR0_EL1_GIC_V4P1 in
>> gic_cpuif_has_vsgi().
> 
> Please fix the subject format to say "irqchip/gic-v4.1".

Sure, will change as suggested.

> 
>>
>> Cc: Marc Zyngier <maz@kernel.org>
>> Cc: Thomas Gleixner <tglx@linutronix.de>
>> Cc: Catalin Marinas <catalin.marinas@arm.com>
>> Cc: Will Deacon <will@kernel.org>
>> Cc: linux-arm-kernel@lists.infradead.org
>> Cc: linux-kernel@vger.kernel.org
>> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
>> ---
>> Applies after the following patch that fixes the given field in tools sysreg.
>>
>> https://lore.kernel.org/all/20240718215532.616447-1-rananta@google.com/
>>
>>  drivers/irqchip/irq-gic-v4.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/irqchip/irq-gic-v4.c b/drivers/irqchip/irq-gic-v4.c
>> index ca32ac19d284..58c28895f8c4 100644
>> --- a/drivers/irqchip/irq-gic-v4.c
>> +++ b/drivers/irqchip/irq-gic-v4.c
>> @@ -97,7 +97,7 @@ bool gic_cpuif_has_vsgi(void)
>>  
>>  	fld = cpuid_feature_extract_unsigned_field(reg, ID_AA64PFR0_EL1_GIC_SHIFT);
>>  
>> -	return fld >= 0x3;
>> +	return fld >= ID_AA64PFR0_EL1_GIC_V4P1;
>>  }
>>  #else
>>  bool gic_cpuif_has_vsgi(void)
> 
> Please repost this *once* the dependent patch is actually merged, so
> that we don't have to think of the dependencies.

Sure, will do that.

> 
> With that:
> 
> Acked-by: Marc Zyngier <maz@kernel.org>
> 
> 	M.
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-25  8:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-24  5:46 [PATCH] irqchip: Replace compared GIC version with ID_AA64PFR0_EL1_GIC_V4P1 Anshuman Khandual
2024-07-24 14:36 ` Marc Zyngier
2024-07-25  8:28   ` Anshuman Khandual
2024-07-25  0:49 ` Zenghui Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).