From patchwork Mon Dec 23 14:06:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 3396811 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 337549F169 for ; Mon, 23 Dec 2013 14:09:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 07BEE20790 for ; Mon, 23 Dec 2013 14:09:19 +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 BF3D2201BE for ; Mon, 23 Dec 2013 14:09:17 +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 1Vv6Aq-0000dF-KF; Mon, 23 Dec 2013 14:08:01 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vv6Ab-00009P-BN; Mon, 23 Dec 2013 14:07:45 +0000 Received: from mail-ea0-f182.google.com ([209.85.215.182]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vv69y-0008Vj-WA for linux-arm-kernel@lists.infradead.org; Mon, 23 Dec 2013 14:07:08 +0000 Received: by mail-ea0-f182.google.com with SMTP id a15so2386532eae.13 for ; Mon, 23 Dec 2013 06:06:48 -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=w4XhYztvojakWT7tkWE8+zQp0vM6yyNNesmKYFDxKnk=; b=TvB4P/hbPEtiSngIq5TP1NL3pvnyiJl4xSVWOl8rtR2k+GaGxUgI/BxP0UxSgybdVB WdZtDN5eqQEv1C/eCIFJAsSPbnGAX6AAbqXZVhoCFoDtIQaFcaqh85VE0KdaJIBCOAIf DXQ/YMCn9armaOrAoHcJvHGk4MKk4HorjOwhUR49xP1/ohrXmKW/hp2GvA3zDE2Qk9l6 XnR/O9QEjc5TfZgd2/mVraa7mwVaJgPNp4aHN63MVszQJcAkZh9rQIA6KmzCXIZ4HYF+ FaCpnqfgTEhDudbccoHeEqKQvV83hN5xWrM2Y7XZrovXXbhEXXcrFPcTZzLYnwT+eWej pi3w== X-Gm-Message-State: ALoCoQnB9uX254PatzjaDIKer5HJnVr3pIG2gRfEooc1DtsKiQnKfQLqtbQ+h7a7C7B2qppnfVwo X-Received: by 10.15.54.130 with SMTP id t2mr2727499eew.72.1387807608414; Mon, 23 Dec 2013 06:06:48 -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.46 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 23 Dec 2013 06:06:47 -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 4/5] ARM: introduce HWCAP2 feature bits for ARMv8 Crypto Extensions Date: Mon, 23 Dec 2013 15:06:31 +0100 Message-Id: <1387807592-26375-5-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_090707_209637_1F0EE5B0 X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. 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 This allocates feature bits 0-4 in HWCAP2 for the crypto and CRC extensions introduced in ARMv8. Signed-off-by: Ard Biesheuvel Acked-by: Catalin Marinas --- 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 87768b5..20d12f2 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 ce3049c..ac3a7f2 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 };