From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id E895C1F451 for ; Wed, 3 Jan 2024 17:21:07 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=DXUDPFyz; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2965D386F43C for ; Wed, 3 Jan 2024 17:21:07 +0000 (GMT) Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by sourceware.org (Postfix) with ESMTPS id 2769B385803B for ; Wed, 3 Jan 2024 17:15:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2769B385803B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2769B385803B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::22f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704302122; cv=none; b=F30rOD34amdHrTDYc9vunap0xHlobbtjJdg25imTdOFHrMSUJbxiQzmf7NJJhiOdkM1kmwlI8CYybFGIVPItc/vFZfbWpqrlCcZ6RyoYDbG7ti20D6wSgEmT0Rh2tnisD4c6vBabXx8Gyw88sWKLuGKadcOs8bGomQS8DuG43v8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704302122; c=relaxed/simple; bh=8dJR1m/Tfso+s9pvuiamxNB7A09bC8CFhRxpkpSdJQM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=wbIhtsL9LA/h4o2ctDa03GrIcZ89h8w5SatTwE8yaN3rVZTgOo4QABlXV7r/vUlYWKNOaJvvRTbPr8kIkTOQPlvUuz91e/gupJun2ZtIQme/Ff03AOICl+S683hM7GPWMu+UBYRwt2Q04cU+7yPvyZFr+CBcRYmtPkc28JIh4OA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2cce6c719caso56894191fa.2 for ; Wed, 03 Jan 2024 09:15:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704302117; x=1704906917; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=dhUHjyik8KBTlFSuc5yiQTOtNKnjWU+dfJmzatiA1Y0=; b=DXUDPFyzuxNyaVGfuJ9LhDFPZzHDMmjwTvgT5Zx3Y+PF+YTa8hOWhAjQR9JFXXjl8j 5VuYJTpZwr20jXVE8JCBgs+cSmdk0fXhCRBFJrFRA9p6tw69NwsC/nJhmfhAI3RXagCs 2UM10ntPGbNMEHt7KVzd1GJ57stjuKf5W4T+h3J0k+WCNTw1bC4CCF2NHCMvLPwRXiq5 qrMSxEBdjKExmY4b25mLgqG1mWjZRcw3+wRYe2FtA6BAdCM+EuBQyIS5srrbHCx4cqBz 2wBgg45tKs6Qua1z2fpUbqjbuKwvMHzGrZZxMPxY8LMlsfTAGcZdIMiRkrAHBDUP5+fY X7aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704302117; x=1704906917; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dhUHjyik8KBTlFSuc5yiQTOtNKnjWU+dfJmzatiA1Y0=; b=FvxlDUq5Yy7ES8gGeKy6W5me1khQBxFV7O6LAOtLS7pZA+bScoPFGBk2RoZ4BJA9ce NNUPDIx/7F144ldudN+FkdGJVpAAf8OpTuxoKRVfnKFr3DFIXbFgsf6ymdeSDFuE5toS 7kHRAQL6uqW8FT7D0btFlPF/hxRTIwTp4uIouG00hUls3x+I1XkB4CLPMaSywHEQbTTJ oG16Z3mWfWO+orgVmeodvUoRrOOj6tzSx8980/S3OSe0cs8VLT8oa0OjlFLHk9PB8wVZ JVYtRYjMfU1I6VVTP42TvoTKQF/Scsp/MzCC3QCr8rGtojW4TznhqKizAzJg7XXx3tRk XeJg== X-Gm-Message-State: AOJu0Yzw38Y/3ZWqsVkBS5F6DgbaW6+oZbSMr9h5aZoshH8m2sgXY7Yw xT633k9HlPWTkpAZr39vZf3jEsILxz8= X-Google-Smtp-Source: AGHT+IHgpWfWR6svNyUlgLK2XMKWLjyVje4juZfnI94dV3+UB5CDkSLt+6JJdyMwvy+CzkpGLxeZzA== X-Received: by 2002:ac2:4e90:0:b0:50e:7f9d:18c8 with SMTP id o16-20020ac24e90000000b0050e7f9d18c8mr5627358lfr.17.1704302116776; Wed, 03 Jan 2024 09:15:16 -0800 (PST) Received: from surface-pro-6.. ([2a00:1370:818c:b32f:ebdc:fd0:376b:8006]) by smtp.gmail.com with ESMTPSA id y23-20020a196417000000b0050e6d84d177sm3546068lfb.279.2024.01.03.09.15.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 09:15:16 -0800 (PST) From: Sergey Bugaev To: libc-alpha@sourceware.org, bug-hurd@gnu.org Subject: [RFC PATCH 13/23] aarch64: Add dl-procinfo Date: Wed, 3 Jan 2024 20:14:46 +0300 Message-ID: <20240103171502.1358371-14-bugaevc@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240103171502.1358371-1-bugaevc@gmail.com> References: <20240103171502.1358371-1-bugaevc@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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+e=80x24.org@sourceware.org This is based on the Linux version, but doesn't define GLRO(dl_aarch64_cap_flags) and implement _dl_hwcap_string (which seems unused anyway) based on Linux HWCAP bit values. Signed-off-by: Sergey Bugaev --- sysdeps/aarch64/dl-procinfo.c | 59 +++++++++++++++++++++++++++++++++++ sysdeps/aarch64/dl-procinfo.h | 38 ++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 sysdeps/aarch64/dl-procinfo.c create mode 100644 sysdeps/aarch64/dl-procinfo.h diff --git a/sysdeps/aarch64/dl-procinfo.c b/sysdeps/aarch64/dl-procinfo.c new file mode 100644 index 00000000..5a51edbc --- /dev/null +++ b/sysdeps/aarch64/dl-procinfo.c @@ -0,0 +1,59 @@ +/* Data for AArch64 version of processor capability information. + Copyright (C) 2017-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* If anything should be added here check whether the size of each string + is still ok with the given array size. + + All the #ifdefs in the definitions are quite irritating but + necessary if we want to avoid duplicating the information. There + are three different modes: + + - PROCINFO_DECL is defined. This means we are only interested in + declarations. + + - PROCINFO_DECL is not defined: + + + if SHARED is defined the file is included in an array + initializer. The .element = { ... } syntax is needed. + + + if SHARED is not defined a normal array initialization is + needed. + */ + +#ifndef PROCINFO_CLASS +# define PROCINFO_CLASS +#endif + +#if !IS_IN (ldconfig) +# if !defined PROCINFO_DECL && defined SHARED + ._dl_aarch64_cpu_features +# else +PROCINFO_CLASS struct cpu_features _dl_aarch64_cpu_features +# endif +# ifndef PROCINFO_DECL += { } +# endif +# if !defined SHARED || defined PROCINFO_DECL +; +# else +, +# endif +#endif + +#undef PROCINFO_DECL +#undef PROCINFO_CLASS diff --git a/sysdeps/aarch64/dl-procinfo.h b/sysdeps/aarch64/dl-procinfo.h new file mode 100644 index 00000000..176de5cd --- /dev/null +++ b/sysdeps/aarch64/dl-procinfo.h @@ -0,0 +1,38 @@ +/* Processor capability information handling macros - aarch64 version. + Copyright (C) 2017-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _DL_PROCINFO_H +#define _DL_PROCINFO_H 1 + +#include +#include +#include +#include + +/* We cannot provide a general printing function. */ +#define _dl_procinfo(type, word) -1 + +/* No additional library search paths. */ +#define HWCAP_IMPORTANT HWCAP_ATOMICS + +/* There're no platforms to filter out. */ +#define _DL_HWCAP_PLATFORM 0 + +#define _dl_string_platform(str) (-1) + +#endif /* dl-procinfo.h */ -- 2.43.0