linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: virt: Relax GIC version check
@ 2019-02-20 11:43 Vladimir Murzin
  2019-02-20 11:43 ` [PATCH 2/2] ARM: virt: Align GIC version check with arm64 counterpart Vladimir Murzin
  2019-02-20 13:46 ` [PATCH 1/2] arm64: virt: Relax GIC version check Marc Zyngier
  0 siblings, 2 replies; 6+ messages in thread
From: Vladimir Murzin @ 2019-02-20 11:43 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: marc.zyngier

Updates to the GIC architecture allow ID_AA64PFR0_EL1.GIC to have
values other than 0 or 1. At the moment, Linux is quite strict in the
way it handles this field at early boot stage (cpufeature is fine) and
will refuse to use the system register CPU interface if it doesn't
find the value 1.

To help backports (even though the code was correct at the time of writing)
Fixes: 021f653791ad17e03f98aaa7fb933816ae16f161 ("irqchip: gic-v3: Initial support for GICv3")

Reported-by: Chase Conklin <Chase.Conklin@arm.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
 arch/arm64/kernel/head.S | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
index 15d79a8..eecf792 100644
--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -539,8 +539,7 @@ set_hcr:
 	/* GICv3 system register access */
 	mrs	x0, id_aa64pfr0_el1
 	ubfx	x0, x0, #24, #4
-	cmp	x0, #1
-	b.ne	3f
+	cbz	x0, 3f
 
 	mrs_s	x0, SYS_ICC_SRE_EL2
 	orr	x0, x0, #ICC_SRE_EL2_SRE	// Set ICC_SRE_EL2.SRE==1
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-02-20 14:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-20 11:43 [PATCH 1/2] arm64: virt: Relax GIC version check Vladimir Murzin
2019-02-20 11:43 ` [PATCH 2/2] ARM: virt: Align GIC version check with arm64 counterpart Vladimir Murzin
2019-02-20 13:50   ` Marc Zyngier
2019-02-20 14:03     ` Vladimir Murzin
2019-02-20 13:46 ` [PATCH 1/2] arm64: virt: Relax GIC version check Marc Zyngier
2019-02-20 14:13   ` Will Deacon

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).