Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752726AbbKUVBG (ORCPT ); Sat, 21 Nov 2015 16:01:06 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:53063 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751527AbbKUVBE convert rfc822-to-8bit (ORCPT ); Sat, 21 Nov 2015 16:01:04 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: =?ISO-8859-1?Q?M=E5ns_Rullg=E5rd?= , Stephen Boyd , linux-arm-msm@vger.kernel.org, Steven Rostedt , linux-kernel@vger.kernel.org, Nicolas Pitre Subject: Re: [RFC/PATCH 0/3] ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions Date: Sat, 21 Nov 2015 22:00:16 +0100 Message-ID: <6160413.CulAvzVaQj@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <5239BA2A-BCD9-4A8C-BC34-F48603137E08@mansr.com> References: <1448068997-26631-1-git-send-email-sboyd@codeaurora.org> <7199523.6J0A1gxY4q@wuerfel> <5239BA2A-BCD9-4A8C-BC34-F48603137E08@mansr.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" X-Provags-ID: V03:K0:eZn9/SAXuwC49yWDwevc6VjRdYuwUewNS+zlW1VPQNzm2IDWnS+ wOvhJVtBn99lQWCsUGEOgRwSokjgS+jY42viHuV174ZFgQnRRxXQi1Eu4CMo0o/sXIH/uYj UXR0cVwfAuIbKXnhxA9xU8gy9Z4DUqw3/51CtZM/m0FSM3GVBQfds59ci7TKI1JM4NCS66a edhDgrERU5//8XlDk6ijQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:Gt1LWft7sW8=:hv1Z7wdr+K3445Lf+ZCK9+ mJlCi/9Jkjh6/XM8eUFLB/glAB+EPYQeamI4aAs189QyyZaJ16gJcm0zmq5snX+rDm8yY4Tp2 cm0EhcJ49h0p5MS9RzvmCps9v1zcFPBnhMOUTHEGIZHNIWkQkqP0Sg+PRrhdtEI9taCTIAbOk tNaQ7OyIUwIrtBLCma7lrEhzuUDSSUQf3q8VpF9eoJ+p1pb3qfmexEme6zFlfesDghRW/6Hic qL5hPpLIPliMGpbqbKcThp0Pt18tVMwQON5SrzZ2MtLTn2twwtbSztvQSRiGZ3E+LuYiJJj47 b0gcszwrRnOYEkNoHwVB7I0x0ZcPwws4/oiD2gH0pbo357AYfM4/9Kc/TzNut0VU1U0Z8SaPN 0Qv7thuRcToqew0sIca2l1Nocwlc8ewhtBaiX5k4SFa9zyMRNaFY5TQHdwPb+flygqUXgv5YC z6NpYjBTMujnpWLq5ENTmEtsv/A3e5vm/GvCGzzcRe1ohuj1jg0zXMUkY+qwyNjaWn20SlctD YJ0ixmhP/yehj+wALNgk8HH+hfvKRqezI0HUt+3/WkugFMRhuZrn0pCChN96NqYA5s0bTS2PO zlLZcHswOevfJxlcIy1mFiGiiZzqcfJXY8X1LjOSOu4qCX7oM2j3NTBXClrFZPJJ7ohb8Gzub B6/swDVabQkE5KQyqlam5+AaAq29I9O1nIVtA6xtmXwXOK9qeQvedox9/i9fzaXBy0JE1mRVw JFIHu4Ak/81WXuLM Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2722 Lines: 57 On Saturday 21 November 2015 20:45:38 M?ns Rullg?rd wrote: > On 21 November 2015 20:39:58 GMT+00:00, Arnd Bergmann wrote: > >On Friday 20 November 2015 17:23:14 Stephen Boyd wrote: > >> This is a respin of a patch series from about a year ago[1]. I > >realized > >> that we already had most of the code in recordmcount to figure out > >> where we make calls to particular functions, so recording where > >> we make calls to the integer division functions should be easy enough > >> to add support for in the same codepaths. Looking back on the thread > >> it seems like Mans was thinking along the same lines, although it > >wasn't > >> obvious to me back then or even over the last few days when I wrote > >this. > > > >Shouldn't we start by allowing to build the kernel for -march=armv7ve > >on platforms that allow it? That would seem like a simpler change > >and likely generate better code for most people, except when you > >actually > >care about running the same binary kernel on older platforms. > > > >I tried to get a complete list of CPU cores with idiv, lpae and > >virtualization support at some point, but I don't remember the > >details for all Qualcomm and Marvell cores any more, to create the > >complete configuration matrix. IIRC, all CPUs that support > >virtualization also do lpae (they have to) and all CPUs that > >do lpae also do idiv, but the opposite is not true. > > > > The ARM ARM says anything with virt has idiv, lpae doesn't matter. Ok, and anything with virt also has lpae by definition. The question is whether we care about using idiv on cores that do not have lpae, or that have neither lpae nor virt. We have a related problem at the moment where we don't handle configuration of lpae correctly in Kconfig: you can simply turn that on for any ARMv7-only kernel, but it breaks running on Cortex-A8, Cortex-A9 and at least some subset of PJ4/Scorpion/Krait (not sure which). If we add a way to configure idiv support, we should do it right and handle lpae correctly too. If we are lucky, each CPU we support either has both or neither, and then we just need one additional Kconfig option. We don't need another option for virt, because KVM support can be handled in a way that it doesn't break on cores with lpae but without virt (it requires lpae). > ARMv7-R also has idiv. I've no idea if anyone runs Linux on those though. Not mainline at least. There were patches at some point, but they never got merged. 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/