Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp981407rdb; Fri, 20 Oct 2023 05:26:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGU1sFRdAYB48/j3Uxp0qTNYvTgev5qBdtr/cbdESG2U5PqzZKXUQcb3asvtnlk1K377QNV X-Received: by 2002:a05:6a20:2451:b0:17b:7dda:c10b with SMTP id t17-20020a056a20245100b0017b7ddac10bmr1943247pzc.5.1697804797805; Fri, 20 Oct 2023 05:26:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697804797; cv=none; d=google.com; s=arc-20160816; b=C5qyP36iaYp+yBw9oO8le4BMN+jNO89pJlsjDGBtAMxbQCJ7DsmIALLVntegPWSK9S zGUpzp56plg39F4HTHGDHv5DHzlxLpzFy5NBazWBaO4JcNM9YLsvbPeCxH4R+XJfwhbH xbOhqDPc3Wpd2ztG3mV1oatES5fA/8jSE9ALJzYFUtTTOUR0gAzRL6mfPGYBwNToc++9 jpkm2b0rY2UinhulSOBaydfRGaHhhOqjMCaixXoKejx3dVhM4c2YxXbyw/OtrwjozIOm haIWWs16gg4hJBg4nTT99j0JZQb3Ysc/M2DU9O6ptQT0JmyWCWS5h1sm3qk0ODYXvmJt lM5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=6eucA1hIcjauTZoFNKAzAXAXKE9v2Ut89sCYmHempMk=; fh=j3datW8XlRxm/HnenPouBPY7MEFuTC+H3oT0QmT8qqM=; b=TPqxjiMGAmkHNz2PVgoKDgKyHbLokWmQmxaOjDLdxcBefwVijRqUaOBx6JR6KngJeD bkiB+cY58IBXBWuNbb/gCkCDaDz1tcIOztlu4p50+slJkNQY3e89lF/oxlzkwcjZnEsV eyoERNu03pc0IQ8Y4Ubl+p4LXDXsJJzxVYq674tPnnWnWr9JB0cSW8VzjfJHFamqC3eM /Zds2QuslDdFsv6SD6XrMeiJzpA9iCBCKlwUMK0kjacDXhpHNJOslDNt6Kxu31lMfg1P IeCEyGv05g1MHV4G84HoE3sP9C3iruwf3wsuQOCENW4oqASuCeLYZj/QYKjyxj9ZgXfk ecTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=QclXltIl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id 4-20020a630204000000b00563f72935e3si1735644pgc.608.2023.10.20.05.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 05:26:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=QclXltIl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id CDB8B835C178; Fri, 20 Oct 2023 05:26:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377036AbjJTM02 (ORCPT + 99 others); Fri, 20 Oct 2023 08:26:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376956AbjJTM00 (ORCPT ); Fri, 20 Oct 2023 08:26:26 -0400 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E06D911B; Fri, 20 Oct 2023 05:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1697804783; bh=6eucA1hIcjauTZoFNKAzAXAXKE9v2Ut89sCYmHempMk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=QclXltIlXyGGi657p/iDwBH81QR1Iq3hd2y3RECoPS8AqMPR/RErtt2w4IjXNvdFS BuxNLODSXwr1SZo6QBze4u8LRO5Tcrv7BrbNKQz75YSps06WZpI+zPZg3snlCCjrwD jgJM0T/JxnY6UaA0HoIUdP7y/2ufp274BKAWuRePgsiyyG8g/qX2pmJCSQz20w10kA Vapu+fMZNMj0nDmOe4WbCdoPUSKWMeWXwi00he23ZyAekbdflKg71CYYMe/zQA7gfz YTX72jW07FtzNr5FUqOTLKtcYjkAL829RoSjltinVy+CJfz/VBKbdLd9JBPDwQrT4X TR6mZiWRU048g== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4SBkMy1x9Dz4wd5; Fri, 20 Oct 2023 23:26:22 +1100 (AEDT) From: Michael Ellerman To: Vaibhav Jain , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: Vaibhav Jain , Jonathan Corbet , Nicholas Piggin , Christophe Leroy , "Paul E. McKenney" , Catalin Marinas , Randy Dunlap , Peter Zijlstra , "Steven Rostedt (Google)" , Daniel Sneddon , Vaidyanathan Srinivasan Subject: Re: [PATCH v2] powerpc: Enable generic cpu idle-loop In-Reply-To: <20230821045928.1350893-1-vaibhav@linux.ibm.com> References: <20230821045928.1350893-1-vaibhav@linux.ibm.com> Date: Fri, 20 Oct 2023 23:26:21 +1100 Message-ID: <871qdp5vki.fsf@mail.lhotse> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Fri, 20 Oct 2023 05:26:35 -0700 (PDT) Hi Vaibhav, Vaibhav Jain writes: > This minor patch enables config option GENERIC_IDLE_POLL_SETUP for arch > powerpc. This should add support for kernel param 'nohlt'. > > Powerpc kernel also supports another kernel boot-time param called > 'powersave' which can also be used to disable all cpu idle-states and > forces CPU to an idle-loop similar to what cpu_idle_poll() does. Hence this > patch also updates the handling of 'powersave=off' kernel param to enable > generic cpu idle-loop if its enabled. > > Signed-off-by: Vaibhav Jain > --- > Changelog: > > Since v1: > https://lore.kernel.org/all/20230818050739.827851-1-vaibhav@linux.ibm.com > * Updated powersave_off() to enable generic cpu idle-loop if > 'powersave=off' kernel arg is given. [Mpe] > * Update patch description I had already merged the v1 when I saw this, and ... > diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c > index b1c0418b25c8..7367a0698459 100644 > --- a/arch/powerpc/kernel/idle.c > +++ b/arch/powerpc/kernel/idle.c > @@ -35,6 +36,8 @@ EXPORT_SYMBOL(cpuidle_disable); > > static int __init powersave_off(char *arg) > { > + /* Use generic idle loop if thats available */ > + cpu_idle_poll_ctrl(true); > ppc_md.power_save = NULL; > cpuidle_disable = IDLE_POWERSAVE_OFF; > return 1; The hope here would be that we could remove the need for cpuidle_disable. cheers