From patchwork Fri Feb 12 14:17:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Rzeszutek Wilk X-Patchwork-Id: 8292281 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 80A909F1C0 for ; Fri, 12 Feb 2016 14:20:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9D752203E3 for ; Fri, 12 Feb 2016 14:20:34 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 75019203E1 for ; Fri, 12 Feb 2016 14:20:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aUEXr-0000LB-RE; Fri, 12 Feb 2016 14:18:03 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aUEXq-0000L1-3X for xen-devel@lists.xenproject.org; Fri, 12 Feb 2016 14:18:02 +0000 Received: from [85.158.139.211] by server-5.bemta-5.messagelabs.com id A7/58-03225-999EDB65; Fri, 12 Feb 2016 14:18:01 +0000 X-Env-Sender: konrad.wilk@oracle.com X-Msg-Ref: server-2.tower-206.messagelabs.com!1455286679!22013601!1 X-Originating-IP: [141.146.126.69] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTQxLjE0Ni4xMjYuNjkgPT4gMjc3MjE4\n X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 12083 invoked from network); 12 Feb 2016 14:18:00 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-2.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 12 Feb 2016 14:18:00 -0000 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u1CEHuEq017228 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 12 Feb 2016 14:17:57 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u1CEHucq009052 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 12 Feb 2016 14:17:56 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u1CEHuBI029476; Fri, 12 Feb 2016 14:17:56 GMT Received: from localhost.localdomain (/209.6.196.81) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 12 Feb 2016 06:17:55 -0800 Date: Fri, 12 Feb 2016 09:17:53 -0500 From: Konrad Rzeszutek Wilk To: Stefano Stabellini Message-ID: <20160212141753.GC6596@localhost.localdomain> References: <1455246507-5589-1-git-send-email-konrad.wilk@oracle.com> <1455246507-5589-3-git-send-email-konrad.wilk@oracle.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: userv0021.oracle.com [156.151.31.71] Cc: wei.liu2@citrix.com, ian.campbell@citrix.com, ian.jackson@eu.citrix.com, stefano.stabellini@citrix.com, jbeulich@suse.com, xen-devel@lists.xenproject.org Subject: Re: [Xen-devel] [PATCH v3 2/5] arm/config: Declare ELFSIZE_[32|64] respectively. X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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, Feb 12, 2016 at 11:26:10AM +0000, Stefano Stabellini wrote: > On Thu, 11 Feb 2016, Konrad Rzeszutek Wilk wrote: > > Otherwise any code that tries to use Elf_* macros instead of > > Elf32_ or Elf_64 fails to compile. > > > > CC: ian.campbell@citrix.com > > CC: wei.liu2@citrix.com > > CC: stefano.stabellini@citrix.com > > Signed-off-by: Konrad Rzeszutek Wilk > > --- > > xen/include/asm-arm/config.h | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h > > index bd832df..4ea66bf 100644 > > --- a/xen/include/asm-arm/config.h > > +++ b/xen/include/asm-arm/config.h > > @@ -15,8 +15,10 @@ > > > > #if defined(CONFIG_ARM_64) > > # define LONG_BYTEORDER 3 > > +# define ELFSIZE 64 > > #else > > # define LONG_BYTEORDER 2 > > +# define ELFSIZE 32 > > #endif > > I wonder if we should use ELF64 on ARM32 too, for simplicity (x86 only > uses ELF64) and because ARM32 is LPAE. Done. And this resolves also the question Jan raised in the design document about ARM32 and the ELF payload declaring the ELF only in 64-bit syntax. Thanks! Updated the patch to be: P.S. It compiles without trouble. From 7756ddc1e2aa0be487df05ce76577c6fa15a75ce Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Fri, 5 Feb 2016 10:44:45 -0500 Subject: [PATCH] arm/config: Declare ELFSIZE_64. Otherwise any code that tries to use Elf_* macros would require us to use Elf64_* types instead of the more friendly Elf_ one. This is OK to do since 32-bit ARM uses LPAE mode. CC: ian.campbell@citrix.com CC: wei.liu2@citrix.com CC: stefano.stabellini@citrix.com Signed-off-by: Konrad Rzeszutek Wilk --- xen/include/asm-arm/config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h index bd832df..d5321b4 100644 --- a/xen/include/asm-arm/config.h +++ b/xen/include/asm-arm/config.h @@ -15,8 +15,10 @@ #if defined(CONFIG_ARM_64) # define LONG_BYTEORDER 3 +# define ELFSIZE 64 #else # define LONG_BYTEORDER 2 +# define ELFSIZE 64 #endif #define BYTES_PER_LONG (1 << LONG_BYTEORDER)