Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752056AbbH1Jot (ORCPT ); Fri, 28 Aug 2015 05:44:49 -0400 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:34437 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751356AbbH1Jor (ORCPT ); Fri, 28 Aug 2015 05:44:47 -0400 Date: Fri, 28 Aug 2015 10:44:13 +0100 From: Russell King - ARM Linux To: Arnd Bergmann Cc: Masahiro Yamada , arm@kernel.org, Jiri Slaby , Linus Walleij , Kumar Gala , Jungseung Lee , Ian Campbell , Rob Herring , Tejun Heo , Pawel Moll , Florian Fainelli , Maxime Coquelin , Andrew Morton , devicetree@vger.kernel.org, Mauro Carvalho Chehab , linux-arm-kernel , Nathan Lynch , Kees Cook , Paul Bolle , Greg KH , Linux Kernel Mailing List , "David S. Miller" , Joe Perches , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Mark Rutland Subject: Re: [PATCH 1/3] ARM: uniphier: add outer cache support Message-ID: <20150828094412.GH21084@n2100.arm.linux.org.uk> References: <1440382692-3855-1-git-send-email-yamada.masahiro@socionext.com> <2021253.vgeYqalDfp@wuerfel> <4027826.UsiXogeDbt@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4027826.UsiXogeDbt@wuerfel> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2120 Lines: 49 On Wed, Aug 26, 2015 at 02:52:45PM +0200, Arnd Bergmann wrote: > On Wednesday 26 August 2015 10:38:59 Masahiro Yamada wrote: > > Moreover, outer-cache init seems to be unrelated to > > IRQ init. > > Agreed, this is also just a historic artifact, as we don't really > have a place to put cache controller initialization, and the Arnd, I'm afraid you're completely wrong there. It's not a historic artifact by any of the kind. I explicitly placed the L2 cache initialisation there based upon which callbacks into architecture code were available from init/main.c and where in the initialisation sequence I wanted the L2 cache to be initialised _for_ _everyone_. That being, before SMP is brought up, preferably before the delay loop calibration (so we don't calibrate the loop without the L2 cache, and then invalidate that calibration when we enable the cache), but sufficiently late that various services that the L2 cache code wants (like kmalloc) have been initialised. That rules out setup_arch(), leaving trap_init(), init_IRQ(), time_init() and late_time_init(). I chose init_IRQ() out of that lot because it seemed to be a sensible point to initialise it, though trap_init() looks like it could have been another good site. All L2 caches should be initialised at a similar point IMHO - not only does this give us a more consistent initialisation sequence, but it avoids issues such as the one I mention above with delay loop calibration being wrong. > A first step would be to add the tauros2 and uniphier outer cache > init to the init_IRQ() function, and then have another patch > that moves all the outercache initialization into a new place > like arch/arm/mm/outercache.c so we don't clutter up irq.c arch/arm/mm/l2c-common.c > with unrelated stuff. -- FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/