From nobody Mon Mar 23 21:24:36 2026 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=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1773334569; cv=none; d=zohomail.com; s=zohoarc; b=TwEcU5b2r5yxVa1Ae6WYvtcqCPLej1totg0UjQGQjQsoC7bXPHd2EjRgSRjNBTgKpLK2KrE9HxagyXJKkCMOHj+RKwQIy65F6GPsr7qUELXL1ysBSgbsIsb5j0g4NRpT51a3yGXOln/2+BBYIYsytka8fyiqkq02IXGODxNczLg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773334569; 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=Zqpvz5INomrf1w7sEL/xZCVv7pCruy4Bd5QH3mgXqjc=; b=iZnjbGaOUxZhfQwroKN6qrRXglYXg+mXzXIU3Tg1DImub77tZIXbCcovAOSodywlI1HT555pjeXe7uQV1dFh4xiJI5FCfbP8rEu5BbeTjNsoGGUOftFEk4xNkWy71q7jvW/wzmr8IsHVJv32HejDd6k+XlbDbhK7ylhtr86ADFw= 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=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1773334569006950.0678346703673; Thu, 12 Mar 2026 09:56:09 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1252772.1549334 (Exim 4.92) (envelope-from ) id 1w0jKF-0000vb-Pr; Thu, 12 Mar 2026 16:55:55 +0000 Received: by outflank-mailman (output) from mailman id 1252772.1549334; Thu, 12 Mar 2026 16:55:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1w0jKF-0000vU-Lo; Thu, 12 Mar 2026 16:55:55 +0000 Received: by outflank-mailman (input) for mailman id 1252772; Thu, 12 Mar 2026 16:55:54 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1w0jKE-0000EC-1y for xen-devel@lists.xenproject.org; Thu, 12 Mar 2026 16:55:54 +0000 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [2a00:1450:4864:20::335]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 547a5fb3-1e34-11f1-b164-2bf370ae4941; Thu, 12 Mar 2026 17:55:53 +0100 (CET) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4853510b4f3so16238635e9.0 for ; Thu, 12 Mar 2026 09:55:53 -0700 (PDT) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48541aa73dasm693358825e9.2.2026.03.12.09.55.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Mar 2026 09:55:51 -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: 547a5fb3-1e34-11f1-b164-2bf370ae4941 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1773334552; x=1773939352; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=Zqpvz5INomrf1w7sEL/xZCVv7pCruy4Bd5QH3mgXqjc=; b=GdJFuQ08B6/lyk/mNyxz+jG/rxUGjossdmGtp8RVU/aJqMRlL9daUTcGUMl1I8PVsz yQx8gJY/wirGaE5dGJrEuio7+kY9j6khIv4PRaxgYS4cXDJS9ZlfmjnmUxr16DNzo8lI /zReHFS0k3UPaSjKQbL4XgKZfFa44CaYRV94p0pg4Ox+yZJ4WaJpqT+Da14VrnVbGVqQ w98a/ZKVgxWlViAwrP7Z5pOv/Mc/m54rLvwdub/2hQFmxgQfYfTyy8vQC9qVkihZZUaB FfY7l9eoY9N4jABB5tCYtthHsQk85EI/6+HxEDVYlWEQ3x+Yzp5fPjAGR8Pjdtrzqoln FaUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773334552; x=1773939352; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Zqpvz5INomrf1w7sEL/xZCVv7pCruy4Bd5QH3mgXqjc=; b=OPmyZbPOoDtQLXw3T/TFgYlBGf7tx9o2P01gDkYMmEksawsi1YVBdTDLq4D45eJc4P FOL5FZgkv4/rlRJ0Cyj5hIZA/gYhtcgQEPXdeqQB59ouovpxyRDiKUDHwGEAGpybIIHs /fHS1me2P86NVxArr0SIoCk9CT7rSaUENChxi51sTI0ZwDgAfCnH2NJeGJ80alYTOnJZ sQrBH7h2MQzd7MyUaRFNHKD2h6aA6h8zrUxZSi4Ve6SvhNoOLwhNnsLvfAwOWgrlSwlP 2IILiMpYGkyJOuC/3TlT9oJFiOU7N3y0ajCOPUHU74rbOGPXPfHZy9mLhxOZIPseEwz7 NwMA== X-Gm-Message-State: AOJu0YwF8FwYrgkJQBG8Hb2ti+LRR1x37kfSCn2NyJDLS5dwNKEyS4XC dFvtG9ke92CfWc+YubRqqUpjdxM15cBCUSQ8vcRI9klgE0dr0QV7kBDDNM7QaRvNGhl+Bl7AL6r xueE= X-Gm-Gg: ATEYQzxCNydjNg+bti+Qk2I55imkp0Gu5UPTNr1ajy49RDK7CYFRygr0tGqbvYhr9+T Dt8cGCUT0Yl2WLrK8i4XanMkUz0AJdZTEse8XrFvni3NE+1Uwp0xg/Fe5d7DOWAxiQQk+FUpFJF ImewlFlWgxbznK9RtLIWxAWVnrj+rP9tPJJi80xG3FAgcMqahle/n0SRauDz1ORIAbjbNg9BHL8 MhoeYa/2tUhKhrARpmm60cFm3wHMOyIjaju6fsCoFemzmbHKI1d/ZoocY7x/AEyXo0gVyMJmH+i LvU1HmZ+TR8t/j3T4Non+P6mRrD72sWuUUCeKXNMFbkVVh9Y/ufrUqhRg441SHLp/kJORzlYmEJ swH6uT+tB8cGw9SB63LSYb9O9U/kbLdmQPAE3pDBJiBV/hbHaxo7ljTe24Kuok0rIu+Iwq1xq54 a1M7GsJV9NDw3go2MB1q3F5J/GxhjEDU2k3ji6LD1JG2YPgqtsfHsexlEqKlNIiNw6Z45tHNZyQ f4uRKXlw8U16w8= X-Received: by 2002:a05:600c:4fc6:b0:477:5b0a:e616 with SMTP id 5b1f17b1804b1-485566d2f96mr272825e9.5.1773334552485; Thu, 12 Mar 2026 09:55:52 -0700 (PDT) Message-ID: <797f444b-886f-46ed-9672-a0f302d47336@suse.com> Date: Thu, 12 Mar 2026 17:55:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 4/9] x86/mwait-idle: move pre-initialized struct idle_cpu instances From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= References: <7b7a677e-a5b9-42c8-beec-3c506b4eac52@suse.com> Content-Language: en-US Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <7b7a677e-a5b9-42c8-beec-3c506b4eac52@suse.com> Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1773334570918154100 Content-Type: text/plain; charset="utf-8" Now that they're not referenced anymore post-init, they can themselves move into .init.rodata. (idle_cpu_adl{,_l} can also become const in the first place.) Signed-off-by: Jan Beulich --- a/xen/arch/x86/cpu/mwait-idle.c +++ b/xen/arch/x86/cpu/mwait-idle.c @@ -1167,132 +1167,132 @@ static void cf_check c1e_promotion_disab wrmsrl(MSR_IA32_POWER_CTL, msr_bits); } =20 -static const struct idle_cpu idle_cpu_nehalem =3D { +static const struct idle_cpu __initconstrel idle_cpu_nehalem =3D { .state_table =3D nehalem_cstates, .auto_demotion_disable_flags =3D NHM_C1_AUTO_DEMOTE | NHM_C3_AUTO_DEMOTE, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static const struct idle_cpu idle_cpu_atom =3D { +static const struct idle_cpu __initconstrel idle_cpu_atom =3D { .state_table =3D atom_cstates, }; =20 -static const struct idle_cpu idle_cpu_tangier =3D { +static const struct idle_cpu __initconstrel idle_cpu_tangier =3D { .state_table =3D tangier_cstates, }; =20 -static const struct idle_cpu idle_cpu_lincroft =3D { +static const struct idle_cpu __initconstrel idle_cpu_lincroft =3D { .state_table =3D atom_cstates, .auto_demotion_disable_flags =3D ATM_LNC_C6_AUTO_DEMOTE, }; =20 -static const struct idle_cpu idle_cpu_snb =3D { +static const struct idle_cpu __initconstrel idle_cpu_snb =3D { .state_table =3D snb_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static const struct idle_cpu idle_cpu_byt =3D { +static const struct idle_cpu __initconstrel idle_cpu_byt =3D { .state_table =3D byt_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static const struct idle_cpu idle_cpu_cht =3D { +static const struct idle_cpu __initconstrel idle_cpu_cht =3D { .state_table =3D cht_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static const struct idle_cpu idle_cpu_ivb =3D { +static const struct idle_cpu __initconstrel idle_cpu_ivb =3D { .state_table =3D ivb_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static const struct idle_cpu idle_cpu_ivt =3D { +static const struct idle_cpu __initconstrel idle_cpu_ivt =3D { .state_table =3D ivt_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static const struct idle_cpu idle_cpu_hsw =3D { +static const struct idle_cpu __initconstrel idle_cpu_hsw =3D { .state_table =3D hsw_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static const struct idle_cpu idle_cpu_bdw =3D { +static const struct idle_cpu __initconstrel idle_cpu_bdw =3D { .state_table =3D bdw_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static const struct idle_cpu idle_cpu_skl =3D { +static const struct idle_cpu __initconstrel idle_cpu_skl =3D { .state_table =3D skl_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static const struct idle_cpu idle_cpu_skx =3D { +static const struct idle_cpu __initconstrel idle_cpu_skx =3D { .state_table =3D skx_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static const struct idle_cpu idle_cpu_icx =3D { +static const struct idle_cpu __initconstrel idle_cpu_icx =3D { .state_table =3D icx_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static struct idle_cpu __ro_after_init idle_cpu_adl =3D { +static const struct idle_cpu __initconstrel idle_cpu_adl =3D { .state_table =3D adl_cstates, }; =20 -static struct idle_cpu __ro_after_init idle_cpu_adl_l =3D { +static const struct idle_cpu __initconstrel idle_cpu_adl_l =3D { .state_table =3D adl_l_cstates, }; =20 -static const struct idle_cpu idle_cpu_mtl_l =3D { +static const struct idle_cpu __initconstrel idle_cpu_mtl_l =3D { .state_table =3D mtl_l_cstates, }; =20 -static const struct idle_cpu idle_cpu_gmt =3D { +static const struct idle_cpu __initconstrel idle_cpu_gmt =3D { .state_table =3D gmt_cstates, }; =20 -static const struct idle_cpu idle_cpu_spr =3D { +static const struct idle_cpu __initconstrel idle_cpu_spr =3D { .state_table =3D spr_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static const struct idle_cpu idle_cpu_gnr =3D { +static const struct idle_cpu __initconstrel idle_cpu_gnr =3D { .state_table =3D gnr_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static const struct idle_cpu idle_cpu_gnrd =3D { +static const struct idle_cpu __initconstrel idle_cpu_gnrd =3D { .state_table =3D gnrd_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static const struct idle_cpu idle_cpu_avn =3D { +static const struct idle_cpu __initconstrel idle_cpu_avn =3D { .state_table =3D avn_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static const struct idle_cpu idle_cpu_bxt =3D { +static const struct idle_cpu __initconstrel idle_cpu_bxt =3D { .state_table =3D bxt_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static const struct idle_cpu idle_cpu_dnv =3D { +static const struct idle_cpu __initconstrel idle_cpu_dnv =3D { .state_table =3D dnv_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static const struct idle_cpu idle_cpu_snr =3D { +static const struct idle_cpu __initconstrel idle_cpu_snr =3D { .state_table =3D snr_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static const struct idle_cpu idle_cpu_grr =3D { +static const struct idle_cpu __initconstrel idle_cpu_grr =3D { .state_table =3D grr_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static const struct idle_cpu idle_cpu_srf =3D { +static const struct idle_cpu __initconstrel idle_cpu_srf =3D { .state_table =3D srf_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, };