From patchwork Thu Feb 15 07:41:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihai Carabas X-Patchwork-Id: 201284 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp261985dyb; Thu, 15 Feb 2024 01:02:20 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVpuhCnOkQnTZezZSkfYi3AUWqWpXpvjjencTi41TTEcA47yL+KpXKJF/wzQ9qOLqEk0oK21ab3ZaqQuWIdiHeVs5UOEg== X-Google-Smtp-Source: AGHT+IGgirMswwKYBaQPqlBlgA2gDrbU8OtEkedsnkaSpc35AVObNMHbgma2K6+xTf22VR6seHBA X-Received: by 2002:a17:906:284a:b0:a3d:9dd2:e492 with SMTP id s10-20020a170906284a00b00a3d9dd2e492mr616514ejc.11.1707987739868; Thu, 15 Feb 2024 01:02:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707987739; cv=pass; d=google.com; s=arc-20160816; b=z/oE9nLi38h/bUIBxBOItzD79zVAcgJn7q5fA+YGKib9Xj5AiZjXtc44L6DdgjO2fS cUwz1+iD8hrmBMuUnE/GEXbo0j2x9pppZN9sRpiRe2VA55tmXTcwYfGn1wPvsr7dNO0N poKMgsLtNL8Dmug5MLQIxqqWznGQmf9f3WduOnAEPmr6GkuQ3PNjj7bytYlapYhCUwfO SmU7YlBx/UQ+hRmLE4ZVxxyGKU365BI/0QsSI55eFLQVSukW0eZBpk9CXt1Qo9a1VwxQ WEdiOuuMdCMBGCbvzkJFfWqyHhoEjH8CssrOpGMYjsWbSF43w1RAIq+HDMQRgE2ZU92R aAXQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=hlNIjt1lJtZP47W7eO4KvEIII2+KWpAFpv+PlhUsURU=; fh=cS+D6/15hJDwIQ5zbz5Bx0CwkimikQX+QlxAa68UNgo=; b=yXSGU5YVTGPw3QcAPP6OorYxeeZPjzGg3Bo//S/9ZQDUHkip+ZpD9RaVMphxT2ls2D zixnP21rWhMHCpVIJ5D318rQq8K09BuI7DNjCZLWSh2ZEVZ/20YNYFRfjd4VL6nBplKa 6+ZLc1xqSdcOOxhoz7I5yQImV+zjkbGh4ExievrB94TeboJ5nXbb87MTxVBv4zhy8uY4 ZcrmK3g+xfwDDHg3SMcGZgzRSczciNGNoS1oQ+/Tv9NE8pvkTZ1T9EjENPiXUj3/mxAy a+NmQyDxJAtJp0F7BgyDwo20OVOQAHHeZLhIf/JHRmcc2buc1iHQQUypuAj4uA3UrPM6 IPYg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=YC+l+PUr; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel+bounces-66472-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66472-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id mf19-20020a170906cb9300b00a3d90d72b8dsi386036ejb.684.2024.02.15.01.02.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 01:02:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66472-ouuuleilei=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=@oracle.com header.s=corp-2023-11-20 header.b=YC+l+PUr; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel+bounces-66472-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66472-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.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 50B351F2A0F3 for ; Thu, 15 Feb 2024 09:01:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 246EB1CD06; Thu, 15 Feb 2024 08:58:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="YC+l+PUr" 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 F0F941B957; Thu, 15 Feb 2024 08:58:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.165.32 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707987495; cv=none; b=PG7M/xGq1siRpui23DY+TcPrcK3HeyX4n9QUpW/L9q3bqZGGPx74uyO7XYRscJ5OJYKUQbk1u8nlPQ2l+eaNJOQ/WJUpZ3C31x3KJncYguPSXFAZBQudKR/Ws+/jb/7i087WY4WwXAMJK84QLmE9Kmd+8SFt3YdpzvDRitAG6hk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707987495; c=relaxed/simple; bh=k7bPu+gk7Cd3HeftqicW+V1b6QVdrKTlCbgVbfhaERo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=SZqv+GMel7eJLC6dU7XhMRS5sj/v8ctPSIpzZcyECawjb47cz13EGrER/MZiKwEtQKl4mS/DqrZDx6/PY2lpAQiqpdLoxOKxe66TB0zcyigjTMavgH8Gx5nWxcx/1pqrL4ZZWsWiz0+wXD1omIdGoE8NI5WcPWPpjQ2MO5L2c1s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none 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=YC+l+PUr; arc=none smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41F6iQ1A013781; Thu, 15 Feb 2024 08:57:39 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; s=corp-2023-11-20; bh=hlNIjt1lJtZP47W7eO4KvEIII2+KWpAFpv+PlhUsURU=; b=YC+l+PUrMU5xBqA3hq5Ym58t6zY7CWPc4uYSBWvHEueWoJE5dL/FHQon3qwvOhNsOmVT TGHG20yQgpgfYShmuseYEPcpslkrzpYmaPFXw6fEpA0mRShnQpodYDoWOyA/nxGpSGnE OS+4xtCJEQWlgPqNu3YZyTNf5gPWQp2BuVgHuc1zrb18f/coAUr7eBIQ1gqqUux0AdT3 o6854UF23FxKthuiawWppPdx874M4D0pWvqPLflguM1Rqza6RiQtY5BvoimwKgiihRDQ z+tUYV5TXsSEBVyfZueWGf+2AIBxMI1Qg+xCGGXmnFGWj/tDWkInOAifBDTxfb1rsbSJ RA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3w92s71e5t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Feb 2024 08:57:39 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 41F7oN7n015119; Thu, 15 Feb 2024 08:57:38 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3w5yka73re-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Feb 2024 08:57:38 +0000 Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 41F8vDd1033748; Thu, 15 Feb 2024 08:57:37 GMT Received: from mihai.localdomain (ban25x6uut25.us.oracle.com [10.153.73.25]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3w5yka73cg-7; Thu, 15 Feb 2024 08:57:37 +0000 From: Mihai Carabas To: linux-arm-kernel@lists.infradead.org Cc: kvm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, 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, akpm@linux-foundation.org, pmladek@suse.com, peterz@infradead.org, dianders@chromium.org, npiggin@gmail.com, rick.p.edgecombe@intel.com, joao.m.martins@oracle.com, juerg.haefliger@canonical.com, mic@digikod.net, mihai.carabas@oracle.com, arnd@arndb.de, ankur.a.arora@oracle.com Subject: [PATCH v4 6/8] cpuidle-haltpoll: ARM64 support Date: Thu, 15 Feb 2024 09:41:48 +0200 Message-Id: <1707982910-27680-7-git-send-email-mihai.carabas@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1707982910-27680-1-git-send-email-mihai.carabas@oracle.com> References: <1707982910-27680-1-git-send-email-mihai.carabas@oracle.com> X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-15_08,2024-02-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 bulkscore=0 suspectscore=0 phishscore=0 adultscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402150069 X-Proofpoint-GUID: DKEm_88vuEAgYfwqE-BtVNjQU26GaIam X-Proofpoint-ORIG-GUID: DKEm_88vuEAgYfwqE-BtVNjQU26GaIam Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790954952424447841 X-GMAIL-MSGID: 1790954952424447841 From: Joao Martins To test whether it's a guest or not for the default cases, the haltpoll driver uses the kvm_para* helpers to find out if it's a guest or not. ARM64 doesn't have or defined any of these, so it remains disabled on the default. Although it allows to be force-loaded. Signed-off-by: Joao Martins Signed-off-by: Mihai Carabas --- drivers/cpuidle/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig index cac5997dca50..067927eda466 100644 --- a/drivers/cpuidle/Kconfig +++ b/drivers/cpuidle/Kconfig @@ -35,7 +35,7 @@ config CPU_IDLE_GOV_TEO config CPU_IDLE_GOV_HALTPOLL bool "Haltpoll governor (for virtualized systems)" - depends on KVM_GUEST + depends on (X86 && KVM_GUEST) || ARM64 help This governor implements haltpoll idle state selection, to be used in conjunction with the haltpoll cpuidle driver, allowing @@ -73,7 +73,7 @@ endmenu config HALTPOLL_CPUIDLE tristate "Halt poll cpuidle driver" - depends on X86 && KVM_GUEST + depends on (X86 && KVM_GUEST) || ARM64 select CPU_IDLE_GOV_HALTPOLL default y help