Received: by 2002:a05:7412:9c07:b0:fa:6e18:a558 with SMTP id lr7csp452588rdb; Sat, 27 Jan 2024 14:01:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IGLhuS0KDnqjoqzqUdn0BbEGrLh+q6BiLM9rocqvkU2bp+o9T5smETV5n7/1qKVIauFelrS X-Received: by 2002:a2e:7009:0:b0:2cd:1366:4aa9 with SMTP id l9-20020a2e7009000000b002cd13664aa9mr1990625ljc.25.1706392884696; Sat, 27 Jan 2024 14:01:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706392884; cv=pass; d=google.com; s=arc-20160816; b=Sk1QoOHB2toe1wm2oGDhk44mETeEFC6e5C/8JFoXeCRpeo650OSTIPMm5WKSMw4zfm 8KKYdZsI/8cLmJ6q4Z4I7/NVImdsDAYaMlGPPcRz6OFmYJt4n3AM72Sdy+ZS6L7ZtCiK RoxK1Tr4Zekff2f6iTYSmfXZoZ7V5ek+A3Qm2l2MBzWhUWWbiA+OnE6Uonq+JTnm5mV6 hhJ8NkiH2vDQtFdVLmqTTlSvZx9BgS2yu3RYnq1vICubGfnmzt1dNTuklqN2bZXLItuc 7T7Mq9Dm2x0eONaU6l4gP7zUnJ1Rfwmsj+epkK+z1t/1buz9B+KlGoA1ksA33H0jlQW1 Kf4w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ii3UVKla0HdhopQfv7RdNzt6/guhlT5KZXFmTM3eH1Q=; fh=t+jScIUA7/jzXNJL4jj8X+jKRfA9+AUyvUFJMNvu6Lw=; b=tEl2lNGPWWaShzIbb5+ijGBmkG1fGP6CktA20gCl+WEO64DdIl/6MvAAne0FHIRY0v GU77UpzZNZmfxkm5wiBAq7LNJc27lvC1uQaizNR8DQN4+7cCIG0wsE9xXGidTv7xc3Su SxZhMwUbiNspz/u9tiA3po776E0wloW06X64zXj+2U/hMVHP5kLcA3xpWF+pe01r/2x6 AII6ONeDN2FCwadbo38pU9Err9bKVDasbQdu0Vb9ZTzX+yKHl3BYY4spqbliaXXWeVe6 Ds8UpFAE//OyATNb2TOTCoOXGytNoHtM1wHNCMCIVoWbREW/ulRj77jQoiA7ea+Aa7a8 +MOQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KY1n42pR; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-41376-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41376-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id fi26-20020a056402551a00b0055a9b4cc9e5si2109364edb.213.2024.01.27.14.01.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 14:01:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41376-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KY1n42pR; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-41376-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41376-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3CC261F2401B for ; Sat, 27 Jan 2024 19:35:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7750D2E62E; Sat, 27 Jan 2024 19:35:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="KY1n42pR" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 428E4B665 for ; Sat, 27 Jan 2024 19:35:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706384149; cv=none; b=kc3uy8bwc5gd9XPRIgx75lC4VA1j3Gq46frUEh4nIcvF8ToP8Yu2m6Kx7Rihpfhu0OHIH3Nqxkuxdd1HK0Amimwh3kpn1nQg/K4bsBmHnsIKfocYuzh5dj+4gGxN0kCLAWfHG1i7O+4gG+zj6/Z7gQ4GBNIxKJQfRnp0OWHZYwc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706384149; c=relaxed/simple; bh=JsNjDeEosD68W82IVuf9LcDq0mJQmIvRYnUGnYlOl5o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uDkuKLjHKS/J4VcjRvBWzkX+bFC16/Iza6BHGRASQqDl4o/DMtQ8GgdXVVbFRwVIubv5cWV3yukwKOufkFVDo3J3GHtg1c6drePNKk/0hnw3ss+LXGz47rp2zoEZZyKUloTejyvSdS0awQeTmfY+EgVyouWsSSGubAV9u+wcYDA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=KY1n42pR; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706384148; x=1737920148; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=JsNjDeEosD68W82IVuf9LcDq0mJQmIvRYnUGnYlOl5o=; b=KY1n42pRnqWZGCl3hAfgZS8po/RzROOdaOBw/VNiRu+JC57iG4rkuzB+ CRtdEwQMfXIpD60dq/jzauNYrvJCSTBjDQQ0a24xYsic+1QADHG8gHD0M E69ieG47upBoZMJDHtWdkWuSjTm3v/2kSvXspQwbCaQnL7CMJj0S8Hw+N 9LidgCWXVHmfYlhU2RBmp3//LxSbMSLijGXQcZ6COWuBLUx9gaylZWN45 lx0lF9PvfW2i7g1X0rPplTn7UZvtQjy0HDZvnrZ9r2Aa8YO7CvI5iUbx1 ilh3Yx5c21734Z5U+hG6WXJNQuQjOY9IOCEYJrr2fNTPRIJnxWt+16FOI g==; X-IronPort-AV: E=McAfee;i="6600,9927,10966"; a="16071603" X-IronPort-AV: E=Sophos;i="6.05,220,1701158400"; d="scan'208";a="16071603" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2024 11:35:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10966"; a="787430462" X-IronPort-AV: E=Sophos;i="6.05,220,1701158400"; d="scan'208";a="787430462" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 27 Jan 2024 11:35:42 -0800 Received: by black.fi.intel.com (Postfix, from userid 1000) id 21D451F1; Sat, 27 Jan 2024 21:35:41 +0200 (EET) Date: Sat, 27 Jan 2024 21:35:41 +0200 From: "Kirill A. Shutemov" To: Kuppuswamy Sathyanarayanan Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "Rafael J. Wysocki" , Peter Zijlstra , Adrian Hunter , Elena Reshetova , Jun Nakajima , Rick Edgecombe , Tom Lendacky , "Kalra, Ashish" , Sean Christopherson , "Huang, Kai" , Baoquan He , kexec@lists.infradead.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCHv6 16/16] x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method Message-ID: References: <20240124125557.493675-1-kirill.shutemov@linux.intel.com> <20240124125557.493675-17-kirill.shutemov@linux.intel.com> <4aa2c961-a0dc-45dc-b996-57c8468660df@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4aa2c961-a0dc-45dc-b996-57c8468660df@linux.intel.com> On Fri, Jan 26, 2024 at 12:03:14PM -0800, Kuppuswamy Sathyanarayanan wrote: > > + /* Don't wait longer than a second. */ > > + timeout = USEC_PER_SEC; > > + while (READ_ONCE(acpi_mp_wake_mailbox->command) && --timeout) > > + udelay(1); > > + > > + if (!timeout) > Nit: IMO, since you are dumping failure error message (not timeout > message), you can use non zero acpi_mp_wake_mailbox->command > check. But it is up to you. I think my version is pretty idiomatic. The same pattern used in other places. For instance, test_nmi_ipi(). -- Kiryl Shutsemau / Kirill A. Shutemov