lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <172071096553.2215.15804715660858922520.tip-bot2@tip-bot2>
Date: Thu, 11 Jul 2024 15:16:05 -0000
From: "tip-bot2 for Geert Uytterhoeven" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Geert Uytterhoeven <geert+renesas@...der.be>,
 Thomas Gleixner <tglx@...utronix.de>, Marc Zyngier <maz@...nel.org>,
 x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: irq/core] irqchip/gic-v3: Pass #redistributor-regions to
 gic_of_setup_kvm_info()

The following commit has been merged into the irq/core branch of tip:

Commit-ID:     1265db582c7449edee41e29068b236c474a354a0
Gitweb:        https://git.kernel.org/tip/1265db582c7449edee41e29068b236c474a354a0
Author:        Geert Uytterhoeven <geert+renesas@...der.be>
AuthorDate:    Tue, 02 Jul 2024 11:24:14 +02:00
Committer:     Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Thu, 11 Jul 2024 16:54:31 +02:00

irqchip/gic-v3: Pass #redistributor-regions to gic_of_setup_kvm_info()

The caller of gic_of_setup_kvm_info() already queried DT for the value
of the #redistributor-regions property.  So just pass this value,
instead of doing the DT look-up again in the callee.

Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Marc Zyngier <maz@...nel.org>
Link: https://lore.kernel.org/r/808286a3ac08f60585ae7e2c848e0f9b3cb79cf8.1719912215.git.geert+renesas@glider.be

---
 drivers/irqchip/irq-gic-v3.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index e4bc5f0..7c12d11 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -2190,11 +2190,10 @@ out_put_node:
 	of_node_put(parts_node);
 }
 
-static void __init gic_of_setup_kvm_info(struct device_node *node)
+static void __init gic_of_setup_kvm_info(struct device_node *node, u32 nr_redist_regions)
 {
 	int ret;
 	struct resource r;
-	u32 gicv_idx;
 
 	gic_v3_kvm_info.type = GIC_V3;
 
@@ -2202,12 +2201,8 @@ static void __init gic_of_setup_kvm_info(struct device_node *node)
 	if (!gic_v3_kvm_info.maint_irq)
 		return;
 
-	if (of_property_read_u32(node, "#redistributor-regions",
-				 &gicv_idx))
-		gicv_idx = 1;
-
-	gicv_idx += 3;	/* Also skip GICD, GICC, GICH */
-	ret = of_address_to_resource(node, gicv_idx, &r);
+	/* Also skip GICD, GICC, GICH */
+	ret = of_address_to_resource(node, nr_redist_regions + 3, &r);
 	if (!ret)
 		gic_v3_kvm_info.vcpu = r;
 
@@ -2297,7 +2292,7 @@ static int __init gic_of_init(struct device_node *node, struct device_node *pare
 	gic_populate_ppi_partitions(node);
 
 	if (static_branch_likely(&supports_deactivate_key))
-		gic_of_setup_kvm_info(node);
+		gic_of_setup_kvm_info(node, nr_redist_regions);
 	return 0;
 
 out_unmap_rdist:

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ