From patchwork Wed Jul 10 16:53:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 258163 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from casper.infradead.org (unknown [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E32E22C02AD for ; Thu, 11 Jul 2013 02:53:45 +1000 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uwxdw-0000hm-Eb; Wed, 10 Jul 2013 16:53:28 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uwxdu-0002Am-5H; Wed, 10 Jul 2013 16:53:26 +0000 Received: from mail-ve0-x22d.google.com ([2607:f8b0:400c:c01::22d]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uwxdq-0002AQ-Oy for linux-arm-kernel@lists.infradead.org; Wed, 10 Jul 2013 16:53:23 +0000 Received: by mail-ve0-f173.google.com with SMTP id jw11so6124528veb.4 for ; Wed, 10 Jul 2013 09:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Pnr/RYtsNdGNc7b4QxieJzA64d54DEo9TTuIPbmB4Xw=; b=swvlcn5B8MUCQG/sICA7V7Ws4MnyzzdMt6r5WzzeNlmC1TmmvC+8O9ZUqSMimU30W0 CBNxQA4ghiy/K4oBjnhRsl3cCZ73XyPViR6oIhea1Ap+PTzBiclg33F4wAcT1kjwiDq9 i/WeK2kOx89ceXxuHkrZjdiIcyea5+FZtg/8eO/iz9jRxWaHvggElZJtDfhm1sq8uP8G OJyGHH08bERww29bFb5TfdtgI2ruzt3r1+XpiENNJM5pMhBRZLQMvNRIdcqNWuCNmxSd Hjwsa9YbMHG3nD/SmuqiS71py4IPpvZhkcqCo0XZIEjLcIj9c6GrFP68pWlFShyhoLiA lrsw== MIME-Version: 1.0 X-Received: by 10.220.162.135 with SMTP id v7mr19522419vcx.35.1373475181253; Wed, 10 Jul 2013 09:53:01 -0700 (PDT) Received: by 10.58.237.66 with HTTP; Wed, 10 Jul 2013 09:53:01 -0700 (PDT) In-Reply-To: <20130709182046.GD516@pengutronix.de> References: <1373306318-15604-1-git-send-email-festevam@gmail.com> <1373306318-15604-3-git-send-email-festevam@gmail.com> <20130709062414.GG16656@S2101-09.ap.freescale.net> <20130709182046.GD516@pengutronix.de> Date: Wed, 10 Jul 2013 13:53:01 -0300 Message-ID: Subject: Re: [PATCH 3/3] ARM: imx: mm-imx3: Free l2x0_base From: Fabio Estevam To: Sascha Hauer X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130710_125322_904148_00C91AA8 X-CRM114-Status: GOOD ( 12.68 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (festevam[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Fabio Estevam , Shawn Guo , linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Hi Sascha, On Tue, Jul 9, 2013 at 3:20 PM, Sascha Hauer wrote: > l2x0_base is passed to l2x0_init which uses it for the outer cache > maintenance operations. I wonder this doesn't crash your kernel. l2x0_init() is called from arch/arm/mach-imx/mm-imx3.c first and then from arch/arm/mm/cache-l2x0.c later. Why do we need to call it twice? Can't we just do: /* @@ -105,14 +104,6 @@ static void __init imx3_init_l2x0(void) } else { pr_err("L2 cache: Cannot fix timing. Trying to continue without\n"); } - - l2x0_base = ioremap(MX3x_L2CC_BASE_ADDR, 4096); - if (!l2x0_base) { - printk(KERN_ERR "remapping L2 cache area failed\n"); - return; - } - - l2x0_init(l2x0_base, 0x00030024, 0x00000000); #endif } diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c index 0884ca9..94f3b4f 100644 --- a/arch/arm/mach-imx/mm-imx3.c +++ b/arch/arm/mach-imx/mm-imx3.c @@ -85,7 +85,6 @@ static void __iomem *imx3_ioremap_caller(phys_addr_t phys_addr, size_t size, static void __init imx3_init_l2x0(void) { #ifdef CONFIG_CACHE_L2X0 - void __iomem *l2x0_base; void __iomem *clkctl_base;