From patchwork Tue Jul 1 13:01:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philipp Tomsich X-Patchwork-Id: 4458511 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 BDE9EBEEAA for ; Tue, 1 Jul 2014 13:04:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E0225203E6 for ; Tue, 1 Jul 2014 13:03:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EA9F5203E5 for ; Tue, 1 Jul 2014 13:03:57 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X1xgn-0000hw-Hg; Tue, 01 Jul 2014 13:01:37 +0000 Received: from vegas.theobroma-systems.com ([144.76.126.164] helo=mail.theobroma-systems.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X1xgk-0000ew-UY for linux-arm-kernel@lists.infradead.org; Tue, 01 Jul 2014 13:01:35 +0000 Received: from [86.59.122.178] (port=53232 helo=dhcp-10-2-9-103.lan.10.in-addr.arpa) by mail.theobroma-systems.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1X1xgJ-0007Bt-UC; Tue, 01 Jul 2014 15:01:08 +0200 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: [PATCH 15/24] ARM64:ILP32: Use the non compat HWCAP for ILP32. From: "Dr. Philipp Tomsich" In-Reply-To: <1400914939-9708-16-git-send-email-apinski@cavium.com> Date: Tue, 1 Jul 2014 15:01:06 +0200 Message-Id: <6E65D0A3-E36A-4A34-8CD0-258964FA623A@theobroma-systems.com> References: <1400914939-9708-1-git-send-email-apinski@cavium.com> <1400914939-9708-16-git-send-email-apinski@cavium.com> To: Andrew Pinski X-Mailer: Apple Mail (2.1878.2) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140701_060135_161858_111FFFEC X-CRM114-Status: GOOD ( 10.32 ) X-Spam-Score: 0.0 (/) Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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=-1.9 required=5.0 tests=BAYES_00,T_HK_NAME_DR, T_RP_MATCHES_RCVD, 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 24 May 2014, at 09:02 , Andrew Pinski wrote: > #ifdef CONFIG_COMPAT > -#define COMPAT_ELF_HWCAP (compat_elf_hwcap) > -#define COMPAT_ELF_HWCAP2 (compat_elf_hwcap2) > extern unsigned int compat_elf_hwcap, compat_elf_hwcap2; > +#define COMPAT_ELF_HWCAP \ > + (is_a32_compat_task() \ > + ? compat_elf_hwcap \ > + : elf_hwcap) > + > +#define COMPAT_ELF_HWCAP2 \ > + (is_a32_compat_task() \ > + ? compat_elf_hwcap2 \ > + : 0) > + > #endif You missed the COMPAT_ELF_PLATFORM (in arm64/include/asm/elf.h), which is used to setup AT_PLATFORM in the auxilary vectors. Iā€™d suggest to use a similar naming convention to what will be used in gdb (i.e. appending a ā€œ:ilp32ā€ to the base architecture. The proposed change would thus be: --- arch/arm64/include/asm/elf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h index 3f979b5..6d38edc 100644 --- a/arch/arm64/include/asm/elf.h +++ b/arch/arm64/include/asm/elf.h @@ -168,9 +168,9 @@ extern unsigned long arch_randomize_brk(struct mm_struct *mm); #ifdef CONFIG_COMPAT #ifdef __AARCH64EB__ -#define COMPAT_ELF_PLATFORM ("v8b") +#define COMPAT_ELF_PLATFORM (is_ilp32_compat_task() ? "aarch64_be:ilp32" : "v8b") #else -#define COMPAT_ELF_PLATFORM ("v8l") +#define COMPAT_ELF_PLATFORM (is_ilp32_compat_task() ? "aarch64:ilp32" : "v8l") #endif #define COMPAT_ELF_ET_DYN_BASE (randomize_et_dyn(2 * TASK_SIZE_32 / 3))