From patchwork Mon Dec 23 14:06:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 3396821 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 24EAB9F169 for ; Mon, 23 Dec 2013 14:09:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 177B62078F for ; Mon, 23 Dec 2013 14:09:50 +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 C3FC22078D for ; Mon, 23 Dec 2013 14:09:48 +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 1Vv6B4-0000lS-8R; Mon, 23 Dec 2013 14:08:15 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vv6Aj-00009r-QT; Mon, 23 Dec 2013 14:07:53 +0000 Received: from mail-ee0-f49.google.com ([74.125.83.49]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vv6A0-0008Vi-Ao for linux-arm-kernel@lists.infradead.org; Mon, 23 Dec 2013 14:07:09 +0000 Received: by mail-ee0-f49.google.com with SMTP id c41so2348516eek.22 for ; Mon, 23 Dec 2013 06:06:46 -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=qEJzWN52qv85/B9ESfY755pZC9MzqAXiyIvyfgjqFQI=; b=MSY7c2d2U8jOnLHAO93FKl96LybJ1Wa0KPv8t3y0GXe82TuN5E3J8g13AmzgvniOYc QqPFz6c7IuLIUL8pwf6rCu8PC7CoeNHCAtnd8xzH0A0qhPtB0oUlSQqmyUgP3ZmDdxcV cTixvmNbS7oMt8xJyD0FQ6m9WrDzk7GGzCwPCY6H6rufE3dncphTNniVaFNrR/RY46Ee kCrXcUxTgnMqoiqN1Up5F4j53Mcu2oiTR+aIosIg1UY4Uuyw8L5kvPFwzOBl3Hg0mzs5 wM5s7Wd6Y+7cGFgwz5qKdj4N/rXEy8iCB4sNmn0mdnOY8yjw3iKjP64k9utT3KEhdcAR lNBA== X-Gm-Message-State: ALoCoQlOL1d2yg8p7N8vqYj+yVwoxGyH4FjvVQbRe8VkrXHZkiEYG1jJOqelmHf/adoUT+NJ6NQ0 X-Received: by 10.15.53.200 with SMTP id r48mr124884eew.111.1387807606191; Mon, 23 Dec 2013 06:06:46 -0800 (PST) Received: from ards-mac-mini.local (ip16-2-212-87.adsl2.static.versatel.nl. [87.212.2.16]) by mx.google.com with ESMTPSA id p45sm45942819eeg.1.2013.12.23.06.06.44 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 23 Dec 2013 06:06:45 -0800 (PST) From: Ard Biesheuvel To: linux@arm.linux.org.uk, catalin.marinas@arm.com, viro@zeniv.linux.org.uk, nico@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/5] arm64: add AT_HWCAP2 support for 32-bit compat Date: Mon, 23 Dec 2013 15:06:30 +0100 Message-Id: <1387807592-26375-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1387807592-26375-1-git-send-email-ard.biesheuvel@linaro.org> References: <1387807592-26375-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131223_090708_549769_4F4BD26B X-CRM114-Status: GOOD ( 10.15 ) X-Spam-Score: -2.6 (--) Cc: 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.7 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 --- 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 6cddbb0..9a4cbd6 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 bb33fff..15f3bd2 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;