From patchwork Fri Jan 17 09:23:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 23312 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3AE2820540 for ; Fri, 17 Jan 2014 09:25:52 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id x13sf15574217ief.10 for ; Fri, 17 Jan 2014 01:25:51 -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=cnNY1p6NM7G6fKJZJQZgHYlGGPsoogb27CBLf4PucVg=; b=JcPXgxZeJuFVTcXGsAS4CPXdIZmvGCB9qoNJRG/A9HFvsguj33vmZE28jPkjZNs5sz CRSKYlyitEsoYq0LTwsM0z+5y/T34J03O8Uir1dWwdMh+NnDXThqIpwekIJ6d61RL38j 87jwWY0eVs9s+EGZ5jezx1E+bZ36UOfNzieDKtum5b9Z6sTs1mRf/pFlxrlUikSVV2mN Iab92evI3uCzTd+rkFoeFkGHMLNecKZ++EAlckfJEP1D3Tg8eKYpkiM65OoUKfnIVv/+ z8TsucoaJD0PpO+gr9yfZ6oSRhi+FSuaz9vpEDU3/AMjOi3VST0GaaEXEUfWT0Csg1hX MYqg== X-Gm-Message-State: ALoCoQkDKdG9MbAVvzZ8/XAV+OVztu/XAKgNXcfAiONIEQ8LpHlQHGivqSbvQ71jctHzpVw2k0wl X-Received: by 10.50.124.9 with SMTP id me9mr728548igb.4.1389950751500; Fri, 17 Jan 2014 01:25:51 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.129 with SMTP id g1ls102516qge.69.gmail; Fri, 17 Jan 2014 01:25:51 -0800 (PST) X-Received: by 10.58.146.5 with SMTP id sy5mr126899veb.43.1389950751342; Fri, 17 Jan 2014 01:25:51 -0800 (PST) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id vd4si4195248vdc.104.2014.01.17.01.25.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 01:25:51 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.169 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.169; Received: by mail-ve0-f169.google.com with SMTP id oy12so943610veb.0 for ; Fri, 17 Jan 2014 01:25:51 -0800 (PST) X-Received: by 10.52.99.199 with SMTP id es7mr337278vdb.50.1389950751257; Fri, 17 Jan 2014 01:25:51 -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 ey3csp5965ved; Fri, 17 Jan 2014 01:25:50 -0800 (PST) X-Received: by 10.68.135.137 with SMTP id ps9mr965036pbb.160.1389950750235; Fri, 17 Jan 2014 01:25:50 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sa6si9590030pbb.353.2014.01.17.01.25.49; Fri, 17 Jan 2014 01:25:49 -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 S1752599AbaAQJZp (ORCPT + 26 others); Fri, 17 Jan 2014 04:25:45 -0500 Received: from mail-we0-f180.google.com ([74.125.82.180]:38814 "EHLO mail-we0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752433AbaAQJXW (ORCPT ); Fri, 17 Jan 2014 04:23:22 -0500 Received: by mail-we0-f180.google.com with SMTP id q59so4250391wes.39 for ; Fri, 17 Jan 2014 01:23:21 -0800 (PST) X-Received: by 10.194.192.233 with SMTP id hj9mr834506wjc.78.1389950601730; Fri, 17 Jan 2014 01:23:21 -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.20 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 01:23:21 -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 4/5] ARM: introduce HWCAP2 feature bits for ARMv8 Crypto Extensions Date: Fri, 17 Jan 2014 10:23:10 +0100 Message-Id: <1389950591-4212-5-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.169 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: , This allocates feature bits 0-4 in HWCAP2 for the crypto and CRC extensions introduced in ARMv8. Signed-off-by: Ard Biesheuvel --- arch/arm/include/uapi/asm/hwcap.h | 5 +++++ arch/arm/kernel/setup.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/arch/arm/include/uapi/asm/hwcap.h b/arch/arm/include/uapi/asm/hwcap.h index 87768b5cffd1..20d12f230a2f 100644 --- a/arch/arm/include/uapi/asm/hwcap.h +++ b/arch/arm/include/uapi/asm/hwcap.h @@ -31,5 +31,10 @@ /* * HWCAP2 flags - for elf_hwcap2 (in kernel) and AT_HWCAP2 */ +#define HWCAP2_AES (1 << 0) +#define HWCAP2_PMULL (1 << 1) +#define HWCAP2_SHA1 (1 << 2) +#define HWCAP2_SHA2 (1 << 3) +#define HWCAP2_CRC32 (1 << 4) #endif /* _UAPI__ASMARM_HWCAP_H */ diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index ce3049c89c18..ac3a7f218b7f 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -996,6 +996,11 @@ static const char *hwcap_str[] = { }; static const char *hwcap2_str[] = { + "aes", + "pmull", + "sha1", + "sha2", + "crc32", NULL };