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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1372210231-22900-1-git-send-email-olof@lixom.net>
Date:	Tue, 25 Jun 2013 18:30:31 -0700
From:	Olof Johansson <olof@...om.net>
To:	Linus Walleij <linus.walleij@...aro.org>
Cc:	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Olof Johansson <olof@...om.net>
Subject: [PATCH] ARM: ux500: check platform in ux500_l2x0_init

Add compatible checks for ux500. This should probably be moved to generic
DT-based probing whenever DT is populated instead, but until then at
least don't panic all non-ux500 multiplatform machines.

Signed-off-by: Olof Johansson <olof@...om.net>
---

Linus, I'll apply this directly if you ack it, let me know.


-Olof

 arch/arm/mach-ux500/cache-l2x0.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c
index f58615b..3facc1e 100644
--- a/arch/arm/mach-ux500/cache-l2x0.c
+++ b/arch/arm/mach-ux500/cache-l2x0.c
@@ -39,6 +39,15 @@ static int __init ux500_l2x0_init(void)
 {
 	u32 aux_val = 0x3e000000;
 
+	/* Ick. I wish there was a single compatible value to compare for,
+	 * but there isn't.
+	 */
+	if (!of_machine_is_compatible("st-ericsson,u8500") &&
+	    !of_machine_is_compatible("st-ericsson,u8540") &&
+	    !of_machine_is_compatible("st-ericsson,u9500") &&
+	    !of_machine_is_compatible("st-ericsson,u8540"))
+		return -ENODEV;
+
 	if (cpu_is_u8500_family() || cpu_is_ux540_family())
 		l2x0_base = __io_address(U8500_L2CC_BASE);
 	else
-- 
1.8.1.192.gc4361b8

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ