From patchwork Thu Nov 7 19:08:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13867015 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 6AD90D5D683 for ; Thu, 7 Nov 2024 19:42:10 +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=fakUqzDmzaD3RTe7NO+yLwk8t6vTIFFk5+sqvN+b18w=; b=Pq3H6uRQAiDGlDPghqb5hJ2AXw OKVfMwSuts3uonAvV/Ny0cOsbAlzzzor8Y+EPSMI789VO8VuTQuZM38O1AaxASAFomh7G5HCF218t lCF8YeK9qV97WTXZTivXqeVhHlpcyTmwHQn8zvKPO2e0rNBO+/ctiJPjgMCeoOzq1WvI9JFxBQ7PI ip/oSfSqmfhBbztxBA6Z1kujxh2N+aSukDYsgQKdKYkhW8pBSj+HY+jPoCENWPuK1Vi99Mk0QfrNU HjVm7pkC6zioia4B3hf3ggj4+hja+C/iWmdLT0XTQdhc4h0XcWZvWCmwVR0C74eKHXi1+stpZ8ZwT Xqs3SKgg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t98OF-000000087Lk-47mR; Thu, 07 Nov 2024 19:42:00 +0000 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t97sv-000000081Mq-3MZo for linux-arm-kernel@lists.infradead.org; Thu, 07 Nov 2024 19:09:39 +0000 Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4A7HBWB1025022; Thu, 7 Nov 2024 19:09:10 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=fakUqzDmzaD3RTe7NO+yLwk8t6vTIFFk5+sqvN+b18w=; b= RnhO4b3o5Qi3hQFKGNlmNAaGBhDEMuizAQtwtgJqrv2m0RLdYKUdJpfhDybJgR0e CAGhI+bKrRvYdBcbSPW7wp9K0tsqToWDks/FV2RTym64n8v3+YFrryPRdaBvHr5T 4dWOoaxT37afxq+tOeldpURsEVPGRqyGPF5WRlNgEBDlzGYGJ1I2SzV9pc24BwAW hDBSZYlI/nk9kyOQPibqJhomJbpH1WnxqV+1I9+Ex616Igt6Z9t8evjVPFFZrDJ3 IisMf4Dp1IHep1IRWw/AxiQlV4E0EO36KnxKZ54IPx47SNWxKCzxhEkwo8GKlbsU 0M0rfadmg3/zYxtqIKCqog== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 42nc4c3g45-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Nov 2024 19:09:10 +0000 (GMT) Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 4A7Ho2IY009141; Thu, 7 Nov 2024 19:09:09 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2175.outbound.protection.outlook.com [104.47.56.175]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 42nahgt646-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Nov 2024 19:09:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dvrAVstRyQg87Vo6qlf3PIHPCQsb7G+OYpxIQJS9Hur828scVHPoB6Lh1idmHatSbQHIKDpZUHzkvl2s5avEtYnjkj/YejwlUeoyBHwFO2vaaffHPLdPo/lQAgvG2T65NaeyepeSAwWpaM80/kxILls3fqNLcn4FMx5G+u0LmXP9UrxFuI2wJAODAheG/9zEQRDqwQinKhnl1hoM86t0Ho9fRCdkVM8gVgWyH3xy3ulp5txqvUQ0+/Tw9MTAbrpRM7chotAnCGt9wv4Zw0u2qGfyS0qqhTmCbVymLhXcPZcb2cALH61CRSDk8CYZqvYWHJgZaWNSkceYIwjesjEM6A== 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=fakUqzDmzaD3RTe7NO+yLwk8t6vTIFFk5+sqvN+b18w=; b=o8vqaFcc2Oi9U/ZT5Sh46IpIP3fZCfEFrxWxitKHXr09ASKGr/J1aOhuSkqAR2Ca/ET9lzKANyz1JHNYTrzTlTXlv3SFbW6Q5WP6Z/JXkn8YYJ+VZHtg9dKc+wQNI5FQJrW2uDNpjtfAfRZyDaqZSRDTS6YIcwlpiL3sHr6pWKCPBb6bjzHjYQQLUs3Y4necidKigRO0TySOV6AOINsKAugMvtxWMTPp7qFp/4F2aBRP4kCpj+YXoAy2h7ohjy7H7qLQJ6za+q8r+JVsFeh5jQZ0VSkPX2/EJVmQUj8WSHmGCRgBRvk+WUxE0pEIbcWWGhZQCwuDyBrXF8AIFG4Z/A== 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=fakUqzDmzaD3RTe7NO+yLwk8t6vTIFFk5+sqvN+b18w=; b=Bm9LEFFvMvMSp2OiQDmiStSQ2CbCdNaAagWSUiVdFXsUYutvIrBAQMKdfm21wUbN+3neaK5n0SKnGOujkKP2R4wki4kIT+aPtKHJVzhd2Q90v8PuX+dpS2ljd31hU0titZteMWU39xWOaU+z9hnzUHhWUmtzRYGDdfTHImvkZpA= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by SJ2PR10MB7037.namprd10.prod.outlook.com (2603:10b6:a03:4c5::14) 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:58 +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:58 +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 13/15] arm64: support cpuidle-haltpoll Date: Thu, 7 Nov 2024 11:08:16 -0800 Message-Id: <20241107190818.522639-14-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: MW4PR04CA0097.namprd04.prod.outlook.com (2603:10b6:303:83::12) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|SJ2PR10MB7037:EE_ X-MS-Office365-Filtering-Correlation-Id: bca9db8c-87d0-439c-5148-08dcff5fa1ae 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: ZhQTkKcUC4Td7e26bSH3XdKBIVO5Cl2ODNeSUijfkipAlavkwM32UAQjgUc2yvckvNmKqDjQSHw62UOU/CJAOa7dFNvlHKUY9X0RG9As9sydu7ti7xnwPoUv9pnaLYjCP6FRo6qu8UMe12qswUgIjir5ZtQLYw3TZC02oWKhSq6RGLIkrg8dBI7Ej1MGzqb2tzoJ3lgbg/VS+9c411N92MHluGTNIWEvvtU5yXKJ+rSD/iLjJYyIjgSiQveEC/W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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:(13230040)(366016)(1800799024)(376014)(7416014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Kwkcu8nAI+qsTzzlYybgNe2cEDwHBE3rbF3n88dG0/C7ZUh2mQrJ9tzfiSo7yL8ydx6gsRtY7bolm65Sp8GcxCcHMlIMJQHI9ySQdoh5I5lrICoTGIUJ2bVBmnVtl7Fj1Ko8A4n/jbhUgVoH01j42UB4rFSwDhPahxMAHKrbu2qG/rkh4ta3kt5IXpxheIaPnMwekSAF4qb9wryhzOvRyarAl1BpIoezalnSzck384mAwTYrUmguG3OKKvWZAzrrq2y0VLs+YiIJSSY9fYidFw7ShfRmuHouALP5EO5baLDQYpbGI3arVzAsN8572e+8IzxgzmJTnoJL7qkPeHu5F9v8QM0E6bgRKBGYZSlAAhMNpCyyJTgRcTNkEcqdTMpyxA9GE2HbiQchudUQzT+Tx5DWA06lDX77Vs6BUteYqh4vRSbWfWpZ9WLfll79qrjLBXoxRiPe1lhF8XcmlAOD4lemPg96KHWPUuEoAbvfte0aHzE/UNa+qSCA27dgXjjyK7+vLE9/pCCXrPef8oS6jj/zJeIUQajftGN0XERsFTB0WbpJurs/5vDH8fwtH5P1bP99bY440w5sIwq2tnGBfALkLUX0iz6b7BTYrrO3CR+GOPW2eo5sUpp9dzhGw60Y1b3MNqgTOBCUi/ruoISJyJmhYY0i03A0d+ZF3PrY9BpnRwOq52A9F8xGGZC9Vv4bW0ScbvX+Pau+/yJDMRS2CFIIlGDihW7HvZW/ovN6p8jKRY8iJslnuo5BqbVVGsCycBweyH6dynJlmQp01zcGn09GOE4foALEKWoMbiHMwFEzSk7XklknlXckyr4xB2yREw65bZ2LZW6L6VizzGWWVIPAqtIk+vAzF8Yk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sB1c8y3u1LC73Mk0JlKdyaBWO7JL5kYJyvAtyVa1gZXS1VfPPF/zzzEK/8QdVP6zADAnXPWJynWqhGXknwMx2WUu1Df19GPSukecZ/zt9C+5DaJ1i4CxVYuTK86SSStL5+2/KJw8scV7P17VSsIycf2xJv7yVXSBMlk71Z8RZh6nkHe+xqy1RS8VBakIeKswf0EUSRHoE2kS7LNhD16kG/Ad31HKL7cDvgO1ziGwD305oCcR52KwBuy7tUiuchofLZbpEfxB6peJ3xqotXTy3p4h7RiRGquDzCsnQLppjfeh+f6sORBscMWBJJBV5SZe+4PIAUBXWsTAgBfjjrHes2UBBfKlBGt/F2PFNS4ueuhuHuP4bL6kRB1438Ui4A= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: bca9db8c-87d0-439c-5148-08dcff5fa1ae 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:58.0985 (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: 2sMZfgTFZxtVnTX56hkvD2RHeB70+o7S1t8NW1pGweB8qLmuVChcbGCJJpiAdIS7k3pEVrebB3s3Zx2MTOdCL2Cvfu+DAZ1sev6im2Q3Rtc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR10MB7037 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 adultscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 bulkscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2409260000 definitions=main-2411070150 X-Proofpoint-ORIG-GUID: lnBww-DGDsumJYMSR3YzDvrNzQ9WGIfl X-Proofpoint-GUID: lnBww-DGDsumJYMSR3YzDvrNzQ9WGIfl X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241107_110937_967617_D5972A20 X-CRM114-Status: GOOD ( 15.69 ) 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 Add architectural support for the cpuidle-haltpoll driver by defining arch_haltpoll_*(). Also define ARCH_CPUIDLE_HALTPOLL to allow cpuidle-haltpoll to be selected. Tested-by: Haris Okanovic Tested-by: Misono Tomohiro Signed-off-by: Ankur Arora --- arch/arm64/Kconfig | 6 ++++++ arch/arm64/include/asm/cpuidle_haltpoll.h | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 arch/arm64/include/asm/cpuidle_haltpoll.h diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 43762c68e357..bd00647f6013 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -2428,6 +2428,12 @@ config ARCH_HIBERNATION_HEADER config ARCH_SUSPEND_POSSIBLE def_bool y +config ARCH_CPUIDLE_HALTPOLL + bool "Enable selection of the cpuidle-haltpoll driver" + help + cpuidle-haltpoll allows for adaptive polling based on + current load before entering the idle state. + endmenu # "Power management options" menu "CPU Power Management" diff --git a/arch/arm64/include/asm/cpuidle_haltpoll.h b/arch/arm64/include/asm/cpuidle_haltpoll.h new file mode 100644 index 000000000000..aa01ae9ad5dd --- /dev/null +++ b/arch/arm64/include/asm/cpuidle_haltpoll.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef _ARCH_HALTPOLL_H +#define _ARCH_HALTPOLL_H + +static inline void arch_haltpoll_enable(unsigned int cpu) { } +static inline void arch_haltpoll_disable(unsigned int cpu) { } + +static inline bool arch_haltpoll_want(bool force) +{ + /* + * Enabling haltpoll requires KVM support for arch_haltpoll_enable(), + * arch_haltpoll_disable(). + * + * Given that that's missing right now, only allow force loading for + * haltpoll. + */ + return force; +} +#endif