Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdb06641 authored by Channagoud Kadabi's avatar Channagoud Kadabi Committed by Gerrit - the friendly Code Review server
Browse files

irqchip: GICv3: Check if GIC register access is controlled



Add support to configure ITS registers only if higher
exception levels have not already configured them.

Change-Id: I45eaa51e56e034d011cf41d8b924fb674f63447d
Signed-off-by: default avatarHanumant Singh <hanumant@codeaurora.org>
Signed-off-by: default avatarPuja Gupta <pujag@codeaurora.org>
Signed-off-by: default avatarAbhimanyu Kapur <abhimany@codeaurora.org>
[ckadabi: resolved merge conflict]
Signed-off-by: default avatarChannagoud Kadabi <ckadabi@codeaurora.org>
parent 0afae122
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -41,6 +41,15 @@ config ARM_GIC_V3_ITS
	depends on PCI
	depends on PCI
	depends on PCI_MSI
	depends on PCI_MSI


config ARM_GIC_V3_ACL
	bool "GICv3 Access control"
	depends on ARM_GIC_V3
	help
	  Access to GIC ITS address space is controlled by EL2.
	  Kernel has no permission to access GIC ITS address space.
	  If you wish to enforce the Acces control then set this
	  option to Y, if you are unsure please say N.

config ARM_NVIC
config ARM_NVIC
	bool
	bool
	select IRQ_DOMAIN
	select IRQ_DOMAIN
+3 −1
Original line number Original line Diff line number Diff line
@@ -533,7 +533,8 @@ static void gic_cpu_init(void)
	gic_cpu_config(rbase, gic_redist_wait_for_rwp);
	gic_cpu_config(rbase, gic_redist_wait_for_rwp);


	/* Give LPIs a spin */
	/* Give LPIs a spin */
	if (IS_ENABLED(CONFIG_ARM_GIC_V3_ITS) && gic_dist_supports_lpis())
	if (IS_ENABLED(CONFIG_ARM_GIC_V3_ITS) && gic_dist_supports_lpis() &&
					!IS_ENABLED(CONFIG_ARM_GIC_V3_ACL))
		its_cpu_init();
		its_cpu_init();


	/* initialise system registers */
	/* initialise system registers */
@@ -956,6 +957,7 @@ static int __init gic_init_bases(void __iomem *dist_base,


	node = to_of_node(handle);
	node = to_of_node(handle);
	if (IS_ENABLED(CONFIG_ARM_GIC_V3_ITS) && gic_dist_supports_lpis() &&
	if (IS_ENABLED(CONFIG_ARM_GIC_V3_ITS) && gic_dist_supports_lpis() &&
	    !IS_ENABLED(CONFIG_ARM_GIC_V3_ACL) &&
	    node) /* Temp hack to prevent ITS init for ACPI */
	    node) /* Temp hack to prevent ITS init for ACPI */
		its_init(node, &gic_data.rdists, gic_data.domain);
		its_init(node, &gic_data.rdists, gic_data.domain);