Re: [PATCH 33/36] cpuidle,omap3: Use WFI for omap3_pm_idle()
From: Tony Lindgren <tony@atomide.com>
Date: 2022-06-09 07:39:36
Also in:
linux-acpi, linux-alpha, linux-arch, linux-arm-msm, linux-clk, linux-m68k, linux-mips, linux-omap, linux-perf-users, linux-pm, linux-riscv, linux-s390, linux-sh, linux-tegra, linux-um, lkml, rcu, sparclinux, xen-devel
o@users.sourceforge.jp>, Linux-sh list [off-list ref], Fabio Estevam [off-list ref], Helge Deller [off-list ref], Daniel Lezcano [off-list ref], Jonathan Hunter [off-list ref], Mathieu Desnoyers [off-list ref], Frederic Weisbecker [off-list ref], Len Brown [off-list ref], "open list:TENSILICA XTENSA PORT \(xtensa\)" [off-list ref], Sascha Hauer [off-list ref], Vasily Gorbik [off-list ref], linux-arm-msm [off-list ref], alpha [off-list ref], linux-m68k [off-list ref], Stafford Horne [off-list ref], Linux ARM [off-list ref], Chris Zankel [off-list ref], Stephen Boyd [off-list ref], Dinh Nguyen [off-list ref], Daniel Bristot de Oliveira [off-list ref], Alexander Shishkin [off-list ref], lpieralisi@kernel.org, Rasmus Villemoes [off-list ref], Joel Fernandes < joel@joelfernandes.org>, Will Deacon [off-list ref], Boris Ostrovsky [off-list ref], Kevin Hilman [off-list ref], linux-csky@vger.kernel.org, Pv-drivers [off-list ref], "open list:SYNOPSYS ARC ARCHITECTURE" [off-list ref], Mel Gorman [off-list ref], jacob.jun.pan@linux.intel.com, Yury Norov [off-list ref], Hans Ulli Kroll [off-list ref], Vineet Gupta [off-list ref], linux-clk [off-list ref], Josh Triplett [off-list ref], Steven Rostedt [off-list ref], rcu@vger.kernel.org, Borislav Petkov [off-list ref], bcain@quicinc.com, Thomas Bogendoerfer [off-list ref], Parisc List [off-list ref], Sudeep Holla [off-list ref], Shawn Guo [off-list ref], David Miller [off-list ref], Rich Felker [off-list ref], Peter Zijlstra [off-list ref], amakhalov@vmware.com, Bjorn Andersson [off-list ref], "H. Peter Anvin" <hp a@zytor.com>, sparclinux [off-list ref] , "open list:QUALCOMM HEXAGON..." [off-list ref], linux-riscv [off-list ref], Anton Ivanov [off-list ref], Jonas Bonn [off-list ref], Richard Weinberger [off-list ref], the arch/x86 maintainers [off-list ref], Russell King - ARM Linux [off-list ref], Ingo Molnar [off-list ref], Albert Ou [off-list ref], "Paul E. McKenney" [off-list ref], Heiko Carstens [off-list ref], Stefan Kristiansson [off-list ref], Openrisc [off-list ref], Paul Walmsley [off-list ref], "open list:TEGRA ARCHITECTURE SUPPORT" [off-list ref], Namhyung Kim [off-list ref], Andy Shevchenko [off-list ref], jpoimboe@kernel.org, Juergen Gross [off-list ref], Michal Simek [off-list ref], "open list:BROADCOM NVRAM DRIVER" [off-list ref], Palmer Dabbelt [off-list ref], Anup Patel [off-list ref], Ivan Ko kshaysky [off-list ref], Johannes Berg [off-list ref], linuxppc-dev [off-list ref] Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" [off-list ref] * Arnd Bergmann [off-list ref] [220608 18:18]:
On Wed, Jun 8, 2022 at 4:27 PM Peter Zijlstra [off-list ref] wrote:quoted
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