From patchwork Thu May 15 11:34:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 4181851 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EF1759F271 for ; Thu, 15 May 2014 11:35:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3674820251 for ; Thu, 15 May 2014 11:35:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D53520380 for ; Thu, 15 May 2014 11:35:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752864AbaEOLfK (ORCPT ); Thu, 15 May 2014 07:35:10 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:22673 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751967AbaEOLfG (ORCPT ); Thu, 15 May 2014 07:35:06 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N5M00KDM5IG9940@mailout2.samsung.com> for linux-samsung-soc@vger.kernel.org; Thu, 15 May 2014 20:35:04 +0900 (KST) X-AuditID: cbfee61b-b7f766d00000646c-b9-5374a667f6dd Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id D1.27.25708.766A4735; Thu, 15 May 2014 20:35:04 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N5M00BA85H2A950@mmp2.samsung.com>; Thu, 15 May 2014 20:35:03 +0900 (KST) From: Lukasz Majewski To: Arnd Bergmann Cc: Kukjin Kim , "linux-samsung-soc@vger.kernel.org" , Kevin Hilman , "arm@kernel.org" , Lukasz Majewski , "linux-arm-kernel@lists.infradead.org" , 'Olof Johansson' , Bartlomiej Zolnierkiewicz , Daniel Lezcano , Krzysztof Kozlowski , Lukasz Majewski Subject: [PATCH] FIX:cache:exynos: Execute the cache reconfiguration unconditionally for Exynos4 Date: Thu, 15 May 2014 13:34:06 +0200 Message-id: <1400153646-827-1-git-send-email-l.majewski@samsung.com> X-Mailer: git-send-email 1.7.10.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprPLMWRmVeSWpSXmKPExsVy+t9jQd2MZSXBBkvvM1kc+7KFzeLvpGPs FhtnrGe1mPdZ1uL1C0OL3gVX2Sy+Hl7BaPHmEbfFm4ebGS02Pb7GajHj/D4mi1PXP7M58Hj8 /jWJ0WPTqk42jzvX9rB5bF5S73HlRBOrx7ppb5k9+rasYvT4vEkugCOKyyYlNSezLLVI3y6B K2P2l6VsBe+4K07d+8rUwNjM1cXIySEhYCLx/9ZbRghbTOLCvfVsXYxcHEIC0xklJj5cxQaS EBLoYpJ49t4SxGYT0JP4fPcpE4gtIqAoMfXFM2aQBmaBOSwSs4+vZu1i5OAQFkiSuNMsB1LD IqAqcfTfd2YQm1fARaJl8yY2iGWKEt3PJrBNYORewMiwilE0tSC5oDgpPddIrzgxt7g0L10v OT93EyM42J5J72Bc1WBxiFGAg1GJh5dhcnGwEGtiWXFl7iFGCQ5mJRHexuklwUK8KYmVValF +fFFpTmpxYcYpTlYlMR5D7ZaBwoJpCeWpGanphakFsFkmTg4pRoYbdbGLnL5Udz0bdG1yEbr zza6xjy5q03v9exlm6V4XtDiyuwXy0smnTx7STZu4v1/eeIn2XY0tQds0ohVNpa7Yc92ePm2 YOm525I/ywVumjghVG9NU5Dm6Rs52x/4Z7P9klp85Xzft42dhTeP18ZymWsHSQheiKqTPOu6 jpGVS/CHhUbtvjtvlFiKMxINtZiLihMBsjwjjjICAAA= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The commit 2bf73dd61a84cdf27e49f48e08739af6ba70ace1 has made the cache configuration depending on definition of CONFIG_S5P_SLEEP Kconfig flag. It is enabled on various S5PV210 incarnations and not available at Exynos4 family of SoCs. The problem emerges when one wants to disable/enable core via hotplug - e.g: echo 0 > /sys/devices/system/cpu/cpu1/online. When CONFIG_CPU_IDLE is enabled (it is not enabled at default exynos_defconfig). On Exynos4 based targets (Exynos4412 and Exynos4210, namely trats2 and trats) board locks up and consumes considerable power. This patch does nothing more than restoration of the state before the offending commit. Tested on top of next-20140514 at Trats board. Signed-off-by: Lukasz Majewski --- arch/arm/mach-exynos/exynos.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 1b97b93..5c8b334 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -254,10 +254,9 @@ static int __init exynos4_l2x0_cache_init(void) if (ret) return ret; - if (IS_ENABLED(CONFIG_S5P_SLEEP)) { - l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs); - clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long)); - } + l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs); + clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long)); + return 0; } early_initcall(exynos4_l2x0_cache_init);