[PATCH 1/1] gic: assign last ITLine to group 1

Valentin Korenblit vkorenblit at sequans.com
Thu Mar 3 08:34:50 PST 2022


ITLinesNumber, bits [4:0] == NUM_SPIS/32

The loop is not considering the last irq line, thus
only NUM_SPIS-32 are usable in non-secure mode.

Signed-off-by: Valentin Korenblit <vkorenblit at sequans.com>
---
 common/gic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/gic.c b/common/gic.c
index 04d4289..6c3ee76 100644
--- a/common/gic.c
+++ b/common/gic.c
@@ -41,7 +41,7 @@ void gic_secure_init(void)
 		uint32_t typer = raw_readl(gicd_base + GICD_TYPER);
 
 		/* Set SPIs to Group 1 */
-		for (i = 1; i < (typer & GICD_TYPER_ITLineNumber); i++)
+		for (i = 1; i <= (typer & GICD_TYPER_ITLineNumber); i++)
 			raw_writel(~0, gicd_base + GICD_IGROUPRn + i * 4);
 
 		raw_writel(GICD_CTLR_EnableGrp0 | GICD_CTLR_EnableGrp1,
-- 
2.20.1

-- IMPORTANT NOTICE:



The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.



Thank you.




More information about the linux-arm-kernel mailing list