Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932374AbbBPNhF (ORCPT ); Mon, 16 Feb 2015 08:37:05 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:54807 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755671AbbBPNhC (ORCPT ); Mon, 16 Feb 2015 08:37:02 -0500 X-AuditID: cbfec7f4-b7f126d000001e9a-ea-54e1f1ea080d From: Krzysztof Kozlowski To: Russell King , Kukjin Kim , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Stephen Boyd , Kyungmin Park , Marek Szyprowski , Krzysztof Kozlowski , stable@vger.kernel.org Subject: [PATCH] ARM: EXYNOS: Don't use LDREX and STREX after disabling cache coherency Date: Mon, 16 Feb 2015 14:36:42 +0100 Message-id: <1424093802-5488-1-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrAJMWRmVeSWpSXmKPExsVy+t/xy7qvPj4MMVi+hcfi9QtDi/7Hr5kt zja9YbfY9Pgaq8XlXXPYLGac38dkcfsyr8XaI3fZLX6c6WaxWLDxEaMDl0dLcw+bx+W+XiaP Tas62Tw2L6n36NuyitHj8ya5ALYoLpuU1JzMstQifbsErozFz3wKFnBVnFy8i7GB8SpHFyMn h4SAicS8g2eZIGwxiQv31rN1MXJxCAksZZS41zKNFcLpY5K4cOk8M0gVm4CxxOblS8CqRAQ2 M0r0N+4Gq2IWOMMocbxzMiNIlbBApMT8E1tYQGwWAVWJW98/sIHYvAJuEnt+PWGH2CcncfLY ZNYJjNwLGBlWMYqmliYXFCel5xrqFSfmFpfmpesl5+duYoSE0pcdjIuPWR1iFOBgVOLh3RD2 IESINbGsuDL3EKMEB7OSCO+y9w9DhHhTEiurUovy44tKc1KLDzEycXBKNTA2l1e+3JO09vGH OWyhKj4hxplS7bl5lVMLKj8dOOvVbnYrY69YVBazjfX6hGy7oMufle9nx/08HvGv12vi+U+f q5U1Yrn3cl+6cLH0mV1CtPSRouy8nWw+/AdKpWTLY22rWFp2rGSWYltrV2oT1z1pxe9jz2I9 j3M76ujGcE2snnNNXGhVohJLcUaioRZzUXEiAH5Zz4ADAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1525 Lines: 37 During CPU shutdown the exynos_cpu_power_down() is called after disabling cache coherency and it uses LDREX and STREX instructions (by calling of_machine_is_compatible() -> kobject_get() -> kref_get()). The LDREX and STREX should not be used after disabling the cache coherency so just use soc_is_exynos(). Signed-off-by: Krzysztof Kozlowski Fixes: adc548d77c22 ("ARM: EXYNOS: Use MCPM call-backs to support S2R on exynos5420") Cc: Reported-by: Stephen Boyd --- arch/arm/mach-exynos/platsmp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 7a1ebfeeeeb8..0abb7dff73ab 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -126,8 +126,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) */ void exynos_cpu_power_down(int cpu) { - if (cpu == 0 && (of_machine_is_compatible("samsung,exynos5420") || - of_machine_is_compatible("samsung,exynos5800"))) { + if (cpu == 0 && (soc_is_exynos5420() || soc_is_exynos5800())) { /* * Bypass power down for CPU0 during suspend. Check for * the SYS_PWR_REG value to decide if we are suspending -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/