Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932928AbbHZMyO (ORCPT ); Wed, 26 Aug 2015 08:54:14 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:53808 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752748AbbHZMyM (ORCPT ); Wed, 26 Aug 2015 08:54:12 -0400 From: Arnd Bergmann To: Masahiro Yamada Cc: 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 , Russell King , 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=2DK=F6nig?= , Mark Rutland Subject: Re: [PATCH 1/3] ARM: uniphier: add outer cache support Date: Wed, 26 Aug 2015 14:52:45 +0200 Message-ID: <4027826.UsiXogeDbt@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1440382692-3855-1-git-send-email-yamada.masahiro@socionext.com> <2021253.vgeYqalDfp@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:5kBiKFp5o4pFsuQ/tjgsYZiePGtJ6Gtwa9ZYsYJccYzx6bngwIF rWC2eBCBkIKRtw7U7bwrT2gWxhJZCjPASMLQzpyTcy1pJAV+fwBKiZF1tUskwpAqgoUM4iF 41Pa8W91PEKenGr2Z5EVLvTmrCI2b6+86fhJbfxJvyTG4KgRlib1d04GkEAfudUq/VDISjM YhbNBWHDGSNjZMWsRq3qQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:KL9pf7evDho=:GfDQBfAXkGVNmSNopM39Vv dLcQqLH3itBLcHFN+0+9CLdAc7wQTrwaJ86VhW9mP7bgknqy0Ljh2sp5iU1MmUN7zwRBd8Lm5 l37z2Kf1QWQ7oG21SO1aJkqbS0T6GOflZeXCApBdy8teLXeI9cxLV/LlbMsWJwIrgQ6dexn/H /TCXi9gPn0hc/rXiRDZyQsLlEmIkOUIFIVT9Dt1by6k29V38JRxGnJLxBX9nnudmHNXpIFGlE vDhFeTJbJOdtglFsLYXvq8DS3Fan7TXi4IpiCDw5iNFyMAh+ZElHjKtSAY8RG/IGXHoxCNonn nJuiH4NrvKlG0gKRfzL2LYFL0FTcLOgQ9n2ON7rLM1K8b/MiczdsmyVzlfOuQlDfxYh/xxc0U OnxgSr9ixNW9x59HcjHIA921bG3QNw0rst2Gz2bofwY7D9xqvv3uITfXxdmRWs3ldqJGQW8Do Vugrhv0aG2qSZjmKeekYBSHwIc24CoUXya282QeFGui+jFvlWdNrHruKHcfZhi3rq+fR5bCHz RTRXGWc8ojNVWce9jf7/W89JHW61a1Cmp3opWAeK+KL+YxvbpvB1bNeYghEqNHKVkfrC/9DzN I4GMSFCtl3hygmezbdD9U6NyOBP7H3RdAGjRxjrFkhje5nTzIlIcogcKnB+4PV8hvxubx4wF6 DxbIuWTx83JnKQd1Uxu83J3YLzqPpXYNhktlpDv/cDQ+YqoPds4h5v/7cVa9UjSdiRHi1T+ah WSbi0Wp7QTUHgdxP Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2561 Lines: 72 On Wednesday 26 August 2015 10:38:59 Masahiro Yamada wrote: > > 2015-08-25 4:59 GMT+09:00 Arnd Bergmann : > > On Monday 24 August 2015 11:18:10 Masahiro Yamada wrote: > Nothing. > > This outer cache is not a variant of l2x0/pl310. > It was designed only for our SoCs from scratch. Ok, I see. > > Would it make sense to at least share the > > common entry point at l2x0_of_init() so you don't need to call it from > > the platform file? > > I do not think so. > > > l2x0_of_init() checks L2X0_AUX_CTRL register, > but the cache-uniphier does not have such register, > so the boot code crashes. > > > > BTW, what makes l2x0_of_init() so special? > > Only L2x0/L310 and variants can be initialized > directly from init_IRQ(). The only thing that is special about it is that almost everyone uses it because it is often licensed together with the Cortex-A cores from ARM. There are a few variants that are closely related (tauros3 and aurora, both from Marvell. All other outer_cache implementations (feroceon, xscale, tauros2) are for older Marvell (or Intel) cores that have since been replaced with Cortex-A cores in newer products. > 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 irq init callback was already there at the time when people added code to init their outer caches. It often does not matter much where you call it, but doing it early speeds up the boot time. It would be nice to unify the cache initialization a bit further, apparently only a few older platforms still call the l2x0 init manually and we can probably all convert them to the implicit configuration in one way or another. As we now have three kinds of cache controllers (l2x0, tauros2 and uniphier) that we need to support using DT, it would be nice for generalize that init sequence a bit more. 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 with unrelated stuff. Russell probably also has some ideas on this topic, in doubt just do what he suggests. Arnd -- 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/