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: 4182071 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 451E0BFF02 for ; Thu, 15 May 2014 11:40:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7B09A20251 for ; Thu, 15 May 2014 11:40:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3401E2020E for ; Thu, 15 May 2014 11:40:20 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wktxk-0007ak-CJ; Thu, 15 May 2014 11:36:36 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wktwe-0005Ov-GL for linux-arm-kernel@lists.infradead.org; Thu, 15 May 2014 11:35:29 +0000 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-arm-kernel@lists.infradead.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 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= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140515_043528_735755_AEBA81E3 X-CRM114-Status: GOOD ( 10.89 ) X-Spam-Score: -5.6 (-----) Cc: Krzysztof Kozlowski , "linux-samsung-soc@vger.kernel.org" , "arm@kernel.org" , Kevin Hilman , Bartlomiej Zolnierkiewicz , Lukasz Majewski , Daniel Lezcano , Lukasz Majewski , Kukjin Kim , 'Olof Johansson' , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,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);