From patchwork Mon Nov 20 14:01:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mihai Carabas X-Patchwork-Id: 167244 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6359:6513:b0:164:83eb:24d7 with SMTP id sk19csp2360434rwb; Mon, 20 Nov 2023 07:19:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IFqlCF3f7rnBGGOZh2DyUvJ/sr59xcyyFQhsTyTXME8IzKOzEz/qaeBRImRdymTW0xVoZn5 X-Received: by 2002:a05:6a20:6a0f:b0:17e:2afd:407b with SMTP id p15-20020a056a206a0f00b0017e2afd407bmr11309826pzk.9.1700493432946; Mon, 20 Nov 2023 07:17:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700493432; cv=none; d=google.com; s=arc-20160816; b=GzcsVTtXSdU2PceUKedC5KVKIbnrdZLPg6hLZdkUK8Rzxpuc8dZOhkti/rQnyk2fS2 IB1usKxBmas/UG5x3EsHOsKOfPp9DXNHf+4+tKqiM4q3ahosueXJisxks5a1fhz+cWt8 BGDX7DqWoxbvXXchfDaspnXBEn6l40GBkUHfmU8I4lgN/P0gqflGudBRqpiHEeBlFnrI 5LiLOV04dPKK0DL9loTVZ+kae+XVMos2bi+rcQf5naPh6NTbDLAkLn3x3YdV2JYLsebo 6CEMmq5H2Ml0WaofOGK7JpBJkHljy53EDAiuxaoADexzXsxKp4GEIH+kAuyYAmAvO0b/ uwsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=vZO6ULYI60r1oIpCpU92u0oDAewvVSQfaJB9f6yUwc+cCrsRKla6SzV02VUEBuNOlk mzvHccyImlPTxyEeGY0PuebDRRqfAMQZGJXI0JyG8ycBB/dgVK5RoO2Ys+tDDKtpdwoO 12ow4wWKZTPIQrYYP24wnRbX1uaR55jzCXpm9eu/SnMnF++LGQoLoDAaW5L29n5yq11P a16GKghjSeEWi6I97eqnP0dxczBkg4uc/sEvlpbJ9JS0WjHgg52bsAiHCwEEc+uMoNtI iq4dvMWTpUETFTqE3ntkZbMvkvHUKHvzJVRqDhL0/jkXBLVS50j5LWKxo0js9oAB4loS begg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=o58V0R8A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id h31-20020a63f91f000000b005be029a66d1si8213363pgi.806.2023.11.20.07.17.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:17:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=o58V0R8A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 6E9908051AB3; Mon, 20 Nov 2023 07:16:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234027AbjKTPQ2 (ORCPT + 27 others); Mon, 20 Nov 2023 10:16:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233770AbjKTPQ1 (ORCPT ); Mon, 20 Nov 2023 10:16:27 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81496A4; Mon, 20 Nov 2023 07:16:23 -0800 (PST) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AKF2WHm027654; Mon, 20 Nov 2023 15:15:24 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-03-30; bh=hlNIjt1lJtZP47W7eO4KvEIII2+KWpAFpv+PlhUsURU=; b=o58V0R8A+E1zQ+SsMJvASydoOg6yhLfPoVow6VNQGEyTW8yuHUx78AxnBxqu+geBa3f4 pAgkQjoWEuFGUbkNQVRkB0M8hWgptRafKNvfQrv8sOf/IhWCunOsjUvupuereHMTuh0H OHkE3T7Tuq4WEFXC7xvGpRVbvJrKtm99EkSUORzMMY8+rfMFd+Oi4VM1acNWPboHYliJ 0hqbi5Jbg/0S+8YYn+iQJ7BvwWLQC/VTmCBYpqqMSdKy3ZfsqPorEdImcv4hypc5H9jH 4E9G465XiumZTMhrkmPOdQEaiaREMPh/dtTaJHPSocWTi672AvCDnuNJqs/HM9FZGoc1 nw== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3uekpejwf0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 20 Nov 2023 15:15:24 +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 3AKF2wL7023702; Mon, 20 Nov 2023 15:15:23 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3uekq5gr46-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 20 Nov 2023 15:15:23 +0000 Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3AKFFF8b037000; Mon, 20 Nov 2023 15:15:22 GMT Received: from mihai.localdomain (ban25x6uut25.us.oracle.com [10.153.73.25]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 3uekq5gqwc-7; Mon, 20 Nov 2023 15:15:22 +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 6/7] cpuidle-haltpoll: ARM64 support Date: Mon, 20 Nov 2023 16:01:37 +0200 Message-Id: <1700488898-12431-7-git-send-email-mihai.carabas@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1700488898-12431-1-git-send-email-mihai.carabas@oracle.com> References: <1700488898-12431-1-git-send-email-mihai.carabas@oracle.com> X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-20_15,2023-11-20_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311200106 X-Proofpoint-GUID: srZIfO3ZIE8aevxHjRldc4X9uOZ7nIZa X-Proofpoint-ORIG-GUID: srZIfO3ZIE8aevxHjRldc4X9uOZ7nIZa X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 20 Nov 2023 07:16:46 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783096602207286565 X-GMAIL-MSGID: 1783096602207286565 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