From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1948341AbcBSIr7 (ORCPT ); Fri, 19 Feb 2016 03:47:59 -0500 Received: from foss.arm.com ([217.140.101.70]:44623 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1948119AbcBSIr4 (ORCPT ); Fri, 19 Feb 2016 03:47:56 -0500 Message-ID: <56C6D6B3.60605@arm.com> Date: Fri, 19 Feb 2016 08:47:47 +0000 From: Vladimir Murzin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Arnd Bergmann , Nicolas Pitre CC: Jon Medhurst , Russell King , Ard Biesheuvel , Marc Zyngier , Linus Walleij , linux-kernel@vger.kernel.org, Maxime Coquelin stm32 , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/9] ARM: ARMv7-M uses BE-8, not BE-32 References: <1455804123-2526139-1-git-send-email-arnd@arndb.de> <1455804123-2526139-2-git-send-email-arnd@arndb.de> <2702301.CTWUiSsjZR@wuerfel> In-Reply-To: <2702301.CTWUiSsjZR@wuerfel> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/02/16 16:12, Arnd Bergmann wrote: > On Thursday 18 February 2016 11:06:08 Nicolas Pitre wrote: >> On Thu, 18 Feb 2016, Arnd Bergmann wrote: >> >>> When configuring the kernel for big-endian, we set either BE-8 or BE-32 >>> based on the CPU architecture level. Until linux-4.4, we did not have >>> any ARMv7-M platform allowing big-endian builds, but now i.MX/Vybrid >>> is in that category, adn we get a build error because of this: >>> >>> arch/arm/kernel/module-plts.c: In function 'get_module_plt': >>> arch/arm/kernel/module-plts.c:60:46: error: implicit declaration of function '__opcode_to_mem_thumb32' [-Werror=implicit-function-declaration] >>> >>> This comes down to picking the wrong default, ARMv7-M uses BE8 >>> like ARMv7-A does. Changing the default gets the kernel to compile >>> and presumably works. >> >> Was it tested without BE8 when it was submitted upstream? I don't think >> you can switch this freely on a given hardware platform and expect it to >> still work. >> >> > > mach-imx contains a number of different SoCs, and one SoC was recently > tested successfully after a number of endianess bugs got fixed. This was > an i.mx6 using a Cortex-A9 core, but we are now also able to build > vybrid vf610 big-endian based on that selection. This SoC supports > Linux running either on its Cortex-A5 or its Cortex-M3 (or M4?) cores. > > I am rather sure nobody has ever run Linux in big-endian mode on the > Cortex-M platform, specifically because it was always wrong and could > not be enabled in Kconfig. Ah, it explains why my quick attempt to enable BE for MPS2 (M-class platform) failed. With this patch applied I'm able to see Linux booting on MPS2 FVP model in BE, not complete boot but it might be due to other reasons. So this patch definitely improves things for me, if it helps Tested-by: Vladimir Murzin Cheers Vladimir > > Arnd > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > > >