From patchwork Fri Jan 17 09:23:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 23310 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A59E220540 for ; Fri, 17 Jan 2014 09:24:01 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id rd3sf8781569pab.7 for ; Fri, 17 Jan 2014 01:24:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=cZyEpH0PfGCFPMei5ZPE5rojBgu1LqebFalZvUr87nY=; b=ZKH9s1Nk7G6eDswBOBnVCZS8ytFpl1ZRBP8mbK82JQGmCat6r5wmg2RbzvBnsQqSeF 5WtstnbjZD+fFsPUn5/nnKgGWFUDDwV2tZdtU7QFmjamSQexlydTcYHjV7Fi6etfE7Os OE05ePPMx/UYcCokwqSh7fXsGgNjASNaoIvMRNo5yQ9h8OMIGSCM3sAmLk/juTccOEpz VzHZS19z8qI7YyLTTND9sPOxkkqLK+4Cpktgr0LD1RhKg8QNIGzmvqvo3IWBifXDHolr y30A1aGpxbSf+BJDxV52wID7mDjEDjG7CAna83HenR/qUVPwkeg9nqPT3h3y6yTlbCpI XrAA== X-Gm-Message-State: ALoCoQkQm9PkoOH4L01omL56fBoFpX1n4FelR6LhG9Qh+uZ9DrbmiBYfMJRF72oMl4g9x8Khfno3 X-Received: by 10.67.3.34 with SMTP id bt2mr271865pad.41.1389950640923; Fri, 17 Jan 2014 01:24:00 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.84.234 with SMTP id c10ls1178096qez.50.gmail; Fri, 17 Jan 2014 01:24:00 -0800 (PST) X-Received: by 10.58.208.130 with SMTP id me2mr375401vec.13.1389950640763; Fri, 17 Jan 2014 01:24:00 -0800 (PST) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id ry8si4620513vcb.121.2014.01.17.01.24.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 01:24:00 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id oz11so317186veb.32 for ; Fri, 17 Jan 2014 01:24:00 -0800 (PST) X-Received: by 10.52.245.42 with SMTP id xl10mr303046vdc.35.1389950640635; Fri, 17 Jan 2014 01:24:00 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp5873ved; Fri, 17 Jan 2014 01:24:00 -0800 (PST) X-Received: by 10.69.1.104 with SMTP id bf8mr857058pbd.75.1389950639704; Fri, 17 Jan 2014 01:23:59 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k3si9624685pbb.114.2014.01.17.01.23.59; Fri, 17 Jan 2014 01:23:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752499AbaAQJXh (ORCPT + 26 others); Fri, 17 Jan 2014 04:23:37 -0500 Received: from mail-wg0-f49.google.com ([74.125.82.49]:42367 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752429AbaAQJXV (ORCPT ); Fri, 17 Jan 2014 04:23:21 -0500 Received: by mail-wg0-f49.google.com with SMTP id a1so4304139wgh.16 for ; Fri, 17 Jan 2014 01:23:20 -0800 (PST) X-Received: by 10.180.182.226 with SMTP id eh2mr1244990wic.36.1389950600647; Fri, 17 Jan 2014 01:23:20 -0800 (PST) Received: from ards-mac-mini.local (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by mx.google.com with ESMTPSA id 5sm8736569wjw.17.2014.01.17.01.23.19 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 01:23:20 -0800 (PST) From: Ard Biesheuvel To: linux@arm.linux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, viro@zeniv.linux.org.uk, dave.martin@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: peter.maydell@linaro.org, Ard Biesheuvel Subject: [PATCH v2 resend 3/5] arm64: add AT_HWCAP2 support for 32-bit compat Date: Fri, 17 Jan 2014 10:23:09 +0100 Message-Id: <1389950591-4212-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1389950591-4212-1-git-send-email-ard.biesheuvel@linaro.org> References: <1389950591-4212-1-git-send-email-ard.biesheuvel@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 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 bb33fff09ba2..15f3bd207981 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;