From nobody Fri Oct 31 04:14:26 2025 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=1751979452; cv=none; d=zohomail.com; s=zohoarc; b=YDSwz68NcgX2cBon+wtq3z9+aChKvihnSJ/nyRHqdTJrTEFyJVjTeSW2m6Rdpcgg6iHIM+RRYUu6Grluo9y3Cem8r/peNVJqHfLwi69SdCSvlHOlpOuZI5wpElhMIJatCvXNwqGSTBSYztAzQEdFexXd06kI/BRve19LTqbpq0A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1751979452; 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=HjPneAjKTdudV80syyoVVEC7Di0qJNSEuHumxOWNEyI=; b=Gg4kAV9fdmkW3Cs9yBOCT73Au8468KReoAvWCbGwBoJ1qw2dfwPSXWQrfPNZhpG25+gMUt6Tvif0fkxmSP6dJ4F92hYpn849kIsARvGZm62MpzInZS93w30hMjyl4F+vQPjJVbfA3EgWEwuHTpjk4lmWqaBPUB9JYY0mmRADHkI= 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 1751979452115991.297982051148; Tue, 8 Jul 2025 05:57:32 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1036440.1408668 (Exim 4.92) (envelope-from ) id 1uZ7sp-0003Vd-TE; Tue, 08 Jul 2025 12:57:15 +0000 Received: by outflank-mailman (output) from mailman id 1036440.1408668; Tue, 08 Jul 2025 12:57:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uZ7sp-0003VW-QL; Tue, 08 Jul 2025 12:57:15 +0000 Received: by outflank-mailman (input) for mailman id 1036440; Tue, 08 Jul 2025 12:57:14 +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 1uZ7so-0003VI-ES for xen-devel@lists.xenproject.org; Tue, 08 Jul 2025 12:57:14 +0000 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [2a00:1450:4864:20::436]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 10ad2c1e-5bfb-11f0-b894-0df219b8e170; Tue, 08 Jul 2025 14:57:12 +0200 (CEST) Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-3a536ecbf6fso2292126f8f.2 for ; Tue, 08 Jul 2025 05:57:12 -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 d9443c01a7336-23c84592ef4sm118058145ad.191.2025.07.08.05.57.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Jul 2025 05:57:11 -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: 10ad2c1e-5bfb-11f0-b894-0df219b8e170 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1751979432; x=1752584232; 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=HjPneAjKTdudV80syyoVVEC7Di0qJNSEuHumxOWNEyI=; b=DHJMF/WPyc8fmnwH5r15VQt2E9cxkmN+24g5T/8hsBxFTKSg/XTpNdVnyrqcHrFehV 7unTmHp1smLLryX59uR7KuZptiUWcpfG98hycU0RuN3jbtK1Lpdm8SzL+ScgcBKiC66T Rn7I5edAD1b8zdn1Wyiu1u65T7mAczPlkR5Z396eTFy7Z3GZdtrabSy1Mwy6ZJmqy0tQ uALBhn+wxNBt1mIwILoKHS/DGPtDEYUSlykREW5u5QsHT2N5WLKJWSf5R+RqXXF4aU7T xmxXdu3cR27M18xBrLr52UWhwQm1Xphv2Xj5lywZxPE57gkeLQWccRC7sibENVRSYKmS m6+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751979432; x=1752584232; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HjPneAjKTdudV80syyoVVEC7Di0qJNSEuHumxOWNEyI=; b=suzmYaOpqkn8u99gtTHYwUZ6Czh0bhFUraEhkThaCb6eMWqbdH5RFLsaCN0d1iNlHh LanPzxuvtUmqhrrIqXFENyFvz28oqXQ2zVZkaVJMX5ZK7SWtziiZK+4Nh4s663QypI77 J+39+GLLgCP3EfNdsPzARaZ0LXoLaGgGh0CcXSjGCKsFzLNhTwWdOosw/M2JNM1h7Nxw Q3LkC62DDR6iGENVdvWgQCjcoA5QyWRulo+2zch03hoCrQF2SXtHWuBqmw3t1xiGICuy RrSBKcNSI5nrTFICpsfnNTtk8UvfmaB64xZjVC3NQScLqhaOuW1xuEiUXQI4hL8couMg D4kQ== X-Gm-Message-State: AOJu0YxliAk4qQvpppMQwGKPjbAq/QQGbsOFyuhcrd/Ipm9of017B3yM VA6KIPSQeyoK4LcRCvfCkfR5bsYljPTCXD2mVpkcSC3+EgYwVE8pWKUahmmXnhBLfsdJGF4SXVE qt/w= X-Gm-Gg: ASbGnctGlvtiuzGHHlQdaZppB1+nZV0JafwGs3vge2bU4VsZoTnOzTSGEyqFqacSe1y 589pD8fg7lhOv6hC8ApPfwlcW7U+SKJt1oiaGKAHgqFkm5fQ5ioXWuYKUtQgAgXg0bUUL+fm3oX saPlhwqN7H7t6EL8M7XOmJOGNhtSSU7meQKSq4+V8qwfKfroiJKcygh4VSIYLWFSJamBFYeOoCV tqd1zsMAwolAzVptAC49dkC2Zv+h5FGbb/G/FLmJu8hZZP2M1yNLo/+fJNzcSAqU2L5hhTLePzR FE1Hj5RR0/NH1iQtm0XkzrmsEzZWrmHcJb82qtJxyOAnYw5AyAqM697lr3eyAvtsZeeRRBXyxhK a6bxEPiAP2tiihKN+feo0t2Dl8yhDSJrV8//PudkHRWljPw4= X-Google-Smtp-Source: AGHT+IEHZv4nySI925CsxfNwuvbaeExmnukQrsbG7AuSaj+IxLBlzGmA2csPK5nSYBAK0X49SwKhQw== X-Received: by 2002:a05:6000:2f84:b0:3a5:39d8:57e4 with SMTP id ffacd0b85a97d-3b5ddef3ab1mr2375560f8f.41.1751979431806; Tue, 08 Jul 2025 05:57:11 -0700 (PDT) Message-ID: Date: Tue, 8 Jul 2025 14:57:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 1/9] x86/mwait-idle: adjust section annotations From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= References: <1df49875-99b8-4302-aed7-5a75dbdd85ca@suse.com> Content-Language: en-US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/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: <1df49875-99b8-4302-aed7-5a75dbdd85ca@suse.com> Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1751979454531116600 Content-Type: text/plain; charset="utf-8" idle_cpu_spr was bogusly non-const. Several other objects can be changed from __read_mostly to __ro_after_init, for being altered from __init functions only. Signed-off-by: Jan Beulich --- a/xen/arch/x86/cpu/mwait-idle.c +++ b/xen/arch/x86/cpu/mwait-idle.c @@ -106,14 +106,14 @@ struct idle_cpu { enum c1e_promotion c1e_promotion; }; =20 -static const struct idle_cpu *icpu; +static const struct idle_cpu *__ro_after_init icpu; =20 static const struct cpuidle_state { char name[16]; unsigned int flags; unsigned int exit_latency; /* in US */ unsigned int target_residency; /* in US */ -} *cpuidle_state_table; +} *__ro_after_init cpuidle_state_table; =20 #define CPUIDLE_FLAG_DISABLED 0x1 /* @@ -504,7 +504,7 @@ static const struct cpuidle_state bdw_cs {} }; =20 -static struct cpuidle_state __read_mostly skl_cstates[] =3D { +static struct cpuidle_state __ro_after_init skl_cstates[] =3D { { .name =3D "C1", .flags =3D MWAIT2flg(0x00), @@ -556,7 +556,7 @@ static struct cpuidle_state __read_mostl {} }; =20 -static struct cpuidle_state __read_mostly skx_cstates[] =3D { +static struct cpuidle_state __ro_after_init skx_cstates[] =3D { { .name =3D "C1", .flags =3D MWAIT2flg(0x00) | CPUIDLE_FLAG_IRQ_ENABLE, @@ -610,7 +610,7 @@ static const struct cpuidle_state icx_cs * By default we enable C1E and disable C1 by marking it with * 'CPUIDLE_FLAG_DISABLED'. */ -static struct cpuidle_state __read_mostly adl_cstates[] =3D { +static struct cpuidle_state __ro_after_init adl_cstates[] =3D { { .name =3D "C1", .flags =3D MWAIT2flg(0x00) | CPUIDLE_FLAG_DISABLED, @@ -644,7 +644,7 @@ static struct cpuidle_state __read_mostl {} }; =20 -static struct cpuidle_state __read_mostly adl_l_cstates[] =3D { +static struct cpuidle_state __ro_after_init adl_l_cstates[] =3D { { .name =3D "C1", .flags =3D MWAIT2flg(0x00) | CPUIDLE_FLAG_DISABLED, @@ -678,7 +678,7 @@ static struct cpuidle_state __read_mostl {} }; =20 -static struct cpuidle_state __read_mostly spr_cstates[] =3D { +static struct cpuidle_state __ro_after_init spr_cstates[] =3D { { .name =3D "C1", .flags =3D MWAIT2flg(0x00), @@ -778,7 +778,7 @@ static const struct cpuidle_state avn_cs {} }; =20 -static struct cpuidle_state __read_mostly bxt_cstates[] =3D { +static struct cpuidle_state __ro_after_init bxt_cstates[] =3D { { .name =3D "C1", .flags =3D MWAIT2flg(0x00), @@ -1075,15 +1075,15 @@ static const struct idle_cpu idle_cpu_ic .c1e_promotion =3D C1E_PROMOTION_DISABLE, }; =20 -static struct idle_cpu __read_mostly idle_cpu_adl =3D { +static struct idle_cpu __ro_after_init idle_cpu_adl =3D { .state_table =3D adl_cstates, }; =20 -static struct idle_cpu __read_mostly idle_cpu_adl_l =3D { +static struct idle_cpu __ro_after_init idle_cpu_adl_l =3D { .state_table =3D adl_l_cstates, }; =20 -static struct idle_cpu __read_mostly idle_cpu_spr =3D { +static const struct idle_cpu idle_cpu_spr =3D { .state_table =3D spr_cstates, .c1e_promotion =3D C1E_PROMOTION_DISABLE, };