From nobody Sat Nov 23 15:36:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1724882666; cv=none; d=zohomail.com; s=zohoarc; b=URX+B6i5CpR6nU89WXaVjbSL7GmnHF1rhIAzgdlJCDS+2sbuGaxn/Zxn6AxdXtEcrOLXF8gMGtzAluwMcCLFH9A9AKUofhvUTznRbcafTcXY3sfxxkEQSPVb4Q7duDq7z5zO3+/7B37fzX79ezsHOKcj5evKSA9DMQwMkV66HD0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1724882666; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=TA9zJhMMiP1cl4HW7H7RUH127emY4xJNbEczm6wLMBU=; b=Bok1hacy+BKhgB3sddJfBYm+dxAtsDcX7I0Czpu1cddDmUJnEGsc9hjYmMJ+Yt+Ls6PX3MmTYg/vRJ5GwVfEMisP0gCsyoPdnPYuHAkImOriZHkOdNioxgNxpEiHjtixOqd0q28Dj2efQJlB4mbNCtNEKejkGgVXWmeFREDFghE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 17248826665371003.0704412177166; Wed, 28 Aug 2024 15:04:26 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.785165.1194579 (Exim 4.92) (envelope-from ) id 1sjQll-0006ME-Ba; Wed, 28 Aug 2024 22:04:01 +0000 Received: by outflank-mailman (output) from mailman id 785165.1194579; Wed, 28 Aug 2024 22:04:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sjQll-0006L2-58; Wed, 28 Aug 2024 22:04:01 +0000 Received: by outflank-mailman (input) for mailman id 785165; Wed, 28 Aug 2024 22:03:59 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sjQlj-0006E8-R2 for xen-devel@lists.xenproject.org; Wed, 28 Aug 2024 22:03:59 +0000 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [2a00:1450:4864:20::534]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 6c704332-6589-11ef-99a0-01e77a169b0f; Thu, 29 Aug 2024 00:03:57 +0200 (CEST) Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-5bf006f37daso18895a12.1 for ; Wed, 28 Aug 2024 15:03:57 -0700 (PDT) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c0bb1c2d2esm2695898a12.16.2024.08.28.15.03.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2024 15:03:55 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 6c704332-6589-11ef-99a0-01e77a169b0f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1724882636; x=1725487436; darn=lists.xenproject.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=TA9zJhMMiP1cl4HW7H7RUH127emY4xJNbEczm6wLMBU=; b=lyzXYIpTlZfTLoaktw/83gq7NnZCWtARmJkEIoQg5D4Pib7zbZpYyn2u5yNA7FpXnz tgBz+3kgRjR0N/XlEzTqG5XYZGp365TraSWmolI/7gjXgeE8C8TZDB/VEqIXXYGxbtx8 zlYVTJKqy0j3GqSJmgtowx7G+ZG9qmpb/nU00= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724882636; x=1725487436; 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=TA9zJhMMiP1cl4HW7H7RUH127emY4xJNbEczm6wLMBU=; b=hCh7KmDEMvZnpyoauCDBT2Fai5iMShq726JkLH3u2aTt4FsiOio8JEE3nYZ3S6NKxn 4Pakmnjv1PGhr8DZIr5B2N+Lw/dlmCrgY+7JInTd0iDNOnCRFOHpTYZqyVLoOnsoMKlO SMpK6Y0/zsMkRxc1rgRpW+fSFzwG9JxcatwV/G4zZYIG/Xc7CajEmU5xQZSlbTzOWXID +1mIMd4vUxSqQ1MLUq/QdKIg5TcjNH5c/fjqf37xwJbS2mLxP0IEB2J41FlwYGj+MnbM DPbssmse1Q4whgtutIwahJMa7s6vijoprRZ9E6CcGHEyg3Oo5UHUem7/9/hfxJTKVnpU ugUg== X-Gm-Message-State: AOJu0YwOD4rO/GR266l1+QibihGXDwHUDLwBpHkP/q1Y+LarA0qbbXIi ecVEifQvb4UW2wgGfB5OdQztNtkI0mgOOqovnzpwLAj1Ws8g8MmEB+EK2kl+oOr7VgH+Z4SWuhI l X-Google-Smtp-Source: AGHT+IGD9DKTjQXlDEnryzLj/nD4dCJYNsZnTxN+I9P6dA3O2JfEGef4Tj0eX54rIlOSfqwvDZUzNg== X-Received: by 2002:a05:6402:3506:b0:5c0:a8b8:dd6b with SMTP id 4fb4d7f45d1cf-5c22018ad3dmr620843a12.14.1724882636093; Wed, 28 Aug 2024 15:03:56 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis , Michal Orzel , Oleksii Kurochko , Shawn Anastasio Subject: [PATCH v2 01/11] xen/compiler: Rename __attribute_const__ to attr_const Date: Wed, 28 Aug 2024 23:03:41 +0100 Message-Id: <20240828220351.2686408-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240828220351.2686408-1-andrew.cooper3@citrix.com> References: <20240828220351.2686408-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1724882667533116600 There's no need for the name to be so verbose. No functional change. Suggest-by: Jan Beulich Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk CC: Bertrand Marquis CC: Michal Orzel CC: Oleksii Kurochko CC: Shawn Anastasio v2: * New --- tools/libs/guest/xg_dom_decompress_unsafe_zstd.c | 2 +- xen/arch/arm/include/asm/arm64/cpufeature.h | 12 ++++++------ xen/arch/x86/include/asm/byteorder.h | 4 ++-- xen/arch/x86/include/asm/endbr.h | 4 ++-- xen/include/xen/byteorder/swab.h | 6 +++--- xen/include/xen/compiler.h | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c b/tools/libs/= guest/xg_dom_decompress_unsafe_zstd.c index 7cd266444bb1..ff45732a3616 100644 --- a/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c +++ b/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c @@ -22,7 +22,7 @@ typedef uint16_t __be16; typedef uint32_t __be32; typedef uint64_t __be64; =20 -#define __attribute_const__ +#define attr_const #define __force #define always_inline #define noinline diff --git a/xen/arch/arm/include/asm/arm64/cpufeature.h b/xen/arch/arm/inc= lude/asm/arm64/cpufeature.h index d9b9fa77cbd2..1bb503e857e9 100644 --- a/xen/arch/arm/include/asm/arm64/cpufeature.h +++ b/xen/arch/arm/include/asm/arm64/cpufeature.h @@ -44,25 +44,25 @@ struct arm64_ftr_bits { s64 safe_val; /* safe value for FTR_EXACT features */ }; =20 -static inline int __attribute_const__ +static inline int attr_const cpuid_feature_extract_signed_field_width(u64 features, int field, int widt= h) { return (s64)(features << (64 - width - field)) >> (64 - width); } =20 -static inline int __attribute_const__ +static inline int attr_const cpuid_feature_extract_signed_field(u64 features, int field) { return cpuid_feature_extract_signed_field_width(features, field, 4); } =20 -static inline unsigned int __attribute_const__ +static inline unsigned int attr_const cpuid_feature_extract_unsigned_field_width(u64 features, int field, int wi= dth) { return (u64)(features << (64 - width - field)) >> (64 - width); } =20 -static inline unsigned int __attribute_const__ +static inline unsigned int attr_const cpuid_feature_extract_unsigned_field(u64 features, int field) { return cpuid_feature_extract_unsigned_field_width(features, field, 4); @@ -73,7 +73,7 @@ static inline u64 arm64_ftr_mask(const struct arm64_ftr_b= its *ftrp) return (u64)GENMASK(ftrp->shift + ftrp->width - 1, ftrp->shift); } =20 -static inline int __attribute_const__ +static inline int attr_const cpuid_feature_extract_field_width(u64 features, int field, int width, bool= sign) { return (sign) ? @@ -81,7 +81,7 @@ cpuid_feature_extract_field_width(u64 features, int field= , int width, bool sign) cpuid_feature_extract_unsigned_field_width(features, field, width); } =20 -static inline int __attribute_const__ +static inline int attr_const cpuid_feature_extract_field(u64 features, int field, bool sign) { return cpuid_feature_extract_field_width(features, field, 4, sign); diff --git a/xen/arch/x86/include/asm/byteorder.h b/xen/arch/x86/include/as= m/byteorder.h index e935f7b2b03b..a877c07f6796 100644 --- a/xen/arch/x86/include/asm/byteorder.h +++ b/xen/arch/x86/include/asm/byteorder.h @@ -4,13 +4,13 @@ #include #include =20 -static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) +static inline attr_const __u32 ___arch__swab32(__u32 x) { asm("bswap %0" : "=3Dr" (x) : "0" (x)); return x; } =20 -static inline __attribute_const__ __u64 ___arch__swab64(__u64 val) +static inline attr_const __u64 ___arch__swab64(__u64 val) {=20 union {=20 struct { __u32 a,b; } s; diff --git a/xen/arch/x86/include/asm/endbr.h b/xen/arch/x86/include/asm/en= dbr.h index 3033e40d29a8..ba3bae714787 100644 --- a/xen/arch/x86/include/asm/endbr.h +++ b/xen/arch/x86/include/asm/endbr.h @@ -19,7 +19,7 @@ * gen_endbr64() is written deliberately to avoid the problematic operand,= and * marked __const__ as it is safe for the optimiser to hoist/merge/etc. */ -static inline uint32_t __attribute_const__ gen_endbr64(void) +static inline uint32_t attr_const gen_endbr64(void) { uint32_t res; =20 @@ -45,7 +45,7 @@ static inline void place_endbr64(void *ptr) * contain an ENDBR64 instruction. Use an encoding which isn't the default * P6_NOP4. Specifically, nopw (%rcx) */ -static inline uint32_t __attribute_const__ gen_endbr64_poison(void) +static inline uint32_t attr_const gen_endbr64_poison(void) { uint32_t res; =20 diff --git a/xen/include/xen/byteorder/swab.h b/xen/include/xen/byteorder/s= wab.h index b7e30f050385..9f817e3c4492 100644 --- a/xen/include/xen/byteorder/swab.h +++ b/xen/include/xen/byteorder/swab.h @@ -123,7 +123,7 @@ #endif /* OPTIMIZE */ =20 =20 -static inline __attribute_const__ __u16 __fswab16(__u16 x) +static inline attr_const __u16 __fswab16(__u16 x) { return __arch__swab16(x); } @@ -136,7 +136,7 @@ static inline void __swab16s(__u16 *addr) __arch__swab16s(addr); } =20 -static inline __attribute_const__ __u32 __fswab32(__u32 x) +static inline attr_const __u32 __fswab32(__u32 x) { return __arch__swab32(x); } @@ -150,7 +150,7 @@ static inline void __swab32s(__u32 *addr) } =20 #ifdef __BYTEORDER_HAS_U64__ -static inline __attribute_const__ __u64 __fswab64(__u64 x) +static inline attr_const __u64 __fswab64(__u64 x) { # ifdef __SWAB_64_THRU_32__ __u32 h =3D x >> 32; diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h index 444bf80142c7..b118e4ba62eb 100644 --- a/xen/include/xen/compiler.h +++ b/xen/include/xen/compiler.h @@ -88,7 +88,7 @@ =20 #define __constructor __attribute__((__constructor__)) cf_check #define __pure __attribute__((__pure__)) -#define __attribute_const__ __attribute__((__const__)) +#define attr_const __attribute__((__const__)) #define __transparent__ __attribute__((__transparent_union__)) =20 /* --=20 2.39.2