[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v1] x86/mwait-idle: add dependency on general Intel CPU support


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Sergiy Kibrik <sergiy_kibrik@xxxxxxxx>
  • Date: Thu, 12 Sep 2024 12:47:20 +0300
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AICW6nljlkrwOhfp7Ts5A5e+chDskvv5BWkSyiF6IB8=; b=SmiPraFqimHpsTAV+Z5m4zt5h5mwRxLdTEmGYJcIspV1y/VZ9xyfvPWKd3BrSb29lluEkcKSPYyrmfP/GC8AZckGueSnC3VI+to4PgWyMynshQYokUexd7fIC6zVDCOdRfXJNbHkMC/wgTGkO2DUjS2KM7dgTz8UEzO3RdRetsuoIXumoUAGE+lVp5wCWzw0E4u+vaIlExq2NBbwAVxMwna6WievqcuzWAGgk39IrjcCEXjbPw5K9e4q2yCS1vUx5uw4M8fjyBkiOSb/iN12lh8oXVSkbIESC7iUOIlWJy46OeVFmMbJNvEKWnSb8fVwsnQVTbG8Ev1xYRdluG+s2w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=LcRTBMo8QFuHNpWpTuiUoA1wOeouSaKrtu2BwqIxIf6H2tKsYCvwuMlbkWxDUTTlq48XRDn/LiCjxwXIU3cNyPH5/HgfdBTzBneoMqe/M5EigPnceekZKCCZ/KF+i7A7yZaxVvqWnYqtkBaw2OYtbMWntOHgEWfcs2H8qx5zZYueCMc/FUjMBb07P0mJwg05dyayXZZ+fekBuqbcvFXVq/v+wst48DA/bpdPUeasY+RoPqcduTctTMsD1hj8pHaOWX88nylEXR0RDWkWI69rujKg5/GLIIph6kbUttrWy+OxLaRAALnNxQ8YFLwYlh2M7EjaWljSX6b2vpIGzaLrLg==
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 12 Sep 2024 09:47:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

09.09.24 17:28, Jan Beulich:
--- a/xen/arch/x86/include/asm/cpuidle.h
+++ b/xen/arch/x86/include/asm/cpuidle.h
@@ -15,7 +15,14 @@ extern void (*lapic_timer_on)(void);
extern uint64_t (*cpuidle_get_tick)(void); +#ifdef CONFIG_INTEL
  int mwait_idle_init(struct notifier_block *nfb);
+#else
+static inline int mwait_idle_init(struct notifier_block *nfb)
+{
+    return -ENOSYS;
+}
As mentioned elsewhere before - please don't abuse ENOSYS. Seeing how the
function is used I even wonder why it has return type "int".


I guess it probably should be -ENODEV, i.e. what mwait_idle_probe() returns for unknown CPU id.

  -Sergiy



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.