From patchwork Fri Jul 12 11:56:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijay Kilari X-Patchwork-Id: 2826913 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A9886C0AB2 for ; Fri, 12 Jul 2013 11:57:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD5D42017C for ; Fri, 12 Jul 2013 11:57:31 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 975722017F for ; Fri, 12 Jul 2013 11:57:30 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UxbyY-0007Py-4P; Fri, 12 Jul 2013 11:57:26 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UxbyV-0007ba-Kw; Fri, 12 Jul 2013 11:57:23 +0000 Received: from mail-ie0-x232.google.com ([2607:f8b0:4001:c03::232]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UxbyS-0007a5-Kh for linux-arm-kernel@lists.infradead.org; Fri, 12 Jul 2013 11:57:21 +0000 Received: by mail-ie0-f178.google.com with SMTP id u16so20959088iet.9 for ; Fri, 12 Jul 2013 04:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=B29T8K5bG3h/Dhw+MMHKimMai4GYI4uCKzJH3bHwfvw=; b=GaH5Al7N6Gw5OEj75VmnWHWfRaZhSpnQx2s8+wD2znhbrOsG2yINCC1OA1IX+23YI8 wX0bFw4fAPFzT/3CNH/nq1yXZncenP4drk8wfdHbRJ6/59iFv2bf1j5KHW92jkuz3nR6 cJupgrd40IYlMI3W4pTgYcCjVx1Blfxxf4hKQVLn68Wwy4EQsFFBx8WHh0qrs9l4TlzE m1Bgdy3gKaZHrvQJYXyGAhcfuVMp7dG69sBX6bST2oTp1ByaOlLZLpHwUm+MQyQ1dKHX ExXKe9aM6fhMAENY5Eqqrwf+0EuK46ohAoVbRZ6BnUtMp9MhxsuPB02Felw+TKxULVRO MKJw== MIME-Version: 1.0 X-Received: by 10.42.11.211 with SMTP id v19mr12093946icv.29.1373630219728; Fri, 12 Jul 2013 04:56:59 -0700 (PDT) Received: by 10.64.166.106 with HTTP; Fri, 12 Jul 2013 04:56:59 -0700 (PDT) In-Reply-To: <20130712134726.0a909165@skate> References: <20130712134726.0a909165@skate> Date: Fri, 12 Jul 2013 17:26:59 +0530 Message-ID: Subject: Re: v3.10 - big endian core support From: Vijay Kilari To: Thomas Petazzoni X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130712_075720_708732_3E4002D5 X-CRM114-Status: GOOD ( 21.80 ) X-Spam-Score: -2.0 (--) Cc: rmk@arm.linux.org.uk, ben.dooks@codethink.co.uk, Will Deacon , jgq516@gmail.com, "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Jul 12, 2013 at 5:17 PM, Thomas Petazzoni wrote: > Dear Vijay Kilari, > > On Fri, 12 Jul 2013 17:09:12 +0530, Vijay Kilari wrote: > >> > Ben Dooks has a separate branch on top of this base branch for >> > big-endian support, that adds atags compat code to convert the ATAGs >> > data from LE to BE. See the baserock/311/be/atags branch in >> > git://git.baserock.org/delta/linux. Or >> > http://git.baserock.org/cgi-bin/cgit.cgi/delta/linux.git/log/?h=baserock/311/be/atags. >> >> ARM VE TC2 board, enabling CONFIG_THUMB2_KERNEL failed to boot in BE mode >> It hangs at very early stage of boot > > Yeah, the Thumb2 code is not supported by Ben Dooks patches, it's part > of the TODO-list. I think Ben said he would probably not have much time > to work on this. I might be able to spare some time on this, so just > let me know if I should start working on this. If I remember correctly, > it's mainly the fixup_pv_table code that needed some Thumb2/BE love. In fact, I tried with below changes.. still it fails > > Will, is getting Thumb2 working a requirement to get the BE support > merged, or can we for now make the BE option depends on !THUMB2_KERNEL ? > > Thanks! > > Thomas > -- > Thomas Petazzoni, Free Electrons > Kernel, drivers, real-time and embedded Linux > development, consulting, training and support. > http://free-electrons.com diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 2de1114..7df64c7 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -592,8 +592,14 @@ __fixup_a_pv_table: b 2f 1: add r7, r3 ldrh ip, [r7, #2] +#ifdef CONFIG_CPU_ENDIAN_BE8 + rev ip, ip +#endif and ip, 0x8f00 orr ip, r6 @ mask in offset bits 31-24 +#ifdef CONFIG_CPU_ENDIAN_BE8 + rev ip, ip +#endif strh ip, [r7, #2] 2: cmp r4, r5 ldrcc r7, [r4], #4 @ use branch for delay slot