From patchwork Thu Nov 7 19:08:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13867011 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 400A7D5D686 for ; Thu, 7 Nov 2024 19:34:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vbxLcRDXwMau6ojZuyq/zCmmjpfyFtoL4t1auecO12s=; b=5BvEAE3S9k9CjXduRmNRJry3z8 74mO7EF7VLHyPVAMjIIHbUu3peiolrt+brfIosMwsUN3JvQmFeWWW3EC3B1TNKJoeVF3S9xkQuuJ2 NMf59iFE5OsXEV9Ff0zy9UWWvBFjMmm4XHOCb+UQ5Y1I3mroC5/MJvv+QqfLwMkCLO6ZnNXizBR5p 9YpkWdomWjZrTPSrxid/HT7YsP/OoLBOJYSfHkaWGy/fhEOFae09yZFX84UXFxXeTD1QI8kKzHH+E /cRCf/fwKaR0evT7Csu7KvbvxDBg3eejdox228Vcpp06ip1Quyi9KLwknZdqMg0kFOXa1LYKAEmwB v2Eflswg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t98HI-000000085ut-1NHl; Thu, 07 Nov 2024 19:34:48 +0000 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t97si-000000081G0-06rW for linux-arm-kernel@lists.infradead.org; Thu, 07 Nov 2024 19:09:26 +0000 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4A7HBgoh004777; Thu, 7 Nov 2024 19:08:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= corp-2023-11-20; bh=vbxLcRDXwMau6ojZuyq/zCmmjpfyFtoL4t1auecO12s=; b= JvyugIT6yY5ZJv4nZ3OuS/ze3NLtBbSumtYaJweln09jFkKGoGNbSyN3QTaF4LmJ pS9qmCURkTsczP6mtoMNJ6gbhT39QTeF2h6zP2pB3+I9gkaKm9iNPSAitCvelVVQ kX4aPujzJTtd6NEK9UPqiZyddGhaMIQ0CoaqxPWywT+/7ZiLU8SlqHq6mW0O/Kzo SkImW6rP00ukU+euCtMvrTgF9x4AWaZTpkb7+fttnE23pKFZYHcQf6HLIFqxybRu pXOULLIcBnV5PqVn/pyfRSJUf7291K9DsC3U+jRO4oHRlj3KDIcic2HPm/ICP7xc dVg1hISwPIWxVm7712Kvug== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 42nap03d8n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Nov 2024 19:08:57 +0000 (GMT) Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 4A7HuoFO031413; Thu, 7 Nov 2024 19:08:57 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2171.outbound.protection.outlook.com [104.47.56.171]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 42naha6cn5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Nov 2024 19:08:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jHYU7SuaOZjJrvGAewVU4vHppufYR7+3ucTqKmo2RJTOlrPEmCSVvopy0BA7XtMPXCKtmNhV63ODn4Z7tVWLb/xK453vKWT3OEnmhcQD5pILeHnXAgGl2q1+D8+wnI4BjV+0/SzHhfRG6ve9UQUdPOBi+BMh9oYlo/cU0/o/vTlEiZjXj2IQZQLXzDbX9UUScdUa6YqIGPHGp3FWy6DM8xYC0+xZVa68gcvRcAendtkoeyJPp56h6M9ln+xYsP9KbGv7FAhYzKEUH1oqydOBNzeB4/Ug80CHRb8t93lLmQ2aUC2BMSlYPXJAcs86riZHVL9otbihCiwsUPpRjag1lg== 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=vbxLcRDXwMau6ojZuyq/zCmmjpfyFtoL4t1auecO12s=; b=XPvrIIQQV+w2g39xrH/bUZByDz8GyN3inpLKCGT1sxGUkQDkriVK2pYhm8w8zM2BawJ1tzPr9GP5O1Nxy/0Frc2Pp1Aqcemp58jjaTzXFlrSIDh9qZdvJjkqgSmVi8SPi80We4LVieBllknWHVsiCsneOwlEyWnQRxQbzv+XXw4LtPN3dU6I45KmOnI+R6ni6t7zdRAqB5++0Hjeu51+J81GexO0VYL/zbVpAEgoa/Je6y5cV5hqIeMhrgtpaz1na7d0nTytcFjdcAlTkTwpfVh86b71wh3D5rk9kUqOQJKDVb3AdFAI5mxheAPnig11XY4ETRlfyzCGgy2ES/5EVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vbxLcRDXwMau6ojZuyq/zCmmjpfyFtoL4t1auecO12s=; b=QYyJ0E0WWrNRvrGG/IcZrrpd/vB57sE2K6/4J+t8LjzYAk6FBT8fqzreHIqPkFg58LHojM1AYd0SpveMnVnFlmDbq9+H0jAaWJ3os7NWw+WEMHFwUTijTFROnPbAjNDIorXgCgCLJJzcYMf9wsiezSPjiEAdDY6o8tHocw04yA4= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by SJ2PR10MB7736.namprd10.prod.outlook.com (2603:10b6:a03:574::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.18; Thu, 7 Nov 2024 19:08:49 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::25a9:32c2:a7b0:de9e]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::25a9:32c2:a7b0:de9e%5]) with mapi id 15.20.8137.019; Thu, 7 Nov 2024 19:08:49 +0000 From: Ankur Arora To: linux-pm@vger.kernel.org, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Cc: catalin.marinas@arm.com, will@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, pbonzini@redhat.com, vkuznets@redhat.com, rafael@kernel.org, daniel.lezcano@linaro.org, peterz@infradead.org, arnd@arndb.de, lenb@kernel.org, mark.rutland@arm.com, harisokn@amazon.com, mtosatti@redhat.com, sudeep.holla@arm.com, cl@gentwo.org, maz@kernel.org, misono.tomohiro@fujitsu.com, maobibo@loongson.cn, zhenglifeng1@huawei.com, joao.m.martins@oracle.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com Subject: [PATCH v9 10/15] governors/haltpoll: drop kvm_para_available() check Date: Thu, 7 Nov 2024 11:08:13 -0800 Message-Id: <20241107190818.522639-11-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20241107190818.522639-1-ankur.a.arora@oracle.com> References: <20241107190818.522639-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW3PR05CA0021.namprd05.prod.outlook.com (2603:10b6:303:2b::26) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|SJ2PR10MB7736:EE_ X-MS-Office365-Filtering-Correlation-Id: da8681c3-1d68-42fd-cafe-08dcff5f9c87 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|7416014; X-Microsoft-Antispam-Message-Info: p7DBvckTMLZ0nFbzJij0clM6HDhC4QGIDzXzGkgPZAuwjLKkv4VrdTjqs4MHwJxE8mIknSQASV5hnL8/adaj8cSJrg2th0KoPFA/dIG4NtsCrhickFp+ij1CbQCt/INF9LeMwyFJbGFLQpuhcW3qnZpr1sjt/C4uv94KDsFjpyX24QhcYPC58RFx+yvrdSE5Qmrs+0BhH7yydbZbdDev8W+ChvkXKSKbv7f/7OxDc09D7HwO+H1/J/6PU7Ltf1VdJZmVVC8JBm+WIZmqJ3ZconX1C/uJymt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P:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(7416014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4kgiDIvdF9LLBnqtepMRCwW3usphjX5b8PP7zYT7/2lxStC8LRvDG/8mwdyD0JnInhkRBY1nAC85CYtsOQ2sP6QcfcpJmim0as69R19dq5gUUwyUYIit/eaWch8qIV9xqSs2EOxrgnFt3nL4sDKEUiacMuKvd3t1sB/OUlSHkTlqlyMvjxLbatuiKdeDvdKdBNhM0LIvOP3iHaRfx5+xGrvXf/knFkpzJ+KMgSvxubmGKRf39QC+5MsqZTZhqzyQ5RoBGRXWP4MG8fWbfevSv+2DeuMnW/kgsDM17c/N7VqB1Hfzfb1XvpX3sDN7XTGLiugi/3YteyXgvAMukyZ3V0qJWEYQRWoYZU9iQUA4mdwJTKLj1wyF80BlqhNKYG6QPurOI66E5gxlGmtB+Enz2wBNOOTijD3eHDUNCT+/M0WgJh8Q30Q1NcBvcE32fGqe4aJfj3918RtT6hlmPrK/sgO1KkciAgoEEgUe1zU2gEclGE1sMsgqKAi3FmOr19DbJY52MhuU5RBKM/ySG67K7XlmDMx8+ttf5iKIW82jWmlFEteD4yVpFZGCrCsULyxEetrV3FadVWBcgmWYLea1QI1ZBTG60viSvoFJ5PbM818X/JwT54SoXMzFJ93vqi8K051+J2XjKf5xnPO+njB00R9G+fDhvSXpNtLoqU40dJdSuQYVsEnFv6r+dePocNXtwnxes5+mlW/KEQAS+fOjL9EZyFdP2lEClS951GVgv32An1X10jmCpALamDG/y9vw8OHr7LXh9s/PIVhGyChwaj9gawA1OcdcqhdM91vwI4WM01HIpZx57RCs2HfE6J5T1ikIL7zTdAmUH5MAUD7n+46BFkSZKGXPevtQmnx1VyIecTPjIHQBRGBYU4uWlmr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GWu1gEPOdpD16i6JMN7RpiarrFEWaapMNjUHTXS7qfBCQ4vLSFTCFfwujhKXWdnWTz6lG7YJ9RJH9kSI+rx30hZoVr6IyEK7vzsGqekmqK9leDoM9lKPklZKzNEpBMhblZ6cwMBBmS5V4bHjy/ShlhqlWyRFR/nZB7mDGXbqhvIn/Bbt/nKPlfmsiSs2cDPioiXaC+oFiA5NHnMvAhhwYlPVUuTW846Zg9PhAXsGmhCqMwYQkVCba9INs9GM4AKIwbFuUo8XY3WHfZXwAIIbHRksCAzJWwhuV7tv+aKRAaa6juODZnsftioShcSq+1wZplsVn65Gs5CxHg5jhwvAAEbJY0= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: da8681c3-1d68-42fd-cafe-08dcff5f9c87 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2024 19:08:49.5254 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2qpYzJIW1GWJt/qteBKNw70H8Hi2hXWa0C7ZuhvBbclxIfJwxWXZz7ZKMeHXtE8Vqwse8T07HhtzsPZD9mRkDYK8Sywlt/wzMgGJ9/EPJ8Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR10MB7736 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-11-07_08,2024-11-07_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 spamscore=0 phishscore=0 malwarescore=0 adultscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2409260000 definitions=main-2411070150 X-Proofpoint-ORIG-GUID: mvbRESuLZ7okeDC-4lhKifUqEaBRIEns X-Proofpoint-GUID: mvbRESuLZ7okeDC-4lhKifUqEaBRIEns X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241107_110924_092640_F257D8F1 X-CRM114-Status: GOOD ( 15.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Joao Martins The haltpoll governor is selected either by the cpuidle-haltpoll driver, or explicitly by the user. In particular, it is never selected by default since it has the lowest rating of all governors (menu=20, teo=19, ladder=10/25, haltpoll=9). So, we can safely forgo the kvm_para_available() check. This also allows cpuidle-haltpoll to be tested on baremetal. Signed-off-by: Joao Martins Signed-off-by: Mihai Carabas Acked-by: Rafael J. Wysocki Signed-off-by: Ankur Arora --- drivers/cpuidle/governors/haltpoll.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/cpuidle/governors/haltpoll.c b/drivers/cpuidle/governors/haltpoll.c index 663b7f164d20..c8752f793e61 100644 --- a/drivers/cpuidle/governors/haltpoll.c +++ b/drivers/cpuidle/governors/haltpoll.c @@ -18,7 +18,6 @@ #include #include #include -#include #include static unsigned int guest_halt_poll_ns __read_mostly = 200000; @@ -148,10 +147,7 @@ static struct cpuidle_governor haltpoll_governor = { static int __init init_haltpoll(void) { - if (kvm_para_available()) - return cpuidle_register_governor(&haltpoll_governor); - - return 0; + return cpuidle_register_governor(&haltpoll_governor); } postcore_initcall(init_haltpoll);