Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp539415lqg; Fri, 1 Mar 2024 12:49:09 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX3AW/Lqgk433O8ZBILfZOPo+ca3vOSFXdTWNMJMEC5dY0Dx3ep556uZM1Bvh2VLubPLWVUy5qjE8uV9258Yys21eJPvO3D6L6K87aJ0g== X-Google-Smtp-Source: AGHT+IG+8YLIP6YNW+Czrmhoz83Ceu3MwqK4LmMcOx4bLsm3IYyhglqgbW3iahVNbix8d2F360E6 X-Received: by 2002:a05:620a:460d:b0:788:f0f:952e with SMTP id br13-20020a05620a460d00b007880f0f952emr2776937qkb.5.1709326149687; Fri, 01 Mar 2024 12:49:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709326149; cv=pass; d=google.com; s=arc-20160816; b=0AMJNM7TElt0C/2+rA/UGKYl502Z2nt88UQkOYJLsOSM3SRgu4/+DyU4Z7tK9GTZiX A6sbaFqbT29Ccf2iwBTRydNFJw2F1CBy9cHIB8yhO/ZqjDzd55wmRPajk+NUqlBsekEt I6jzR8/5ucqFvJkHGhWrwpLSq764Cg90V9KFFD2gO7akfMygJSyub3xUAdIkJj5Kd+34 1NOPGeQNcDfu82uREFFpPKJlkc0XT0DDj2YxGUDAa0ki7PZ+xetLoTRtIYdtUbhkp7kc jF+MwbSwGU4hBAHVntrSY7/KS0T8vwj8tKA2qrPpJXAaEpPO0SSxDPx+jnZnlu1PXicO LKdg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=VPt61NgyrrVAT3ev1oj2xf/IZRQk5WLtiQKyFPY39cM=; fh=LWlv3U+xZ3+vQt4tlJRIlKl5VzN7iFjjE/bzRmlxKDA=; b=DoD8CXOdABmc0+Z8YkHicQ+tm4k68vzRf09q8kksmmomVAu/uWZKrmCB4YcDAN42dH h+2+/RBAKk8ewgNfIfsXMcKJHmEHkIM8OTQRhJZsP9UQknzzjIzO0cgovFdJ8xWBfvsv bzCHR07Yay2NmhC1+dIiAo8HsHuMtk+Dk3zS4BxjCrpRrGOsaW6Iutt3hY+U64GtyTqF UqrzsImYIQpWeS4X4qdwERDEInD+FdYh+kMpCWCGHOE4jsaj39ClFDLCG3orF0Egs3uc qCCja47RRMhpc6GRW3OguFeLNc9jSkhz6AwEQD4Kckwl1xjd0Zk5Fw+dy/K2spBcIDNF P1yg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="elYG/t1N"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-89114-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89114-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id wl22-20020a05620a57d600b007877b56f3b9si4229836qkn.592.2024.03.01.12.49.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 12:49:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89114-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="elYG/t1N"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-89114-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89114-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4EC1D1C25135 for ; Fri, 1 Mar 2024 20:49:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 686D656460; Fri, 1 Mar 2024 20:48:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="elYG/t1N"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="LemgOSdq" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 207EF537EC; Fri, 1 Mar 2024 20:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709326128; cv=none; b=BsMgfnwIAyn2lVDgIkD9toWf6Daj0xZELdg5LBj4Nv+rhqQqkvQyaPDP1iCoUJ4uW0ks0lnk4cuE2LegbaUvyTBWM0SjCTF3e+VbSlPHa0FgW6nsxR1gKRGJ/E+0zgPu3W/c+OrgYZx4HQnZrTvvfTv2/LggTerpSSz7ejInKz8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709326128; c=relaxed/simple; bh=AmmkBhmavhgPhD/NMBu+VsLPjLOw/ch4lurlwmfpego=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=GJ0qWCPJLwZXMJEVbsf/wCJp4uaio15MADIYH2vXOwUh9vhR0JtdhlriNyuYC6VK9U8en6Ic+/zvInRLaHxtNmU6uJQ3LI7SaJHfqGr/tOU4N4H8GryQxSGXj+cYoVk/SuV8+Cn8YZUurXWbb5zrTDdiAOk18/P3upti5objkcY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=elYG/t1N; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=LemgOSdq; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Fri, 01 Mar 2024 20:48:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1709326123; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VPt61NgyrrVAT3ev1oj2xf/IZRQk5WLtiQKyFPY39cM=; b=elYG/t1N2EFRfsPhOjljmn3Dg+M1E0eKrbp6sgAAE8J573iKHsHIn8fhaG2Sk3F5XU9mzF 9i3YwxFaoWW+KQdiq408GYwB0L9tM51rrCJ6ouZTKQfbWbIRgTx0wUX/qPcOaIWcOb0PRY G3Gc99u+aXxvzsmRl/QSgIFTcocoFIgfu+acxt0b9XEz92GmdY5ZGA8Gn/45mxaO70s43G 5L3nJO6THO74hpqwg6h3OUnmInCQjB1mYiymJjRGzmFbeL9vuRc+j1b2Jdq/8n1qnx4IJy gLRQv1NqNaY2LkYfRF8VIlz2SgFg5hBun2CraMU06BG/4PVbyVxrqFguAF8iFQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1709326123; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VPt61NgyrrVAT3ev1oj2xf/IZRQk5WLtiQKyFPY39cM=; b=LemgOSdqFP7GkvLGKApUd4gHFRCZrBstamgEHYe/64l4Yv/Aj5gPna9mbwep8nblZ3B66W QPcDwEanyV6NKQBA== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/core] x86/idle: Clean up idle selection Cc: Thomas Gleixner , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240229142248.392017685@linutronix.de> References: <20240229142248.392017685@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170932612275.398.5909023853768866399.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the x86/core branch of tip: Commit-ID: 18a9f4806dcb33ed7eab93232d13facf5c6e2b70 Gitweb: https://git.kernel.org/tip/18a9f4806dcb33ed7eab93232d13facf5c6e2b70 Author: Thomas Gleixner AuthorDate: Thu, 29 Feb 2024 15:23:38 +01:00 Committer: Borislav Petkov (AMD) CommitterDate: Fri, 01 Mar 2024 21:33:12 +01:00 x86/idle: Clean up idle selection Clean up the code to make it readable. No functional change. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240229142248.392017685@linutronix.de --- arch/x86/kernel/process.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 5853d56..b6512f7 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c @@ -910,11 +910,13 @@ static __cpuidle void mwait_idle(void) void select_idle_routine(const struct cpuinfo_x86 *c) { -#ifdef CONFIG_SMP - if (boot_option_idle_override == IDLE_POLL && smp_num_siblings > 1) - pr_warn_once("WARNING: polling idle and HT enabled, performance may degrade\n"); -#endif - if (x86_idle_set() || boot_option_idle_override == IDLE_POLL) + if (boot_option_idle_override == IDLE_POLL) { + if (IS_ENABLED(CONFIG_SMP) && smp_num_siblings > 1) + pr_warn_once("WARNING: polling idle and HT enabled, performance may degrade\n"); + return; + } + + if (x86_idle_set()) return; if (prefer_mwait_c1_over_halt(c)) {