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]
Date:   Mon, 14 Nov 2016 10:31:59 +0530
From:   Pankaj Dubey <pankaj.dubey@...sung.com>
To:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc:     rmk+kernel@...linux.org.uk, arnd@...db.de, horms@...ge.net.au,
        magnus.damm@...il.com, geert+renesas@...der.be, vireshk@...nel.org,
        shiraz.linux.kernel@...il.com, krzk@...nel.org,
        thomas.ab@...sung.com, Pankaj Dubey <pankaj.dubey@...sung.com>,
        Russell King <linux@...linux.org.uk>
Subject: [PATCH 04/16] ARM: realview: use generic API for enabling SCU

Now as we have of_scu_enable which takes care of mapping
scu base from DT, lets use it.

Also this patch removes computation of number of cores
from SCU, as for DT platform it will be taken care from
DT CPU device nodes.

CC: Russell King <linux@...linux.org.uk>
Signed-off-by: Pankaj Dubey <pankaj.dubey@...sung.com>
---
 arch/arm/mach-realview/platsmp-dt.c | 29 +++++++++--------------------
 1 file changed, 9 insertions(+), 20 deletions(-)

diff --git a/arch/arm/mach-realview/platsmp-dt.c b/arch/arm/mach-realview/platsmp-dt.c
index 70ca99e..b2dbf77 100644
--- a/arch/arm/mach-realview/platsmp-dt.c
+++ b/arch/arm/mach-realview/platsmp-dt.c
@@ -23,8 +23,6 @@
 
 static const struct of_device_id realview_scu_match[] = {
 	{ .compatible = "arm,arm11mp-scu", },
-	{ .compatible = "arm,cortex-a9-scu", },
-	{ .compatible = "arm,cortex-a5-scu", },
 	{ }
 };
 
@@ -41,27 +39,18 @@ static void __init realview_smp_prepare_cpus(unsigned int max_cpus)
 	struct device_node *np;
 	void __iomem *scu_base;
 	struct regmap *map;
-	unsigned int ncores;
 	int i;
 
-	np = of_find_matching_node(NULL, realview_scu_match);
-	if (!np) {
-		pr_err("PLATSMP: No SCU base address\n");
-		return;
+	if (of_scu_enable()) {
+		np = of_find_matching_node(NULL, realview_scu_match);
+		scu_base = of_iomap(np, 0);
+		of_node_put(np);
+		if (!scu_base) {
+			pr_err("PLATSMP: No SCU remap\n");
+			return;
+		}
+		scu_enable(scu_base);
 	}
-	scu_base = of_iomap(np, 0);
-	of_node_put(np);
-	if (!scu_base) {
-		pr_err("PLATSMP: No SCU remap\n");
-		return;
-	}
-
-	scu_enable(scu_base);
-	ncores = scu_get_core_count(scu_base);
-	pr_info("SCU: %d cores detected\n", ncores);
-	for (i = 0; i < ncores; i++)
-		set_cpu_possible(i, true);
-	iounmap(scu_base);
 
 	/* The syscon contains the magic SMP start address registers */
 	np = of_find_matching_node(NULL, realview_syscon_match);
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ