From nobody Fri Oct 31 09:40:21 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=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1750783217; cv=none; d=zohomail.com; s=zohoarc; b=a6PVrXDeDfLMwz3cDlHGzVdrWDvzGVSP1+yXRZWh5tAP4a9FUCHxtufg4Lysb9Y9XyxfQiEeuWJkM7XfEVZgFtMdGyY8rTOtvGabSaTPusQfYzZ11iFGD1eCi1v6WvGVW39isHYqCyTAFweq1+vyMWT8VfpC55JEgKZpLPpEQXs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1750783217; 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=L8zvOhZvXOvF3gCKvTIhnAyw9lxFL7/6V29vjtTjdtI=; b=JwL4+3U0FViFDOJWw2CrbFPhOkoQu8ekp2FRLMN03jTm4t6GH4QfLjwYsZA9bG4ObJNdXgqEWru5Nzo7mpRbyhU7EZ0ffbI4QsCL+u+vryYO8Sdql7G/DVTybVr2SBCs7kpTjK36MN8HX3+9Qa8GEO3Me5u4fpwoc6Wi4oKoass= 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 1750783217139814.5258794616819; Tue, 24 Jun 2025 09:40:17 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1023956.1400059 (Exim 4.92) (envelope-from ) id 1uU6gn-0001XF-7I; Tue, 24 Jun 2025 16:40:05 +0000 Received: by outflank-mailman (output) from mailman id 1023956.1400059; Tue, 24 Jun 2025 16:40:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uU6gn-0001WN-1e; Tue, 24 Jun 2025 16:40:05 +0000 Received: by outflank-mailman (input) for mailman id 1023956; Tue, 24 Jun 2025 16:40:02 +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 1uU6gk-00006A-S2 for xen-devel@lists.xenproject.org; Tue, 24 Jun 2025 16:40:02 +0000 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [2a00:1450:4864:20::344]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id df8f0790-5119-11f0-a30f-13f23c93f187; Tue, 24 Jun 2025 18:40:01 +0200 (CEST) Received: by mail-wm1-x344.google.com with SMTP id 5b1f17b1804b1-442fda876a6so50634125e9.0 for ; Tue, 24 Jun 2025 09:40:01 -0700 (PDT) Received: from localhost.localdomain (host-92-26-98-202.as13285.net. [92.26.98.202]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a6e810caefsm2295472f8f.87.2025.06.24.09.40.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jun 2025 09:40:00 -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: df8f0790-5119-11f0-a30f-13f23c93f187 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1750783201; x=1751388001; 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=L8zvOhZvXOvF3gCKvTIhnAyw9lxFL7/6V29vjtTjdtI=; b=N/OXEHiZUzm8mnLPePAe2fItD/JrEMudJipQWS+SQsdXbgHLEstIrc9oKw513EtgHk lZ09fYqPncpgaDRQDFoFTvg8qbbRrlvmB4a4+88uTLFlXMxl8zM8LJRCEUXcSYK6Eatv nJHnuGJU9bFADOkZskNBVKiI4xC6PiGP3TdpQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750783201; x=1751388001; 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=L8zvOhZvXOvF3gCKvTIhnAyw9lxFL7/6V29vjtTjdtI=; b=ad2TqltpNfZPXF+lA9hFBoi5AEbFTeMr7oK7jeVyikXnkSrNRFhqgMkxSL45wUAtDq JCHsoCQjXYAfmk4YIB47xBsfAhZFwLTyUM74rCO6KB3mmAKvw5IVyJmF/sKy7TNfEJij bVQzBTON166gSOljyoFCbNYpVYXyVoGWg/RrEakJnbgwhcMbAJbIRo3i0WEp5/eRxdYB VxYLA6ymqyfCNItWRZcAs91Q5C7CF/dnsKoxwjEjcTnEC0U7S+RyNlYQ8HKl5EHkb/a9 OkKcMwfvZGtsaenhXXX0pMikKaX7KwcCGjbofv4ZYFTP3Ut29nLhU3oe5fqPhYQvGa+C eKNw== X-Gm-Message-State: AOJu0YxP2zSXULe+BfdPEujTzhTlAuSnfHjTc42ujUnB9T5JxiIb3UGn k3q83w47yjDj1v/pgqm5D7cDpEzuncjcLfHN5l3qm6YHCurLGX9+jgH2baPYZTofAS8lSZPobwZ Q5QJnWYpFIKwo X-Gm-Gg: ASbGnctdf53n/O+5vHFyNznEuZ15x77444QHYwK1IcR3tBx9L6FLPE0cgXHfixlIAQd dH3zp2NpWOVuqckguQ8clil2pb1Wxf832bOeQr6QXdS/tyRfSQbWlghFYInqqjcugUDWeMlbCR+ crmfgqgQmQGOEmeI9RG45/SoYOxn1GCTNhgxWJtbN5ujlAUJSu463WmTLLRh4dLQJXMuI7B89nk Rt7+ApMMqo76DGUFKYeVc/ZyEo5tyfCepdt1e8brdF0sUUawEcub2BbKP+G3hXHEpDsDEu7Ek7A fXIz0bqSYZitqi0LV1OnJ/CZ6sfAv0dzk7+mV2P7Gr127c+8BeLORhyCMiSHFw1lhRcp1j0llZC ej4Ku/vjj5F3/p7ZPpDyBsJlCa2DViS4aw04= X-Google-Smtp-Source: AGHT+IGEh75w0SXxePGB41NK4Hasuo5PBPHwu9ZhzWnvdRAaOu+/JFoOUgUI+oNuE7C60ofh3ArccA== X-Received: by 2002:a05:600c:3b84:b0:442:ccfa:1461 with SMTP id 5b1f17b1804b1-453657bf26bmr155776385e9.13.1750783200779; Tue, 24 Jun 2025 09:40:00 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH 4/4] x86/idle: Misc cleanup Date: Tue, 24 Jun 2025 17:39:51 +0100 Message-Id: <20250624163951.301743-5-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250624163951.301743-1-andrew.cooper3@citrix.com> References: <20250624163951.301743-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: 1750783219797116600 Sort includes, and drop trailing whitespace. No functional change. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/acpi/cpu_idle.c | 51 ++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c index e9493f7f577f..6c3a10e6fb4e 100644 --- a/xen/arch/x86/acpi/cpu_idle.c +++ b/xen/arch/x86/acpi/cpu_idle.c @@ -1,6 +1,6 @@ /* - * cpu_idle - xen idle state module derived from Linux=20 - * drivers/acpi/processor_idle.c &=20 + * cpu_idle - xen idle state module derived from Linux + * drivers/acpi/processor_idle.c & * arch/x86/kernel/acpi/cstate.c * * Copyright (C) 2001, 2002 Andy Grover @@ -30,34 +30,34 @@ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~ */ =20 -#include -#include -#include #include -#include +#include +#include #include +#include #include +#include +#include #include -#include -#include -#include - -#include -#include -#include -#include #include +#include +#include #include -#include -#include +#include + #include #include #include +#include +#include +#include #include -#include -#include +#include #include =20 +#include +#include + /*#define DEBUG_PM_CX*/ =20 static always_inline void monitor( @@ -791,7 +791,7 @@ static void cf_check acpi_processor_idle(void) =20 case ACPI_STATE_C3: /* - * Before invoking C3, be aware that TSC/APIC timer may be=20 + * Before invoking C3, be aware that TSC/APIC timer may be * stopped by H/W. Without carefully handling of TSC/APIC stop iss= ues, * deep C state can't work correctly. */ @@ -1082,7 +1082,7 @@ static int check_cx(struct acpi_processor_power *powe= r, xen_processor_cx_t *cx) break; =20 case ACPI_ADR_SPACE_FIXED_HARDWARE: - if ( cx->reg.bit_width !=3D VENDOR_INTEL ||=20 + if ( cx->reg.bit_width !=3D VENDOR_INTEL || cx->reg.bit_offset !=3D NATIVE_CSTATE_BEYOND_HALT ) return -EINVAL; =20 @@ -1269,14 +1269,14 @@ static void print_cx_pminfo(uint32_t cpu, struct xe= n_processor_power *power) "\t pwr_setup_done[%d], bm_rld_set[%d]\n", power->flags.bm_control, power->flags.bm_check, power->flags.ha= s_cst, power->flags.power_setup_done, power->flags.bm_rld_set); - =20 + states =3D power->states; - =20 + for ( i =3D 0; i < power->count; i++ ) { if ( unlikely(copy_from_guest_offset(&state, states, i, 1)) ) return; - =20 + printk("\tstates[%d]:\n", i); printk("\t\treg.space_id =3D %#x\n", state.reg.space_id); printk("\t\treg.bit_width =3D %#x\n", state.reg.bit_width); @@ -1289,7 +1289,7 @@ static void print_cx_pminfo(uint32_t cpu, struct xen_= processor_power *power) =20 csd =3D state.dp; printk("\t\tdp(@0x%p)\n", csd.p); - =20 + if ( csd.p !=3D NULL ) { if ( unlikely(copy_from_guest(&dp, csd, 1)) ) @@ -1388,7 +1388,7 @@ long set_cx_pminfo(uint32_t acpi_id, struct xen_proce= ssor_power *power) =20 dead_idle =3D acpi_dead_idle; } -=20 + return 0; } =20 @@ -1676,4 +1676,3 @@ static int __init cf_check cpuidle_presmp_init(void) return 0; } presmp_initcall(cpuidle_presmp_init); - --=20 2.39.5