From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24AB8C43334 for ; Thu, 9 Jun 2022 07:39:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239248AbiFIHjc (ORCPT ); Thu, 9 Jun 2022 03:39:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237153AbiFIHj0 (ORCPT ); Thu, 9 Jun 2022 03:39:26 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 361E11AF1F; Thu, 9 Jun 2022 00:39:25 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 88FEF80F1; Thu, 9 Jun 2022 07:34:50 +0000 (UTC) Date: Thu, 9 Jun 2022 10:39:22 +0300 From: Tony Lindgren To: Arnd Bergmann Cc: Peter Zijlstra , Richard Henderson , Ivan Kokshaysky , Matt Turner , Vineet Gupta , Russell King - ARM Linux , Hans Ulli Kroll , Linus Walleij , Shawn Guo , Sascha Hauer , Sascha Hauer , Fabio Estevam , NXP Linux Team , Kevin Hilman , Catalin Marinas , Will Deacon , Guo Ren , bcain@quicinc.com, Huacai Chen , Xuerui Wang , Geert Uytterhoeven , Sam Creasey , Michal Simek , Thomas Bogendoerfer , Dinh Nguyen , Jonas Bonn , Stefan Kristiansson , Stafford Horne , James Bottomley , Helge Deller , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Yoshinori Sato , Rich Felker , David Miller , Richard Weinberger , Anton Ivanov , Johannes Berg , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , the arch/x86 maintainers , "H. Peter Anvin" , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Juergen Gross , srivatsa@csail.mit.edu, amakhalov@vmware.com, Pv-drivers , Boris Ostrovsky , Chris Zankel , Max Filippov , Rafael Wysocki , Len Brown , Pavel Machek , gregkh , Michael Turquette , Stephen Boyd , Daniel Lezcano , lpieralisi@kernel.org, Sudeep Holla , Andy Gross , Bjorn Andersson , Anup Patel , Thierry Reding , Jonathan Hunter , jacob.jun.pan@linux.intel.com, Yury Norov , Andy Shevchenko , Rasmus Villemoes , Steven Rostedt , Petr Mladek , Sergey Senozhatsky , John Ogness , "Paul E. McKenney" , Frederic Weisbecker , quic_neeraju@quicinc.com, Josh Triplett , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , vschneid@redhat.com, jpoimboe@kernel.org, alpha , Linux Kernel Mailing List , "open list:SYNOPSYS ARC ARCHITECTURE" , Linux ARM , linux-omap , linux-csky@vger.kernel.org, "open list:QUALCOMM HEXAGON..." , "open list:IA64 (Itanium) PLATFORM" , linux-m68k , "open list:BROADCOM NVRAM DRIVER" , Openrisc , Parisc List , linuxppc-dev , linux-riscv , linux-s390 , Linux-sh list , sparclinux , linux-um , linux-perf-users@vger.kernel.org, "open list:DRM DRIVER FOR QEMU'S CIRRUS DEVICE" , xen-devel , "open list:TENSILICA XTENSA PORT (xtensa)" , ACPI Devel Maling List , Linux PM list , linux-clk , linux-arm-msm , "open list:TEGRA ARCHITECTURE SUPPORT" , linux-arch , rcu@vger.kernel.org Subject: Re: [PATCH 33/36] cpuidle,omap3: Use WFI for omap3_pm_idle() Message-ID: References: <20220608142723.103523089@infradead.org> <20220608144518.010587032@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org * Arnd Bergmann [220608 18:18]: > On Wed, Jun 8, 2022 at 4:27 PM Peter Zijlstra wrote: > > > > arch_cpu_idle() is a very simple idle interface and exposes only a > > single idle state and is expected to not require RCU and not do any > > tracing/instrumentation. > > > > As such, omap_sram_idle() is not a valid implementation. Replace it > > with the simple (shallow) omap3_do_wfi() call. Leaving the more > > complicated idle states for the cpuidle driver. Agreed it makes sense to limit deeper idle states to cpuidle. Hopefully there is some informative splat for attempting to use arch_cpu_ide() for deeper idle states :) > I see similar code in omap2: > > omap2_pm_idle() > -> omap2_enter_full_retention() > -> omap2_sram_suspend() > > Is that code path safe to use without RCU or does it need a similar change? Seems like a similar change should be done for omap2. Then anybody who cares to implement a minimal cpuidle support can do so. Regards, Tony From mboxrd@z Thu Jan 1 00:00:00 1970 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 016C4CCA473 for ; Thu, 9 Jun 2022 07:39:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bUujQOMN2idux6pjQp6uHhfcsTFdcFHRIk7Cmr76CN0=; b=KdY99gbxMpnkOa YxYiQhFM24IUVQor0PLJA4cUZzNuHh9qVMaMNMIUotBFm5GMHW7llStoGXlMBuDlKWU2g4kIdmgJl LpQ0TcPcMe14ZWu3i6N53ULsbo7K84WqBc8V7J6KXiR00cYQ7vOqH9rpRtV2I5NDgXBP/1Akur4gi 4S70p5hoNwtW7DqnfKlN8jyhyBmiKBX2E/UENqyEByzA81SzNbgjCkMPTzgebB2fkCo9UJ3idk2Is d7/QtkJ3p3fCxBgZQk6qak9XH/P74py05p5xbh68ShhhogcwqSeIyIEQBjf5GujEaA0AuKgX+lpWv pKSxw2PPumbeis29L4Gg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzClS-00HUfQ-G0; Thu, 09 Jun 2022 07:39:34 +0000 Received: from muru.com ([72.249.23.125]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzClN-00HUYZ-BC; Thu, 09 Jun 2022 07:39:30 +0000 Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 88FEF80F1; Thu, 9 Jun 2022 07:34:50 +0000 (UTC) Date: Thu, 9 Jun 2022 10:39:22 +0300 From: Tony Lindgren To: Arnd Bergmann Cc: Peter Zijlstra , Richard Henderson , Ivan Kokshaysky , Matt Turner , Vineet Gupta , Russell King - ARM Linux , Hans Ulli Kroll , Linus Walleij , Shawn Guo , Sascha Hauer , Sascha Hauer , Fabio Estevam , NXP Linux Team , Kevin Hilman , Catalin Marinas , Will Deacon , Guo Ren , bcain@quicinc.com, Huacai Chen , Xuerui Wang , Geert Uytterhoeven , Sam Creasey , Michal Simek , Thomas Bogendoerfer , Dinh Nguyen , Jonas Bonn , Stefan Kristiansson , Stafford Horne , James Bottomley , Helge Deller , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Yoshinori Sato , Rich Felker , David Miller , Richard Weinberger , Anton Ivanov , Johannes Berg , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , the arch/x86 maintainers , "H. Peter Anvin" , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Juergen Gross , srivatsa@csail.mit.edu, amakhalov@vmware.com, Pv-drivers , Boris Ostrovsky , Chris Zankel , Max Filippov , Rafael Wysocki , Len Brown , Pavel Machek , gregkh , Michael Turquette , Stephen Boyd , Daniel Lezcano , lpieralisi@kernel.org, Sudeep Holla , Andy Gross , Bjorn Andersson , Anup Patel , Thierry Reding , Jonathan Hunter , jacob.jun.pan@linux.intel.com, Yury Norov , Andy Shevchenko , Rasmus Villemoes , Steven Rostedt , Petr Mladek , Sergey Senozhatsky , John Ogness , "Paul E. McKenney" , Frederic Weisbecker , quic_neeraju@quicinc.com, Josh Triplett , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , vschneid@redhat.com, jpoimboe@kernel.org, alpha , Linux Kernel Mailing List , "open list:SYNOPSYS ARC ARCHITECTURE" , Linux ARM , linux-omap , linux-csky@vger.kernel.org, "open list:QUALCOMM HEXAGON..." , "open list:IA64 (Itanium) PLATFORM" , linux-m68k , "open list:BROADCOM NVRAM DRIVER" , Openrisc , Parisc List , linuxppc-dev , linux-riscv , linux-s390 , Linux-sh list , sparclinux , linux-um , linux-perf-users@vger.kernel.org, "open list:DRM DRIVER FOR QEMU'S CIRRUS DEVICE" , xen-devel , "open list:TENSILICA XTENSA PORT (xtensa)" , ACPI Devel Maling List , Linux PM list , linux-clk , linux-arm-msm , "open list:TEGRA ARCHITECTURE SUPPORT" , linux-arch , rcu@vger.kernel.org Subject: Re: [PATCH 33/36] cpuidle,omap3: Use WFI for omap3_pm_idle() Message-ID: References: <20220608142723.103523089@infradead.org> <20220608144518.010587032@infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220609_003929_466212_134FD227 X-CRM114-Status: GOOD ( 20.51 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org * Arnd Bergmann [220608 18:18]: > On Wed, Jun 8, 2022 at 4:27 PM Peter Zijlstra wrote: > > > > arch_cpu_idle() is a very simple idle interface and exposes only a > > single idle state and is expected to not require RCU and not do any > > tracing/instrumentation. > > > > As such, omap_sram_idle() is not a valid implementation. Replace it > > with the simple (shallow) omap3_do_wfi() call. Leaving the more > > complicated idle states for the cpuidle driver. Agreed it makes sense to limit deeper idle states to cpuidle. Hopefully there is some informative splat for attempting to use arch_cpu_ide() for deeper idle states :) > I see similar code in omap2: > > omap2_pm_idle() > -> omap2_enter_full_retention() > -> omap2_sram_suspend() > > Is that code path safe to use without RCU or does it need a similar change? Seems like a similar change should be done for omap2. Then anybody who cares to implement a minimal cpuidle support can do so. Regards, Tony _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.librecores.org (lists.librecores.org [88.198.125.70]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44503CCA473 for ; Thu, 9 Jun 2022 10:42:01 +0000 (UTC) Received: from [172.31.1.100] (localhost.localdomain [127.0.0.1]) by mail.librecores.org (Postfix) with ESMTP id 0EA6020CE9; Thu, 9 Jun 2022 12:41:59 +0200 (CEST) Received: from muru.com (muru.com [72.249.23.125]) by mail.librecores.org (Postfix) with ESMTP id 6FE4C24865 for ; Thu, 9 Jun 2022 09:39:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 88FEF80F1; Thu, 9 Jun 2022 07:34:50 +0000 (UTC) Date: Thu, 9 Jun 2022 10:39:22 +0300 From: Tony Lindgren To: Arnd Bergmann Subject: Re: [PATCH 33/36] cpuidle,omap3: Use WFI for omap3_pm_idle() Message-ID: References: <20220608142723.103523089@infradead.org> <20220608144518.010587032@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Thu, 09 Jun 2022 12:41:56 +0200 X-BeenThere: openrisc@lists.librecores.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion around the OpenRISC processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juri Lelli , Rafael Wysocki , Benjamin Herrenschmidt , Linus Walleij , Ben Segall , Guo Ren , Pavel Machek , Alexander Gordeev , srivatsa@csail.mit.edu, linux-arch , Vincent Guittot , Michael Ellerman , Huacai Chen , ACPI Devel Maling List , Andy Gross , NXP Linux Team , Catalin Marinas , xen-devel , Matt Turner , Christian Borntraeger , Michael Turquette , Sam Creasey , Petr Mladek , Linux PM list , Lai Jiangshan , Sascha Hauer , linux-um , Arnaldo Carvalho de Melo , Thomas Gleixner , linux-omap , Dietmar Eggemann , Richard Henderson , gregkh , Linux Kernel Mailing List , linux-perf-users@vger.kernel.org, Sergey Senozhatsky , Sven Schnelle , Jiri Olsa , Paul Mackerras , Mark Rutland , "open list:IA64 \(Itanium\) PLATFORM" , Dave Hansen , "open list:DRM DRIVER FOR QEMU'S CIRRUS DEVICE" , James Bottomley , Max Filippov , Thierry Reding , Xuerui Wang , quic_neeraju@quicinc.com, linux-s390 , vschneid@redhat.com, John Ogness , Yoshinori Sato , Linux-sh list , Fabio Estevam , Helge Deller , Daniel Lezcano , Jonathan Hunter , Mathieu Desnoyers , Frederic Weisbecker , Len Brown , "open list:TENSILICA XTENSA PORT \(xtensa\)" , Sascha Hauer , Vasily Gorbik , linux-arm-msm , alpha , linux-m68k , Linux ARM , Chris Zankel , Stephen Boyd , Dinh Nguyen , Daniel Bristot de Oliveira , Alexander Shishkin , lpieralisi@kernel.org, Rasmus Villemoes , Joel Fernandes , Will Deacon , Boris Ostrovsky , Kevin Hilman , linux-csky@vger.kernel.org, Pv-drivers , "open list:SYNOPSYS ARC ARCHITECTURE" , Mel Gorman , jacob.jun.pan@linux.intel.com, Yury Norov , Hans Ulli Kroll , Vineet Gupta , linux-clk , Josh Triplett , Steven Rostedt , rcu@vger.kernel.org, Borislav Petkov , bcain@quicinc.com, Thomas Bogendoerfer , Parisc List , Sudeep Holla , Shawn Guo , David Miller , Rich Felker , Peter Zijlstra , amakhalov@vmware.com, Bjorn Andersson , "H. Peter Anvin" , sparclinux , "open list:QUALCOMM HEXAGON..." , linux-riscv , Anton Ivanov , Jonas Bonn , Richard Weinberger , the arch/x86 maintainers , Russell King - ARM Linux , Ingo Molnar , Albert Ou , "Paul E. McKenney" , Heiko Carstens , Openrisc , Paul Walmsley , "open list:TEGRA ARCHITECTURE SUPPORT" , Namhyung Kim , Andy Shevchenko , jpoimboe@kernel.org, Juergen Gross , Michal Simek , "open list:BROADCOM NVRAM DRIVER" , Palmer Dabbelt , Anup Patel , Ivan Kokshaysky , Johannes Berg , linuxppc-dev Errors-To: openrisc-bounces@lists.librecores.org Sender: "OpenRISC" * Arnd Bergmann [220608 18:18]: > On Wed, Jun 8, 2022 at 4:27 PM Peter Zijlstra wrote: > > > > arch_cpu_idle() is a very simple idle interface and exposes only a > > single idle state and is expected to not require RCU and not do any > > tracing/instrumentation. > > > > As such, omap_sram_idle() is not a valid implementation. Replace it > > with the simple (shallow) omap3_do_wfi() call. Leaving the more > > complicated idle states for the cpuidle driver. Agreed it makes sense to limit deeper idle states to cpuidle. Hopefully there is some informative splat for attempting to use arch_cpu_ide() for deeper idle states :) > I see similar code in omap2: > > omap2_pm_idle() > -> omap2_enter_full_retention() > -> omap2_sram_suspend() > > Is that code path safe to use without RCU or does it need a similar change? Seems like a similar change should be done for omap2. Then anybody who cares to implement a minimal cpuidle support can do so. Regards, Tony From mboxrd@z Thu Jan 1 00:00:00 1970 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 BFB11C433EF for ; Fri, 10 Jun 2022 15:33:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hfoH51SUpjkGwfo2TJVtRgll5/pDWzCrLuBZ3704/Z0=; b=KkOgFII2CAZrxc s2s+0RemLp/PZRPR59PXy9G8xSy5gHfXqvMwxc28dCjEbuCRbPdSnZTAmGggi0ubjyBnk9wad24BD oSiu2228pQzuExT/hPddBnSHnxf8a7X9Wm02zxVSfOd9Pfp9JTkCfzSIHgDzO57AMhjyf8UNabSi9 TUzqgcLJQn7aqAuVSgixklH+AexSj8sM87fTi66Kqn3L1ZPETugmFA+0sH271I03dhxZqF4kkM3KT Gt1KD2ZKcq7l4prP5/FsmcTYTgef6rSSDXEoxV1yX5OUw7hOxNU9ZSPdXDpwuKIo53Z6D85SnvkGv wEEKWxBIJeskFNaGiMsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzgdO-008mab-KW; Fri, 10 Jun 2022 15:33:14 +0000 Received: from muru.com ([72.249.23.125]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzClN-00HUYZ-BC; Thu, 09 Jun 2022 07:39:30 +0000 Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 88FEF80F1; Thu, 9 Jun 2022 07:34:50 +0000 (UTC) Date: Thu, 9 Jun 2022 10:39:22 +0300 From: Tony Lindgren To: Arnd Bergmann Cc: Peter Zijlstra , Richard Henderson , Ivan Kokshaysky , Matt Turner , Vineet Gupta , Russell King - ARM Linux , Hans Ulli Kroll , Linus Walleij , Shawn Guo , Sascha Hauer , Sascha Hauer , Fabio Estevam , NXP Linux Team , Kevin Hilman , Catalin Marinas , Will Deacon , Guo Ren , bcain@quicinc.com, Huacai Chen , Xuerui Wang , Geert Uytterhoeven , Sam Creasey , Michal Simek , Thomas Bogendoerfer , Dinh Nguyen , Jonas Bonn , Stefan Kristiansson , Stafford Horne , James Bottomley , Helge Deller , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Yoshinori Sato , Rich Felker , David Miller , Richard Weinberger , Anton Ivanov , Johannes Berg , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , the arch/x86 maintainers , "H. Peter Anvin" , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Juergen Gross , srivatsa@csail.mit.edu, amakhalov@vmware.com, Pv-drivers , Boris Ostrovsky , Chris Zankel , Max Filippov , Rafael Wysocki , Len Brown , Pavel Machek , gregkh , Michael Turquette , Stephen Boyd , Daniel Lezcano , lpieralisi@kernel.org, Sudeep Holla , Andy Gross , Bjorn Andersson , Anup Patel , Thierry Reding , Jonathan Hunter , jacob.jun.pan@linux.intel.com, Yury Norov , Andy Shevchenko , Rasmus Villemoes , Steven Rostedt , Petr Mladek , Sergey Senozhatsky , John Ogness , "Paul E. McKenney" , Frederic Weisbecker , quic_neeraju@quicinc.com, Josh Triplett , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , vschneid@redhat.com, jpoimboe@kernel.org, alpha , Linux Kernel Mailing List , "open list:SYNOPSYS ARC ARCHITECTURE" , Linux ARM , linux-omap , linux-csky@vger.kernel.org, "open list:QUALCOMM HEXAGON..." , "open list:IA64 (Itanium) PLATFORM" , linux-m68k , "open list:BROADCOM NVRAM DRIVER" , Openrisc , Parisc List , linuxppc-dev , linux-riscv , linux-s390 , Linux-sh list , sparclinux , linux-um , linux-perf-users@vger.kernel.org, "open list:DRM DRIVER FOR QEMU'S CIRRUS DEVICE" , xen-devel , "open list:TENSILICA XTENSA PORT (xtensa)" , ACPI Devel Maling List , Linux PM list , linux-clk , linux-arm-msm , "open list:TEGRA ARCHITECTURE SUPPORT" , linux-arch , rcu@vger.kernel.org Subject: Re: [PATCH 33/36] cpuidle,omap3: Use WFI for omap3_pm_idle() Message-ID: References: <20220608142723.103523089@infradead.org> <20220608144518.010587032@infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220609_003929_466212_134FD227 X-CRM114-Status: GOOD ( 20.51 ) X-Mailman-Approved-At: Fri, 10 Jun 2022 08:33:13 -0700 X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org * Arnd Bergmann [220608 18:18]: > On Wed, Jun 8, 2022 at 4:27 PM Peter Zijlstra wrote: > > > > arch_cpu_idle() is a very simple idle interface and exposes only a > > single idle state and is expected to not require RCU and not do any > > tracing/instrumentation. > > > > As such, omap_sram_idle() is not a valid implementation. Replace it > > with the simple (shallow) omap3_do_wfi() call. Leaving the more > > complicated idle states for the cpuidle driver. Agreed it makes sense to limit deeper idle states to cpuidle. Hopefully there is some informative splat for attempting to use arch_cpu_ide() for deeper idle states :) > I see similar code in omap2: > > omap2_pm_idle() > -> omap2_enter_full_retention() > -> omap2_sram_suspend() > > Is that code path safe to use without RCU or does it need a similar change? Seems like a similar change should be done for omap2. Then anybody who cares to implement a minimal cpuidle support can do so. Regards, Tony _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 DBC70C433EF for ; Fri, 10 Jun 2022 11:09:42 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4LKJBr68FWz3cH1 for ; Fri, 10 Jun 2022 21:09:40 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=atomide.com (client-ip=72.249.23.125; helo=muru.com; envelope-from=tony@atomide.com; receiver=) X-Greylist: delayed 435 seconds by postgrey-1.36 at boromir; Thu, 09 Jun 2022 17:46:44 AEST Received: from muru.com (muru.com [72.249.23.125]) by lists.ozlabs.org (Postfix) with ESMTP id 4LJbl807TCz3bn4 for ; Thu, 9 Jun 2022 17:46:43 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 88FEF80F1; Thu, 9 Jun 2022 07:34:50 +0000 (UTC) Date: Thu, 9 Jun 2022 10:39:22 +0300 From: Tony Lindgren To: Arnd Bergmann Subject: Re: [PATCH 33/36] cpuidle,omap3: Use WFI for omap3_pm_idle() Message-ID: References: <20220608142723.103523089@infradead.org> <20220608144518.010587032@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Fri, 10 Jun 2022 21:09:20 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juri Lelli , Rafael Wysocki , Linus Walleij , Ben Segall , Guo Ren , Pavel Machek , Alexander Gordeev , srivatsa@csail.mit.edu, linux-arch , Vincent Guittot , Huacai Chen , ACPI Devel Maling List , Andy Gross , Geert Uytterhoeven , NXP Linux Team , Catalin Marinas , xen-devel , Matt Turner , Christian Borntraeger , Michael Turquette , Sam Creasey , Petr Mladek , Linux PM list , Lai Jiangshan , Sascha Hauer , linux-um , Arnaldo Carvalho de Melo , Thomas Gleixner , linux-omap , Dietmar Eggemann , Richard Henderson , gregkh , Linux Kernel Mailing List , linux-perf-users@vger.kernel.org, Sergey Senozhatsky , Sven Schnelle , Jiri Olsa , Paul Mackerras , Mark Rutland , "open list:IA64 \(Itanium\) PLATFORM" , Dave Hansen , "open list:DRM DRIVER FOR QEMU'S CIRRUS DEVICE" , James Bottomley , Max Filippov , Thierry Reding , Xuerui Wang , quic_neeraju@quicinc.com, linux-s390 , vschneid@redhat.com, John Ogn ess , Yoshinori Sato , Linux-sh list , Fabio Estevam , Helge Deller , Daniel Lezcano , Jonathan Hunter , Mathieu Desnoyers , Frederic Weisbecker , Len Brown , "open list:TENSILICA XTENSA PORT \(xtensa\)" , Sascha Hauer , Vasily Gorbik , linux-arm-msm , alpha , linux-m68k , Stafford Horne , Linux ARM , Chris Zankel , Stephen Boyd , Dinh Nguyen , Daniel Bristot de Oliveira , Alexander Shishkin , lpieralisi@kernel.org, Rasmus Villemoes , Joel Fernandes < joel@joelfernandes.org>, Will Deacon , Boris Ostrovsky , Kevin Hilman , linux-csky@vger.kernel.org, Pv-drivers , "open list:SYNOPSYS ARC ARCHITECTURE" , Mel Gorman , jacob.jun.pan@linux.intel.com, Yury Norov , Hans Ulli Kroll , Vineet Gupta , linux-clk , Josh Triplett , Steven Rostedt , rcu@vger.kernel.org, Borislav Petkov , bcain@quicinc.com, Thomas Bogendoerfer , Parisc List , Sudeep Holla , Shawn Guo , David Miller , Rich Felker , Peter Zijlstra , amakhalov@vmware.com, Bjorn Andersson , "H. Peter Anvin" , sparclinux , "open list:QUALCOMM HEXAGON..." , linux-riscv , Anton Ivanov , Jonas Bonn , Richard Weinberger , the arch/x86 maintainers , Russell King - ARM Linux , Ingo Molnar , Albert Ou , "Paul E. McKenney" , Heiko Carstens , Stefan Kristiansson , Openrisc , Paul Walmsley , "open list:TEGRA ARCHITECTURE SUPPORT" , Namhyung Kim , Andy Shevchenko , jpoimboe@kernel.org, Juergen Gross , Michal Simek , "open list:BROADCOM NVRAM DRIVER" , Palmer Dabbelt , Anup Patel , Ivan Ko kshaysky , Johannes Berg , linuxppc-dev Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" * Arnd Bergmann [220608 18:18]: > On Wed, Jun 8, 2022 at 4:27 PM Peter Zijlstra wrote: > > > > arch_cpu_idle() is a very simple idle interface and exposes only a > > single idle state and is expected to not require RCU and not do any > > tracing/instrumentation. > > > > As such, omap_sram_idle() is not a valid implementation. Replace it > > with the simple (shallow) omap3_do_wfi() call. Leaving the more > > complicated idle states for the cpuidle driver. Agreed it makes sense to limit deeper idle states to cpuidle. Hopefully there is some informative splat for attempting to use arch_cpu_ide() for deeper idle states :) > I see similar code in omap2: > > omap2_pm_idle() > -> omap2_enter_full_retention() > -> omap2_sram_suspend() > > Is that code path safe to use without RCU or does it need a similar change? Seems like a similar change should be done for omap2. Then anybody who cares to implement a minimal cpuidle support can do so. Regards, Tony From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Date: Thu, 09 Jun 2022 07:39:22 +0000 Subject: Re: [PATCH 33/36] cpuidle,omap3: Use WFI for omap3_pm_idle() Message-Id: List-Id: References: <20220608142723.103523089@infradead.org> <20220608144518.010587032@infradead.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Arnd Bergmann Cc: Peter Zijlstra , Richard Henderson , Ivan Kokshaysky , Matt Turner , Vineet Gupta , Russell King - ARM Linux , Hans Ulli Kroll , Linus Walleij , Shawn Guo , Sascha Hauer , Sascha Hauer , Fabio Estevam , NXP Linux Team , Kevin Hilman , Catalin Marinas , Will Deacon , Guo Ren , bcain@quicinc.com, Huacai Chen , Xuerui Wang , Geert Uytterhoeven , Sam Creasey , Michal Simek , Thomas Bogendoerfer , Dinh Nguyen , Jonas Bonn , Stefan Kristiansson , Stafford Horne , James Bottomley , Helge Deller , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Yoshinori Sato , Rich Felker , David Miller , Richard Weinberger , Anton Ivanov , Johannes Berg , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , the arch/x86 maintainers , "H. Peter Anvin" , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Juergen Gross , srivatsa@csail.mit.edu, amakhalov@vmware.com, Pv-drivers , Boris Ostrovsky , Chris Zankel , Max Filippov , Rafael Wysocki , Len Brown , Pavel Machek , gregkh , Michael Turquette , Stephen Boyd , Daniel Lezcano , lpieralisi@kernel.org, Sudeep Holla , Andy Gross , Bjorn Andersson , Anup Patel , Thierry Reding , Jonathan Hunter , jacob.jun.pan@linux.intel.com, Yury Norov , Andy Shevchenko , Rasmus Villemoes , Steven Rostedt , Petr Mladek , Sergey Senozhatsky , John Ogness , "Paul E. McKenney" , Frederic Weisbecker , quic_neeraju@quicinc.com, Josh Triplett , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , vschneid@redhat.com, jpoimboe@kernel.org, alpha , Linux Kernel Mailing List , "open list:SYNOPSYS ARC ARCHITECTURE" , Linux ARM , linux-omap , linux-csky@vger.kernel.org, "open list:QUALCOMM HEXAGON..." , "open list:IA64 (Itanium) PLATFORM" , linux-m68k , "open list:BROADCOM NVRAM DRIVER" , Openrisc , Parisc List , linuxppc-dev , linux-riscv , linux-s390 , Linux-sh list , sparclinux , linux-um , linux-perf-users@vger.kernel.org, "open list:DRM DRIVER FOR QEMU'S CIRRUS DEVICE" , xen-devel , "open list:TENSILICA XTENSA PORT (xtensa)" , ACPI Devel Maling List , Linux PM list , linux-clk , linux-arm-msm , "open list:TEGRA ARCHITECTURE SUPPORT" , linux-arch , rcu@vger.kernel.org * Arnd Bergmann [220608 18:18]: > On Wed, Jun 8, 2022 at 4:27 PM Peter Zijlstra wrote: > > > > arch_cpu_idle() is a very simple idle interface and exposes only a > > single idle state and is expected to not require RCU and not do any > > tracing/instrumentation. > > > > As such, omap_sram_idle() is not a valid implementation. Replace it > > with the simple (shallow) omap3_do_wfi() call. Leaving the more > > complicated idle states for the cpuidle driver. Agreed it makes sense to limit deeper idle states to cpuidle. Hopefully there is some informative splat for attempting to use arch_cpu_ide() for deeper idle states :) > I see similar code in omap2: > > omap2_pm_idle() > -> omap2_enter_full_retention() > -> omap2_sram_suspend() > > Is that code path safe to use without RCU or does it need a similar change? Seems like a similar change should be done for omap2. Then anybody who cares to implement a minimal cpuidle support can do so. Regards, Tony From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH 33/36] cpuidle,omap3: Use WFI for omap3_pm_idle() Date: Thu, 9 Jun 2022 10:39:22 +0300 Message-ID: References: <20220608142723.103523089@infradead.org> <20220608144518.010587032@infradead.org> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Arnd Bergmann Cc: Peter Zijlstra , Richard Henderson , Ivan Kokshaysky , Matt Turner , Vineet Gupta , Russell King - ARM Linux , Hans Ulli Kroll , Linus Walleij , Shawn Guo , Sascha Hauer , Sascha Hauer , Fabio Estevam , NXP Linux Team , Kevin Hilman , Catalin Marinas , Will Deacon , Guo Ren , bcain@quicinc.com, Huacai Chen , Xuerui Wang , Geert * Arnd Bergmann [220608 18:18]: > On Wed, Jun 8, 2022 at 4:27 PM Peter Zijlstra wrote: > > > > arch_cpu_idle() is a very simple idle interface and exposes only a > > single idle state and is expected to not require RCU and not do any > > tracing/instrumentation. > > > > As such, omap_sram_idle() is not a valid implementation. Replace it > > with the simple (shallow) omap3_do_wfi() call. Leaving the more > > complicated idle states for the cpuidle driver. Agreed it makes sense to limit deeper idle states to cpuidle. Hopefully there is some informative splat for attempting to use arch_cpu_ide() for deeper idle states :) > I see similar code in omap2: > > omap2_pm_idle() > -> omap2_enter_full_retention() > -> omap2_sram_suspend() > > Is that code path safe to use without RCU or does it need a similar change? Seems like a similar change should be done for omap2. Then anybody who cares to implement a minimal cpuidle support can do so. Regards, Tony