From patchwork Tue Apr 30 18:37:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13649852 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (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 9E77D194C79; Tue, 30 Apr 2024 18:38:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714502311; cv=fail; b=m91NVfwWhQNmrl/9uRC1zyGwcBQBbb0j89vGF+naCBuY96sDfhmoPGbUVNf4/UhFW71BLh/bSdTFUhQmccZlmbYELDHnAwI+ZxWM2tyUc6FXTQesZG15BJWfbQ4E/6bg52oECsg+oLdQHpb9Q0UvLaFdR6WnOyYLuQ8AywYajJQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714502311; c=relaxed/simple; bh=1tSPop/Aa40C5eMqd405zd9D5szO6qZPEGJ47AVD5Xc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=UXWnZ/Nbe6DLt+N6NuLPlO3iowjWdEdmqxtmezfXpPe45SB1V5hKEkaHDOW8S6kSKXtgu91c9C//f9jy6Mc233sFJypSMkTaT4iT/ge+KqwH4NSuXrtna8puOJ7vFPl9SzkNZpSGqWHoU08a/5lh6YZeq0RDibzTWFVD+c8dcPU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=AVxZ2szj; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=bDSJZHAM; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="AVxZ2szj"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="bDSJZHAM" Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43UHIhsY012703; Tue, 30 Apr 2024 18:37:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=PFKGe3msmS9uypHg1D4NVF1g24szXb61m885m1UIas4=; b=AVxZ2szjlL4LiGM78wePEozoPWZt4kIMIDJll7DaCvteGKIGtoDb4t311UY3qExXdUhd +nxeCyK0Vy2yWI2CINFlSqedPTs/P5aA6V54s5ZkT+PK+rIvNCmIrZ2s0lIFlFfoetSy u4Xg3mj08RzUsP2g09P4b9qbYdIP1rXnosGlW1uhCYkOVlQXioZBN/WObI+hJl6JBDb5 ckPPBDhBvrosXSpxlmNI0jbS8B92/vpxPcPRYsiVk+uW6fas7inyLCW9MzqqpPaoZPFj PrqISrW2W1NI0khjqVg1nSdRQGQ4r911K+ct32bqSkZxXY7XoC2EZepBxJqdPLp9LykS pw== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3xrqy2wxcc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 Apr 2024 18:37:47 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 43UH3kuB016678; Tue, 30 Apr 2024 18:37:46 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2101.outbound.protection.outlook.com [104.47.70.101]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3xrqteckhe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 Apr 2024 18:37:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JSSj4E38oe60WvtCj1SG7aL9A7iSfkR6lb1bT7dTwM3PQLszrCycHffL7B66l+JHbGyXe+nbWpxoAjQsds4dzVb6MumV2/xiZ2RX5UT4WPm0la5A3n0wVHxMnXNkgfE7IhC3pup8ceE+2ZimsRRR4cgwVH+mFMTfwSIDs8bE7iym/QttH5WOI31i5QcSPBFHxXnlYEpOHpdEjMMn7I5dhTHrAR2sDmgDcI/l4QRJ8RI5L7kVC4bFfFWM6e5R3Zu3YFLN/t9Jg2ioUDnRGY+3K/R17+rTVXphROcYhDK+ApY6BvxkRvWG3/+Wy/PNRcznyo9EgiPIf3Cf/JPnIwcPqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=PFKGe3msmS9uypHg1D4NVF1g24szXb61m885m1UIas4=; b=WFJ4u2oN0p2miHchSKbt1DZl1kHl+XlLg6BccYLOuRqeb3LUxqPu5IkBO29fM+fvs0ihCDYSuxcs/G8n3z2uxAWizR9ffYzC9jsHUGp8y1QENxVYiPFueesM2hKr4DAT2RAHuHNJHtfjgs2emHRuXxK9+kB3mWTXp22CM8aZNBQyExemL77JA+12c1ZqRwIYatyB9vevzQh3I35OMdhCu5dZpJwn1XIR2ZH43OGMcGfMZu229AdWvUlmIzKgvCtvRRhrfCREovYGdmLEbnO57PRRNpsx9qTZvsRJ8vq+u+MP3SFa37j65v2Icso4WH2NTQToRC7aMZFnM6GF73VdUw== 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=PFKGe3msmS9uypHg1D4NVF1g24szXb61m885m1UIas4=; b=bDSJZHAMRWt/1v02dvr28bIystqLbRMhay5bsbGotM3WzByZZEgLE7Lt9hIQGmVDpBTIC3ZNBR/RSbb7DvNldl8DBGuUj4FofTK01fyv0hV72vo2lkjeWTFzaSYmVBk6TH5cbFsB/hwAyomnBKtOBdSEk2pgiCeXYqnj+pNElCw= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by SN7PR10MB6308.namprd10.prod.outlook.com (2603:10b6:806:270::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Tue, 30 Apr 2024 18:37:42 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::4104:529:ba06:fcb8]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::4104:529:ba06:fcb8%7]) with mapi id 15.20.7519.031; Tue, 30 Apr 2024 18:37:41 +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 Cc: catalin.marinas@arm.com, will@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, pbonzini@redhat.com, wanpengli@tencent.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, joao.m.martins@oracle.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, ankur.a.arora@oracle.com Subject: [PATCH 3/9] cpuidle-haltpoll: condition on ARCH_CPUIDLE_HALTPOLL Date: Tue, 30 Apr 2024 11:37:24 -0700 Message-Id: <20240430183730.561960-4-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240430183730.561960-1-ankur.a.arora@oracle.com> References: <20240430183730.561960-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0130.namprd04.prod.outlook.com (2603:10b6:303:84::15) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|SN7PR10MB6308:EE_ X-MS-Office365-Filtering-Correlation-Id: 0f28dcc2-dcb5-40f6-e168-08dc69449e51 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|366007|376005|1800799015; X-Microsoft-Antispam-Message-Info: jAVzqO66WwhlLyb5tq8OlEP1d3+RZQxNlLniN5S3CfnySjtcTLeyMRZX+AsGq6WNTWv9D1bYf5xC0s+g08jZyrffn7UdTb1kdtlkT2QxDdueOVkx4/kRka8/yz5u0fyszT2hp2MwYEqxBEfvQZCHRb4NnZhCmskupyKQwfPnGgg/S0yRLmv7FlyhxpDbEaIM/cTVEo1gE/Y/LtMOCzLH7ZPL3bDd/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CLsidmA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(366007)(376005)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: g8Y9twu4ewG5T437auRGiw8sI6v67wkJxDyezDnQEwiL+iDbbsK1G8onuL8JKsiKqrjmt4sm3SJo4Zi4CyawIYisLs4xJDyHBICxUQAyUP8dT9DlDYgA5JwgBWMItk088fxKDh1lQfPy+uDiLdbaEMSl3dr0ED8TYxFKIsy7LJowN6US5YajyoQsi33PR6j8VlAjdsLUYRun0cSjSmTEmQah04lZHkZiXfRPITjDcUk1YUbiIfvbev6IMSt7D+aV8gp+/pMT5fLzKfbCBiLSQiUVKZharFAIusDmm1qlZr7N2lHpJK7y3vb0HXNU0AlNbXBq2BO7bz/A5+Ixsq+IzKabFKbWzQQxBnncjV6219yb4nb2aYeUjvRyyG9vvzyFeHXpbigTq+O5V4xDuQdKa2MnD3BoAsquhlAvWKz8uN0CYmX4K0ofk3HM9HrRz8rsglOTmRN8AcQxlfm5rjesFJcPiWeg2pMl3QQI2B0V7GbPwX2+c09EGLiz6/ipt+lVt9ZyGNGxXqV7XvKeEKybjP2nQNvHYU9bbVH1A7JL1SMsC68ZwPZsf+qd1xch4d59Gh4hSEBHIeoTcs1rr44y7CfQlamipT2U/meyPdYBrcQzsHWPeVoRtnk0SoR7EhJjhbPbMD88n1Wc89YXOxby5SPG+yTFS5BZpMFdUC6IUEd1h5HRzHYqTJbSGkjIWXCRGHf498B5l4cN26gP0Qkg00G9aGwyqyioDLrBMNVRHk+iw3h0Mgkk7OBlIIedmo3G/j+doz+V6y8aLHoQKKBGeN26+WT0wrpD3NNpILJzLgeehjxVaS6JpubqTmYmB9cJJEPTwXSsdNJWn3qEjmHepg9Ciivv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OgivjsYqjdR1QQUWCvS3Hyfb0omha0tV1MVbfdBheUK3IdmVEjQwSjYfDh/Rhgy4GeqkyaFL+CTQ/5o8ANgaCq0SWvGl+1TqPsvth2bdME9o/MK1tkOzqF6q0VVl1/7Wfk5rwScWRpQVAl5XaVJvxP47QVCA4+bEcvc3cHNlwdNeZ47vHVqFCvOd0RvOkG7LjaQGlYKsxoElezAemXc/KaRXdsTWirYbnmMR659H+obeK4B5BZNVDptOBxdcJ/xA4j7kXvbT76U3gJZQJCCwvX8wVS8CJ0VeXraHzOPVy53E7jAOdI9pSVZTgYZsNDvWUSU017EhPa+TEBUsZtW+1Uow6UehlkP7leKFXG5dApRfyiKaWAs= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0f28dcc2-dcb5-40f6-e168-08dc69449e51 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2024 18:37:41.5612 (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: W8MZdkIGkZPFzPeVkv1ic5NottTU+i8e5cDg7ttJ30qTOfq0yGYGI2DeYHBL90hsvoCcRF5c9JBT9BtePNohVUxRW75XwKfL14zseTfv9xI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR10MB6308 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-30_11,2024-04-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 malwarescore=0 phishscore=0 spamscore=0 bulkscore=0 suspectscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404300134 X-Proofpoint-ORIG-GUID: _0TmJ7kzjgoAimFU5vVoQmCnp4D64Ffl X-Proofpoint-GUID: _0TmJ7kzjgoAimFU5vVoQmCnp4D64Ffl The cpuidle-haltpoll driver and its namesake governor are selected under KVM_GUEST on X86. In addition, KVM_GUEST also selects ARCH_CPUIDLE_HALTPOLL and defines the requisite arch_haltpoll_{enable,disable}() functions. So remove the explicit dependence on KVM_GUEST, and instead use ARCH_CPUIDLE_HALTPOLL as proxy for architectural support for haltpoll. While at it, change "halt poll" to "haltpoll" in one of the summary clauses, since the second form is used everywhere else. Signed-off-by: Ankur Arora --- drivers/cpuidle/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig index 75f6e176bbc8..c1bebadf22bc 100644 --- a/drivers/cpuidle/Kconfig +++ b/drivers/cpuidle/Kconfig @@ -35,7 +35,6 @@ config CPU_IDLE_GOV_TEO config CPU_IDLE_GOV_HALTPOLL bool "Haltpoll governor (for virtualized systems)" - depends on KVM_GUEST help This governor implements haltpoll idle state selection, to be used in conjunction with the haltpoll cpuidle driver, allowing @@ -72,8 +71,8 @@ source "drivers/cpuidle/Kconfig.riscv" endmenu config HALTPOLL_CPUIDLE - tristate "Halt poll cpuidle driver" - depends on X86 && KVM_GUEST && ARCH_HAS_OPTIMIZED_POLL + tristate "Haltpoll cpuidle driver" + depends on ARCH_CPUIDLE_HALTPOLL && ARCH_HAS_OPTIMIZED_POLL select CPU_IDLE_GOV_HALTPOLL default y help