From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935881AbcIWMMn (ORCPT ); Fri, 23 Sep 2016 08:12:43 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:59849 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933685AbcIWMMl (ORCPT ); Fri, 23 Sep 2016 08:12:41 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Alison Wang , shawnguo@kernel.org, kernel@pengutronix.de, fabio.estevam@nxp.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, scott.wood@nxp.com, stuart.yoder@nxp.com, leoyang.li@nxp.com, jason.jin@nxp.com Subject: Re: [PATCH 1/2] armv8: aarch32: Execute 32-bit Linux for LayerScape platforms Date: Fri, 23 Sep 2016 14:11:43 +0200 Message-ID: <12411518.Vrka20sV4r@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <1474597146-33312-1-git-send-email-b18965@freescale.com> References: <1474597146-33312-1-git-send-email-b18965@freescale.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:IHFpqwUl2Wqma6dQC+JixwRGYC3rPxxnU3ceojDccynq1gFKPJB tYUEPZZUiu/Au3qY0kmQ4RJafCahneTsaiLcUVNAiSsaVU9R2YCa7oJdU2R6clyiDCllFWb s9Xjz7S1WYF6zkkI/WgWWP7N5LMVRkFRRhiWlP9dDvDPqpcOhKPoFQxpbVlc44+94zshZAa SwXOyAydN91DuIQk4vGqw== X-UI-Out-Filterresults: notjunk:1;V01:K0:huAnG3k5krs=:UPcpE8MLdacsK8HcgFFu+E kurD1iNjKxVqXXtoVSFdJT44/0838hJYBf3vyJmvS0heVGW9ziIUGy+HZFUwC+gwrB+UrdPhI AhOn5viH0ue3R9Khr8bSrR3aJnvBi1swGdCEg6DlCaIL8U7hKgfnzSc9ZND65GqdpmQde4IjH O0T+GM0PYayfAX/CUzvKmaBKkBLsi4GucE5D8HFA2dPKEDzvPasQXhpu2G+szc8fMofJdb+mT TRy4DWui4CYuWJ3QINKivy6XPbth9jWlTkCW8My5khQ94oDuY/hBn7nQq7MWLY36myq6xA+rj USaLo+BnsX685MhYaAqHQVPd7Bw3HgQXHRO2HIOjnw+n/A+3D1FWXHlyAAZHzynCvgIG8Pnkk SW4YbdsnlPHHmh9huX5YcbFPi4p91IkzjzOKs5A7SKndiSudH3hLbJnjjkTH09Sgl3CvjCbRx avhMQZNV/qLYsSszTxKcEjEpPCaDn2xMVQPcXocoCqKB8YC45oaiaN9vQ3L2m9Sv2rV1PwLfw iBq8ZeZnaeLr+9HG5yzAoCGWuqPAzjOpDLL1mATf6XVbfqXQUW0hdko4vd8FAbnP095ACsmjb iGxCB2ESdvoFIwZrbfWGZRF3etC1/8xtcx7a8jYJozO7tz4LTAqdo9vkDydtglBq+fH+HRm9J pks+YbLjU+cxbkk3EJN2oOQM7ZK9gjTH3gyX4iMUk7Y/8xQ== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, September 23, 2016 10:19:05 AM CEST Alison Wang wrote: > The ARMv8 architecture supports: > 1. 64-bit execution state, AArch64. > 2. 32-bit execution state, AArch32, that is compatible with previous > versions of the ARM architecture. > > LayerScape platforms are compliant with ARMv8 architecture. This patch > is to support running 32-bit Linux kernel for LayerScape platforms. > > Verified on LayerScape LS1043ARDB, LS1012ARDB, LS1046ARDB boards. > > Signed-off-by: Ebony Zhu > Signed-off-by: Alison Wang I'm not too happy about adding random 64-bit platforms in arch/arm/. We have done this twice already (ARCH_VIRT and ARCH_BCM2835), which are both platforms that can come with ARMv6, ARMv7 or ARMv8 cores and are otherwise almost identical. However, there are two problem I see with the general approach: a) We don't actually support ARMv8 as a target architecture, in fact we don't even support ARMv7VE (Cortex-A7/A12/A15/A17, Krait-400, PJ4B-MP and Brahma-B15) properly. For an ARMv8-only kernel we should pass the correct compiler flags. We should also have this for any upcoming Cortex-A32 and Cortex-R52 platforms. b) Generally speaking it's a bad idea to run an platform that supports aarch64 in aarch32 mode, you should use a native kernel with syscall emulation for 32-bit user space unless you have a very strong reason not to do that. If you have a strong reason why your platform is different from all the others, please at least explain it in the changelog. On the other hand, any platform support both aarch64 and aarch32 mode should in theory run with a 32-bit kernel, and it might be nice to allow that for *all* platforms that we support on a 64-bit kernel. If we decide to do this, we should come up with a way to include the platform configuration from arch/arm64 in the arm Kconfig file. Arnd