From patchwork Sat Nov 2 09:56:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 2005408 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=aurel32.net header.i=@aurel32.net header.a=rsa-sha256 header.s=202004.hall header.b=YoFABCgE; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XgY6m5Yjyz1xwc for ; Sat, 2 Nov 2024 20:57:04 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CE0C03857BA9 for ; Sat, 2 Nov 2024 09:57:02 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from hall.aurel32.net (hall.aurel32.net [IPv6:2001:bc8:30d7:100::1]) by sourceware.org (Postfix) with ESMTPS id 770903858CDA for ; Sat, 2 Nov 2024 09:56:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 770903858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=aurel32.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aurel32.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 770903858CDA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:bc8:30d7:100::1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730541410; cv=none; b=N6QyTYlQjvzTrhhegfiw3bWDj9ED/7f4yk26p+TPB5cdN5dIkhaXCVYVsbc2keJbXsXpufbrLvu7N+WOiteikimk4FdygXOjRB3DVdG1l7SqohwDsT7+umNIkhwpNhtNl4Ug55AZIPKqSuOqrjazrg03L+4Fu28osM5N33qDUFY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730541410; c=relaxed/simple; bh=4m/h+/zhSd9Q/jwYsVsFSKJ0L0tB6/U0HYZLwtqwjaE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=KUwtt77JKZPa8QzTJXPusfpKAq2vjs+QxEZVe29jORjcO+iUAUDNs1U5ToHFpYY5EHR5YNl7nVhzPnMLOp3gAxzVxdMjdOvl/BETIL1TAia8JCmoUuI08Q1jOlssgkMij0BnJZru1plB6BuTBA8ICI5ahUFmvk6R8iY0KuzDi8U= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aurel32.net ; s=202004.hall; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date: Subject:Cc:To:From:Content-Type:From:Reply-To:Subject:Content-ID: Content-Description:In-Reply-To:References:X-Debbugs-Cc; bh=akWtm2Zns1pJ5CBYJHfNbTLxDk4UCMDqkhlWSgu+OTA=; b=YoFABCgEWMExOGKWjVS06Yr1fn grHpSV6taD1s3Dp8Z5DnQ2BLor4Dq9utVR8Du/fQpcMjWsKCDdERE1hKpqZiiGsF+uq/N2fetmQ32 gMyPpa2tll+V9xsiqicmsS0/SWvrHdoF6cLW2Uo3GLMGZ+A0MSu/thKZ7cfGNzyaGlYsJ7P/ivqMj ZzWKN636BwkSvFe6Mn6xsD3uAiTqPmDh4s6bq97tfriZnHCWwoJBTzxQ8+zMm2xUHSYstLnKOUk5e i1gvHNDXwII5DE0lFsdLayucvRdIBA0N6Zr1k1j1AEl8a6V/z6WWT37L82Recq5Zaz2v7uVACqfu6 7YmQNt/w==; Received: from ohm.aurel32.net ([2001:bc8:30d7:111::2] helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1t7AsB-00C1Xt-0B; Sat, 02 Nov 2024 10:56:47 +0100 From: Aurelien Jarno To: libc-alpha@sourceware.org Cc: Aurelien Jarno Subject: [PATCH] Add Arm HWCAP2_* constants from Linux 3.15 and 6.2 to Date: Sat, 2 Nov 2024 10:56:38 +0100 Message-ID: <20241102095638.285483-1-aurelien@aurel32.net> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org Linux 3.15 and 6.2 added HWCAP2_* values for Arm. These bits have already been added to dl-procinfo.{c,h} in commits 9aea0cb842f02 and 8ebe9c0b38a9. Also add them to so that they can be used in user code. For example, for checking bits in the value returned by getauxval(AT_HWCAP2). Signed-off-by: Aurelien Jarno --- sysdeps/unix/sysv/linux/arm/bits/hwcap.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/bits/hwcap.h b/sysdeps/unix/sysv/linux/arm/bits/hwcap.h index b104de473c..7b573facb9 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/hwcap.h +++ b/sysdeps/unix/sysv/linux/arm/bits/hwcap.h @@ -49,3 +49,11 @@ #define HWCAP_ASIMDFHM 33554432 #define HWCAP_ASIMDBF16 67108864 #define HWCAP_I8MM 134217728 + +#define HWCAP2_AES 1 +#define HWCAP2_PMULL 2 +#define HWCAP2_SHA1 4 +#define HWCAP2_SHA2 8 +#define HWCAP2_CRC32 16 +#define HWCAP2_SB 32 +#define HWCAP2_SSBS 64