From patchwork Wed Mar 19 19:29:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 3861491 Return-Path: X-Original-To: patchwork-linux-arm@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 0594E9F334 for ; Wed, 19 Mar 2014 21:21:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3D4C2201FB for ; Wed, 19 Mar 2014 21:21:53 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (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 483BA201FA for ; Wed, 19 Mar 2014 21:21:52 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQMNC-0005y1-KK; Wed, 19 Mar 2014 19:42:01 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQMMH-0006Nu-F8; Wed, 19 Mar 2014 19:41:01 +0000 Received: from moutng.kundenserver.de ([212.227.17.24]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQMHX-0005zy-Sd for linux-arm-kernel@lists.infradead.org; Wed, 19 Mar 2014 19:36:13 +0000 Received: from wuerfel.lan (HSI-KBW-134-3-135-108.hsi14.kabel-badenwuerttemberg.de [134.3.135.108]) by mrelayeu.kundenserver.de (node=mreue105) with ESMTP (Nemesis) id 0Lb2eP-1Wo7Jo40Jl-00kjWB; Wed, 19 Mar 2014 20:35:46 +0100 From: Arnd Bergmann To: arm@kernel.org Subject: [PATCH 57/62] ARM: exynos: fix l2x0 saved regs handling Date: Wed, 19 Mar 2014 20:29:54 +0100 Message-Id: <1395257399-359545-58-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1395257399-359545-1-git-send-email-arnd@arndb.de> References: <1395257399-359545-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:CpaGaGAWyBiv44QBCsTxpyQZ4LbiPfcSjN8IfRcReCy 5ouKAeIfETs97k/APeDRSw/vbYL8VhkbV1TQzsKe5qQ7D6d742 9zVBMFXmKccAxq89QiHVDnwYZblX+rSXuROKBX3VRG6WtoZAUF 40xhBC1IJrclCIlD6iZn0P0gBIKEpdRilTPj9WQwy5af85pDfi uf9EFDFxwIFp9zUAOKwWFADhCY6VPYCkTOMHjnVrgzO02Dl3uV sAdByj2R4dixwccSUR2yG4kYwtP7qa9Z+7cLKzkRjeZIhyJO+W v0Xh+v1/N38l5FIyET5I+WWGBmFJteD6atLt8c34HpEQDrEZgQ 25w32ZKW2utBIDJsoKv+cV2mMC4RnZaqMlkC1QcV3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140319_153608_526644_CEE441FA X-CRM114-Status: GOOD ( 12.27 ) X-Spam-Score: -1.9 (-) Cc: Kukjin Kim , Ben Dooks , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, Tomasz Figa 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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 exynos4_l2x0_cache_init function tries to flush the data cache for the location of the saved l2x0 registers and pass the physical address to the s5p-sleep implementation. However, the s5p-sleep code is optional, and if it is disabled, we get a linker error here when the l2x0_regs_phys variable does not exist. To solve this, use a compile-time conditional to drop this code if we don't want it. Signed-off-by: Arnd Bergmann Cc: Tomasz Figa Cc: Kukjin Kim Cc: Ben Dooks Acked-by: Kukjin Kim --- arch/arm/mach-exynos/common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 025fd82..b2f9bb0 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -404,8 +404,10 @@ static int __init exynos4_l2x0_cache_init(void) if (ret) return ret; - l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs); - clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long)); + if (IS_ENABLED(CONFIG_S5P_SLEEP)) { + 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);