Skip to content

Commit 5684107

Browse files
Zenghui YuMarc Zyngier
authored andcommitted
irqchip/gic-v3-its: Fix ITT_entry_size accessor
According to ARM IHI 0069C (ID070116), we should use GITS_TYPER's bits [7:4] as ITT_entry_size instead of [8:4]. Although this is pretty annoying, it only results in a potential over-allocation of memory, and nothing bad happens. Fixes: 3dfa576 ("irqchip/gic-v3-its: Add probing for VLPI properties") Signed-off-by: Zenghui Yu <yuzenghui@huawei.com> [maz: massaged subject and commit message] Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
1 parent 2380a22 commit 5684107

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/irqchip/arm-gic-v3.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@
319319
#define GITS_TYPER_PLPIS (1UL << 0)
320320
#define GITS_TYPER_VLPIS (1UL << 1)
321321
#define GITS_TYPER_ITT_ENTRY_SIZE_SHIFT 4
322-
#define GITS_TYPER_ITT_ENTRY_SIZE(r) ((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0x1f) + 1)
322+
#define GITS_TYPER_ITT_ENTRY_SIZE(r) ((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0xf) + 1)
323323
#define GITS_TYPER_IDBITS_SHIFT 8
324324
#define GITS_TYPER_DEVBITS_SHIFT 13
325325
#define GITS_TYPER_DEVBITS(r) ((((r) >> GITS_TYPER_DEVBITS_SHIFT) & 0x1f) + 1)

0 commit comments

Comments
 (0)