linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] irqchip/gic-v3-its: Fix probing for ITT_entry_size
@ 2019-01-31 11:19 Zenghui Yu
  2019-01-31 12:48 ` Marc Zyngier
  0 siblings, 1 reply; 3+ messages in thread
From: Zenghui Yu @ 2019-01-31 11:19 UTC (permalink / raw)
  To: marc.zyngier; +Cc: wanghaibin.wang, linux-arm-kernel, linux-kernel, Zenghui Yu

According to ARM IHI 0069C (ID070116), we should use GITS_TYPER's
bits [7:4] as ITT_entry_size.

Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
---
 include/linux/irqchip/arm-gic-v3.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h
index 071b4cb..c848a7c 100644
--- a/include/linux/irqchip/arm-gic-v3.h
+++ b/include/linux/irqchip/arm-gic-v3.h
@@ -319,7 +319,7 @@
 #define GITS_TYPER_PLPIS		(1UL << 0)
 #define GITS_TYPER_VLPIS		(1UL << 1)
 #define GITS_TYPER_ITT_ENTRY_SIZE_SHIFT	4
-#define GITS_TYPER_ITT_ENTRY_SIZE(r)	((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0x1f) + 1)
+#define GITS_TYPER_ITT_ENTRY_SIZE(r)	((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0xf) + 1)
 #define GITS_TYPER_IDBITS_SHIFT		8
 #define GITS_TYPER_DEVBITS_SHIFT	13
 #define GITS_TYPER_DEVBITS(r)		((((r) >> GITS_TYPER_DEVBITS_SHIFT) & 0x1f) + 1)
-- 
1.8.3.1



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

* Re: [PATCH] irqchip/gic-v3-its: Fix probing for ITT_entry_size
  2019-01-31 11:19 [PATCH] irqchip/gic-v3-its: Fix probing for ITT_entry_size Zenghui Yu
@ 2019-01-31 12:48 ` Marc Zyngier
  2019-01-31 13:21   ` Zenghui Yu
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Zyngier @ 2019-01-31 12:48 UTC (permalink / raw)
  To: Zenghui Yu; +Cc: wanghaibin.wang, linux-arm-kernel, linux-kernel

On 31/01/2019 11:19, Zenghui Yu wrote:
> According to ARM IHI 0069C (ID070116), we should use GITS_TYPER's
> bits [7:4] as ITT_entry_size.
> 
> Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
> ---
>  include/linux/irqchip/arm-gic-v3.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h
> index 071b4cb..c848a7c 100644
> --- a/include/linux/irqchip/arm-gic-v3.h
> +++ b/include/linux/irqchip/arm-gic-v3.h
> @@ -319,7 +319,7 @@
>  #define GITS_TYPER_PLPIS		(1UL << 0)
>  #define GITS_TYPER_VLPIS		(1UL << 1)
>  #define GITS_TYPER_ITT_ENTRY_SIZE_SHIFT	4
> -#define GITS_TYPER_ITT_ENTRY_SIZE(r)	((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0x1f) + 1)
> +#define GITS_TYPER_ITT_ENTRY_SIZE(r)	((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0xf) + 1)
>  #define GITS_TYPER_IDBITS_SHIFT		8
>  #define GITS_TYPER_DEVBITS_SHIFT	13
>  #define GITS_TYPER_DEVBITS(r)		((((r) >> GITS_TYPER_DEVBITS_SHIFT) & 0x1f) + 1)
> 

Well spotted. I've applied this as a fix after having added the relevant
Fixes: tag and massaged the commit message a bit.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

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

* Re: [PATCH] irqchip/gic-v3-its: Fix probing for ITT_entry_size
  2019-01-31 12:48 ` Marc Zyngier
@ 2019-01-31 13:21   ` Zenghui Yu
  0 siblings, 0 replies; 3+ messages in thread
From: Zenghui Yu @ 2019-01-31 13:21 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: wanghaibin.wang, linux-arm-kernel, linux-kernel



On 2019/1/31 20:48, Marc Zyngier wrote:
> On 31/01/2019 11:19, Zenghui Yu wrote:
>> According to ARM IHI 0069C (ID070116), we should use GITS_TYPER's
>> bits [7:4] as ITT_entry_size.
>>
>> Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
>> ---
>>   include/linux/irqchip/arm-gic-v3.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h
>> index 071b4cb..c848a7c 100644
>> --- a/include/linux/irqchip/arm-gic-v3.h
>> +++ b/include/linux/irqchip/arm-gic-v3.h
>> @@ -319,7 +319,7 @@
>>   #define GITS_TYPER_PLPIS		(1UL << 0)
>>   #define GITS_TYPER_VLPIS		(1UL << 1)
>>   #define GITS_TYPER_ITT_ENTRY_SIZE_SHIFT	4
>> -#define GITS_TYPER_ITT_ENTRY_SIZE(r)	((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0x1f) + 1)
>> +#define GITS_TYPER_ITT_ENTRY_SIZE(r)	((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0xf) + 1)
>>   #define GITS_TYPER_IDBITS_SHIFT		8
>>   #define GITS_TYPER_DEVBITS_SHIFT	13
>>   #define GITS_TYPER_DEVBITS(r)		((((r) >> GITS_TYPER_DEVBITS_SHIFT) & 0x1f) + 1)
>>
> 
> Well spotted. I've applied this as a fix after having added the relevant
> Fixes: tag and massaged the commit message a bit.

Thanks Marc!

Zenghui

> 
> Thanks,
> 
> 	M.
> 


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

end of thread, other threads:[~2019-01-31 13:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-31 11:19 [PATCH] irqchip/gic-v3-its: Fix probing for ITT_entry_size Zenghui Yu
2019-01-31 12:48 ` Marc Zyngier
2019-01-31 13:21   ` 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).