From patchwork Mon Dec 26 02:17:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 133204 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7396BB6FF7 for ; Mon, 26 Dec 2011 13:06:57 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Rezuw-0006VO-7p; Mon, 26 Dec 2011 02:03:58 +0000 Received: from tx2ehsobe003.messaging.microsoft.com ([65.55.88.13] helo=TX2EHSOBE005.bigfish.com) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Rezut-0006V4-Fz for linux-arm-kernel@lists.infradead.org; Mon, 26 Dec 2011 02:03:56 +0000 Received: from mail115-tx2-R.bigfish.com (10.9.14.254) by TX2EHSOBE005.bigfish.com (10.9.40.25) with Microsoft SMTP Server id 14.1.225.23; Mon, 26 Dec 2011 02:03:37 +0000 Received: from mail115-tx2 (localhost [127.0.0.1]) by mail115-tx2-R.bigfish.com (Postfix) with ESMTP id 11CF47002F7; Mon, 26 Dec 2011 02:03:22 +0000 (UTC) X-SpamScore: -11 X-BigFish: VS-11(z6c9Mcb8kzc89bh1432N98dKzz1202hzz8275dhz2dh2a8h668h839h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail115-tx2 (localhost.localdomain [127.0.0.1]) by mail115-tx2 (MessageSwitch) id 1324865001726098_14667; Mon, 26 Dec 2011 02:03:21 +0000 (UTC) Received: from TX2EHSMHS026.bigfish.com (unknown [10.9.14.242]) by mail115-tx2.bigfish.com (Postfix) with ESMTP id A31AFC0019; Mon, 26 Dec 2011 02:03:21 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS026.bigfish.com (10.9.99.126) with Microsoft SMTP Server (TLS) id 14.1.225.23; Mon, 26 Dec 2011 02:03:36 +0000 Received: from az33smr02.freescale.net (10.64.34.200) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server id 14.1.355.3; Sun, 25 Dec 2011 20:03:53 -0600 Received: from S2100-06.ap.freescale.net (S2100-06.ap.freescale.net [10.192.242.125]) by az33smr02.freescale.net (8.13.1/8.13.0) with ESMTP id pBQ23o13013634; Sun, 25 Dec 2011 20:03:51 -0600 (CST) Date: Mon, 26 Dec 2011 10:17:28 +0800 From: Shawn Guo To: Eric Miao Subject: Re: [PATCH] ARM: imx6q: resume PL310 only when CACHE_L2X0 defined Message-ID: <20111226021727.GN8240@S2100-06.ap.freescale.net> References: <1324526101-7140-1-git-send-email-eric.miao@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1324526101-7140-1-git-send-email-eric.miao@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginatorOrg: freescale.com X-Spam-Note: CRM114 invocation failed X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [65.55.88.13 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Shawn Guo , linux-arm-kernel , Lothar =?iso-8859-1?Q?Wa=DFmann?= X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org On Thu, Dec 22, 2011 at 11:55:01AM +0800, Eric Miao wrote: > Original patch from Lothar Waßmann, this patch fixes a building error > when CONFIG_CACHE_L2X0 is not defined. > > Cc: Lothar Waßmann > Cc: Shawn Guo > Signed-off-by: Eric Miao > --- > arch/arm/mach-imx/head-v7.S | 13 +++++++++---- > 1 files changed, 9 insertions(+), 4 deletions(-) > > diff --git a/arch/arm/mach-imx/head-v7.S b/arch/arm/mach-imx/head-v7.S > index a59cae7..cec23a8 100644 > --- a/arch/arm/mach-imx/head-v7.S > +++ b/arch/arm/mach-imx/head-v7.S > @@ -80,6 +80,7 @@ ENDPROC(v7_secondary_startup) > .data > .align > > +#ifdef CONFIG_CACHE_L2X0 > .macro pl310_resume > ldr r2, phys_l2x0_saved_regs > ldr r0, [r2, #L2X0_R_PHY_BASE] @ get physical base of l2x0 > @@ -89,13 +90,17 @@ ENDPROC(v7_secondary_startup) > str r1, [r0, #L2X0_CTRL] @ re-enable L2 > .endm > > + .globl phys_l2x0_saved_regs > +phys_l2x0_saved_regs: > + .long 0 > +#else > + .macro pl310_resume > + .endm > +#endif > + > ENTRY(v7_cpu_resume) > bl v7_invalidate_l1 > pl310_resume > b cpu_resume > ENDPROC(v7_cpu_resume) > - > - .globl phys_l2x0_saved_regs > -phys_l2x0_saved_regs: > - .long 0 > #endif > -- > 1.7.5.4 > The following change on pm-imx6q.c needs to amended, otherwise we will see LD .tmp_vmlinux1 arch/arm/mach-imx/built-in.o: In function `imx6q_pm_init': arch/arm/mach-imx/pm-imx6q.c:70: undefined reference to `phys_l2x0_saved_regs' arch/arm/mach-imx/pm-imx6q.c:70: undefined reference to `l2x0_saved_regs' I fixed it up and queued for 3.3. Thanks. Regards, Shawn 8<---- diff --git a/arch/arm/mach-imx/pm-imx6q.c b/arch/arm/mach-imx/pm-imx6q.c index f20f191..f7b0c2b 100644 --- a/arch/arm/mach-imx/pm-imx6q.c +++ b/arch/arm/mach-imx/pm-imx6q.c @@ -64,7 +64,9 @@ void __init imx6q_pm_init(void) * address of the data structure used by l2x0 core to save registers, * and later restore the necessary ones in imx6q resume entry. */ +#ifdef CONFIG_CACHE_L2X0 phys_l2x0_saved_regs = __pa(&l2x0_saved_regs); +#endif suspend_set_ops(&imx6q_pm_ops); }