From patchwork Tue Feb 25 12:38:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 3716411 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 1E494BF13A for ; Tue, 25 Feb 2014 12:40:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4FFF8201DD for ; Tue, 25 Feb 2014 12:40:52 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (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 5B8CC201D3 for ; Tue, 25 Feb 2014 12:40:51 +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 1WIHIr-0004Bt-Ow; Tue, 25 Feb 2014 12:40:06 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WIHIg-0000Vj-KD; Tue, 25 Feb 2014 12:39:54 +0000 Received: from mail-wi0-f172.google.com ([209.85.212.172]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WIHIR-0000TR-ER for linux-arm-kernel@lists.infradead.org; Tue, 25 Feb 2014 12:39:41 +0000 Received: by mail-wi0-f172.google.com with SMTP id e4so4415301wiv.5 for ; Tue, 25 Feb 2014 04:39:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sTwihGFqxvRDqvhGMyzfwUTxvYwZEhOzopPSqL7khJ0=; b=jGDrWy2FVnPm8rrW0gtlsTOkDFpRVF53WS9F8cdtpjuyjuDpdkn/1E1XKgjNlSA5Ii M3m23JE+6t9YkTae4dG2ElWx05sOWAZ4FkXywNyIjrMfAeiUrnDBfjyPC2w3DGR9fD+N KfzdFBAz8rwrzjjz3XMt7A1rLwQ6hTng35/x/p50FGnyBHIGVZjUobJkQsEEiZZYndPk eB4nRMyYqyFVH4ilVzHLqIjXlzv366QJ4M0SjeNYfenHE1VBS2/j31ZsLr//6TVBs4A/ /42mGYfbuWPoOJpdFK1K35i/mwmOJAmw17MjSUTwARaUr9F/l7V0/e8P+XdoZjBkm6AC /GvA== X-Gm-Message-State: ALoCoQlQxdIzGgAVa14BS1cdygFaSSwpWhOBURZD2Q8Jr63+Q8xvo65FIOrzLRhVBNDeItcAia1N X-Received: by 10.180.108.199 with SMTP id hm7mr19527807wib.1.1393331946719; Tue, 25 Feb 2014 04:39:06 -0800 (PST) Received: from ards-macbook-pro.local (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by mx.google.com with ESMTPSA id jw4sm50423292wjc.20.2014.02.25.04.39.05 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Feb 2014 04:39:06 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, peter.maydell@linaro.org Subject: [PATCH resend 2/3] arm64: add AT_HWCAP2 support for 32-bit compat Date: Tue, 25 Feb 2014 13:38:58 +0100 Message-Id: <1393331939-31289-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1393331939-31289-1-git-send-email-ard.biesheuvel@linaro.org> References: <1393331939-31289-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140225_073939_725706_003ACC70 X-CRM114-Status: UNSURE ( 9.92 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) Cc: ryan.arnold@linaro.org, Ard Biesheuvel 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: , MIME-Version: 1.0 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Add support for the ELF auxv entry AT_HWCAP2 when running 32-bit ELF binaries in compat mode. Signed-off-by: Ard Biesheuvel Acked-by: Catalin Marinas --- arch/arm64/include/asm/hwcap.h | 3 ++- arch/arm64/kernel/setup.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/hwcap.h b/arch/arm64/include/asm/hwcap.h index 6cddbb0c9f54..9a4cbd60c88e 100644 --- a/arch/arm64/include/asm/hwcap.h +++ b/arch/arm64/include/asm/hwcap.h @@ -41,7 +41,8 @@ #ifdef CONFIG_COMPAT #define COMPAT_ELF_HWCAP (compat_elf_hwcap) -extern unsigned int compat_elf_hwcap; +#define COMPAT_ELF_HWCAP2 (compat_elf_hwcap2) +extern unsigned int compat_elf_hwcap, compat_elf_hwcap2; #endif extern unsigned long elf_hwcap; diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index c8e9effe52e1..349c49260f09 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -69,6 +69,7 @@ EXPORT_SYMBOL_GPL(elf_hwcap); COMPAT_HWCAP_VFPv3|COMPAT_HWCAP_VFPv4|\ COMPAT_HWCAP_NEON|COMPAT_HWCAP_IDIV) unsigned int compat_elf_hwcap __read_mostly = COMPAT_ELF_HWCAP_DEFAULT; +unsigned int compat_elf_hwcap2 __read_mostly; #endif static const char *cpu_name;