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.9 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 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 DA1E41F44D for ; Sat, 23 Mar 2024 17:36:49 +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=FxQBm+8o; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BDBCB3858D38 for ; Sat, 23 Mar 2024 17:36:48 +0000 (GMT) Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by sourceware.org (Postfix) with ESMTPS id 2041C3858D3C for ; Sat, 23 Mar 2024 17:35:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2041C3858D3C 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 2041C3858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::12b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711215324; cv=none; b=TOCB6ke88TujSIwz2F/TrzqGinjBLKIDm0GSYHw27i7wsVO5dkjFv17rPu1bKw8lRd8wOKVBKlcMupEMH9bHBuMxvu3P123GTio3blBxY+ZmReT+LZ41SDLnNO2V/wp2K3PmFlCubNZ845fcCb+Gje99R5a5WoaV3GR35mx5298= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711215324; c=relaxed/simple; bh=7sV5N8BbL+riYxYa8HsinUCCuEkJHpCFap0glnlMmdw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=WtcYqK807Dpo/wZLU/BFocS9p6EiA+3kyoqDnIVaK/P0nrJY72rEM+U/alfIxQepgi2UnPhU3w5Fqzou3dy7TpILFwvX/c0g/porlqiF41wsKYWeazKIpY8x5PGnexvq4K52nK4H7t9xq3PvhSkv44OEfyeuCBEF0d7CR3ivl6c= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-51588f70d2dso3640987e87.3 for ; Sat, 23 Mar 2024 10:35:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711215319; x=1711820119; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IIHjo/ZXn+4R2QlieJ133iNw5vv6u6TUQmaQH+qiuqo=; b=FxQBm+8oD3GbT5n0oI+VbMJEuef6f51aE5wngtDfN2KwMQbK/NCynx6hKf/TwrPIW+ t9ANMETWn/8HqWiIlQBMs/sjt34a/4i/7ZdoosJ+w7aYeJvk/B1XNan8AclxyQ9sjzOo orSfpK8xpdivLsKZzCWNBWMVchpF1QdmIqdAyFjJ0WsglKaHp+GZ823at3uYM0wHoRcG fPNrKnM7SPSblzDU5wu7XzeDLPs2U8KGmxKSSXCoHFDeN3pKEIg9pa23w8jGXUH1DgWF yYJt1miPaxvOwWkCci9AIVWB1iczDrhcldt2IKFGpJPbgrFSlm/t1ne4qjjmmE/vJB2U Zhjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711215319; x=1711820119; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IIHjo/ZXn+4R2QlieJ133iNw5vv6u6TUQmaQH+qiuqo=; b=ntPoQV1t+FVd1xR7WfSTMB7ERfvxABGhbD07rQm9Pytz3OnhCqWn1oQ9EsPT5HWEno ++TKtYI+ZxeTMx12kp162/SEuFlis3PHdy1iPXiZoE7QWlo1TFhVxRRinLuvJ/iBvODO 5HTb5f/3J/txm/DfhkQFb/oaiNtbAsVx3wtHwlzbYWcqyn+mkUBJkNipVU2GW7JNhipF fG8a2QZ0QTBjru2mCgN4F3FIUeg1+odsNzkW2WHFPLTR/MJQ14bjyJya/9Rz7DJLGHBM irLcHK7xDqRcrXdoGNanDYrhjS19srU+stsK8FgCGhT3dNWxjbgqL5rr2rfvbWzA674s NeTg== X-Gm-Message-State: AOJu0Ywn4NqXVHpybAFxUj1XTjIp4BI21Q3yYRG1bd5Gts7wmc6IpjQQ VfcekkrTr+FGHckfn5UteWUAqrQjoQe6COYtAhZSTTyAGfnziDXw4Qae55Hv X-Google-Smtp-Source: AGHT+IHO5so7Botfu/K9/0gUoznvKu47SUF7X5pD1mTZ76PiiULG9gsnM1ZzlJ+dYT/VtRZKWTRayQ== X-Received: by 2002:ac2:5503:0:b0:513:dc12:95f6 with SMTP id j3-20020ac25503000000b00513dc1295f6mr1427366lfk.28.1711215319268; Sat, 23 Mar 2024 10:35:19 -0700 (PDT) Received: from surface-pro-6.. (79-139-171-253.dynamic.spd-mgts.ru. [79.139.171.253]) by smtp.gmail.com with ESMTPSA id g20-20020ac25394000000b00513973dee6fsm361290lfh.150.2024.03.23.10.35.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 10:35:18 -0700 (PDT) From: Sergey Bugaev To: libc-alpha@sourceware.org, bug-hurd@gnu.org Cc: Maxim Kuvyrkov , Luca Subject: [PATCH v2 08/20] aarch64: Add dl-procinfo Date: Sat, 23 Mar 2024 20:32:49 +0300 Message-ID: <20240323173301.151066-9-bugaevc@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240323173301.151066-1-bugaevc@gmail.com> References: <20240323173301.151066-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.44.0