From patchwork Thu Sep 5 22:08:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13793033 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E1CDECE7AA2 for ; Thu, 5 Sep 2024 22:08:32 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.791415.1201297 (Exim 4.92) (envelope-from ) id 1smKeO-0001rc-7n; Thu, 05 Sep 2024 22:08:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 791415.1201297; Thu, 05 Sep 2024 22:08:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1smKeO-0001rI-3h; Thu, 05 Sep 2024 22:08:24 +0000 Received: by outflank-mailman (input) for mailman id 791415; Thu, 05 Sep 2024 22:08:23 +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 1smKeM-0000d4-Si for xen-devel@lists.xenproject.org; Thu, 05 Sep 2024 22:08:22 +0000 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [2a00:1450:4864:20::635]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 5cd8793f-6bd3-11ef-99a1-01e77a169b0f; Fri, 06 Sep 2024 00:08:21 +0200 (CEST) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a86910caf9cso444595666b.1 for ; Thu, 05 Sep 2024 15:08:21 -0700 (PDT) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8a6236d020sm187525166b.127.2024.09.05.15.08.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 15:08:18 -0700 (PDT) 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: 5cd8793f-6bd3-11ef-99a1-01e77a169b0f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1725574100; x=1726178900; 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=Z07Rt8xWRkaIJIJwoIRUcGqCQ60a5xLz+kCbQYTjXpk=; b=QjOvMi/MapPD9rSa3kSa3WKlqhWgsxR3urb426eviUioQt4bH8GFlaIVqH+UCsXbwQ ZSIup7yxLQOKZHC52USXhuZbPhE5MvoX/E3ykNzCu/WMj492nmOx3T3cljQXxJVTstwD wsh/LfH+bcXGFDLESMlmkkEqB3hj/I8dGNV20= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725574100; x=1726178900; 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=Z07Rt8xWRkaIJIJwoIRUcGqCQ60a5xLz+kCbQYTjXpk=; b=W7MA7m/3lcdrquYInxQRxWMlFMDMzP5pVz/pxC7eiTqD35q0J6IbSx6LushMN16HiN aroT60euvy4ffq390fZY3U5k9UFATi4aIRfjQQ2U2TrDzM87KWHgNuNrnZ0LxHrlgiMb Ulf9iQGvXpjqKmZt3dMCRnff2MrlHFjrHwrUQ2Ijl2K0W9z/cwsFZYdPBPeUJyjxVyKx sEWXl6os8vDP1/3SWtR+/Au5vi3OPccYkOn/9NkTem/aoEQybGmaqujObGAvq65qHzrK dNVV7WhWq1km7zjOB1QA3ofGbepVbvmNsfoA/fMpnCMEAjFvT+x5U5KgH3oq95yCYJ1o NrpQ== X-Gm-Message-State: AOJu0YxNhrfDfjQ5w/XqRxCULfR1e58ilmY0pFehRqqp+VxoEM2MoWvF RTxIOHTJFloCNjmHHtszFnGd3x8uPHGC1TA9r+YZXDkAjgU//77PyAfytszLo9sSabikMhbIHFU 9 X-Google-Smtp-Source: AGHT+IH6MdX3GEZWCMtR7PcKtqVSBubYjR64pQJl/gJmLkC0I/kvdKtRQpDLIR5qfacWmOWx6ArYNw== X-Received: by 2002:a17:907:987:b0:a77:ca3b:996c with SMTP id a640c23a62f3a-a8a8604476emr74497766b.16.1725574099903; Thu, 05 Sep 2024 15:08:19 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis , Michal Orzel Subject: [PATCH 4/5] x86/cache: Drop legacy __read_mostly/__ro_after_init definitions Date: Thu, 5 Sep 2024 23:08:05 +0100 Message-Id: <20240905220806.141300-5-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240905220806.141300-1-andrew.cooper3@citrix.com> References: <20240905220806.141300-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Lots of files were picking these up transitively, including lib.h However, lib.h needs __read_mostly for printk_once() and this has the side effect of kicking the transitive can down the road. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monné CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk CC: Bertrand Marquis CC: Michal Orzel --- xen/arch/x86/include/asm/cache.h | 3 --- xen/include/xen/cache.h | 2 +- xen/include/xen/lib.h | 1 + 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/include/asm/cache.h b/xen/arch/x86/include/asm/cache.h index 956c05493e23..f15d10dc7f2d 100644 --- a/xen/arch/x86/include/asm/cache.h +++ b/xen/arch/x86/include/asm/cache.h @@ -9,9 +9,6 @@ #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) -/* TODO: Phase out the use of this via cache.h */ -#define __read_mostly __section(".data.read_mostly") - #ifndef __ASSEMBLY__ void cache_flush(const void *addr, unsigned int size); diff --git a/xen/include/xen/cache.h b/xen/include/xen/cache.h index a19942fd63ef..90816ba05b1a 100644 --- a/xen/include/xen/cache.h +++ b/xen/include/xen/cache.h @@ -15,7 +15,7 @@ #define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) #endif -#if defined(CONFIG_ARM) || defined(CONFIG_X86) +#if defined(CONFIG_ARM) /* TODO: Phase out the use of this via cache.h */ #define __ro_after_init __section(".data.ro_after_init") #endif diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h index e884a02ee8ce..81b722ea3e80 100644 --- a/xen/include/xen/lib.h +++ b/xen/include/xen/lib.h @@ -10,6 +10,7 @@ #include #include #include +#include #define __ACCESS_ONCE(x) ({ \ (void)(typeof(x))0; /* Scalar typecheck. */ \