ieu.desnoy...@efficios.com>, Frederic Weisbecker <frede...@kernel.org>, Len Brown <l...@kernel.org>, linux-xte...@linux-xtensa.org, Sascha Hauer <ker...@pengutronix.de>, Vasily Gorbik <g...@linux.ibm.com>, linux-arm-msm <linux-arm-...@vger.kernel.org>, linux-al...@vger.kernel.org, linux-m68k <linux-m...@lists.linux-m68k.org>, Stafford Horne <sho...@gmail.com>, Linux ARM <linux-arm-ker...@lists.infradead.org>, Chris Zankel <ch...@zankel.net>, Stephen Boyd <sb...@kernel.org>, dingu...@kernel.org, Daniel Bristot de Oliveira <bris...@redhat.com>, Alexander Shishkin <alexander.shish...@linux.intel.com>, Lorenzo Pieralisi <lpieral...@kernel.org>, Rasmus Villemoes <li...@rasmusvillemoes.dk>, Joel Fernandes <j...@joelfernandes.org>, Will Deacon <w...@kernel.org>, Boris Ostrovsky <boris.ostrov...@oracle.com>, Kevin Hilman <khil...@kernel.org>, linux-c...@vger.kernel.org, pv-driv...@vmware.com, linux-snps-...@lists.infradead.org, Mel Gorman <mgor...@suse.de>, Jacob Pan <jacob.jun....@linux.inte l.com>, Arnd Bergmann <a...@arndb.de>, ulli.kr...@googlemail.com, vgu...@kernel.org, linux-clk <linux-...@vger.kernel.org>, Josh Triplett <j...@joshtriplett.org>, Steven Rostedt <rost...@goodmis.org>, r...@vger.kernel.org, Borislav Petkov <b...@alien8.de>, bc...@quicinc.com, Thomas Bogendoerfer <tsbog...@alpha.franken.de>, Parisc List <linux-par...@vger.kernel.org>, Sudeep Holla <sudeep.ho...@arm.com>, Shawn Guo <shawn...@kernel.org>, David Miller <da...@davemloft.net>, Rich Felker <dal...@libc.org>, Tony Lindgren <t...@atomide.com>, amakha...@vmware.com, Bjorn Andersson <bjorn.anders...@linaro.org>, "H. Peter Anvin" <h...@zytor.com>, sparcli...@vger.kernel.org, linux-hexa...@vger.kernel.org, linux-riscv <linux-ri...@lists.infradead.org>, anton.iva...@cambridgegreys.com, jo...@southpole.se, Yury Norov <yury.no...@gmail.com>, Richard Weinberger <rich...@nod.at>, the arch/x86 maintainers <x...@kernel.org>, Russell King - ARM Linux <li...@armlinux.org.uk>, Ingo Molnar <mi...@redhat.com>, Al bert Ou <a...@eecs.berkeley.edu>, "Paul E. McKenney" < paul...@kernel.org>, Heiko Carstens <h...@linux.ibm.com>, stefan.kristians...@saunalahti.fi, openr...@lists.librecores.org, Paul Walmsley <paul.walms...@sifive.com>, linux-tegra <linux-te...@vger.kernel.org>, namhy...@kernel.org, Andy Shevchenko <andriy.shevche...@linux.intel.com>, jpoim...@kernel.org, Juergen Gross <jgr...@suse.com>, Michal Simek <mon...@monstr.eu>, "open list:BROADCOM NVRAM DRIVER" <linux-m...@vger.kernel.org>, Palmer Dabbelt <pal...@dabbelt.com>, Anup Patel <a...@brainfault.org>, i...@jurassic.park.msu.ru, Johannes Berg <johan...@sipsolutions.net>, linuxppc-dev <linuxppc-dev@lists.ozlabs.org> Errors-To: linuxppc-dev-bounces+archive=mail-archive....@lists.ozlabs.org Sender: "Linuxppc-dev" <linuxppc-dev-bounces+archive=mail-archive....@lists.ozlabs.org>
On Wed, Jun 8, 2022 at 4:47 PM Peter Zijlstra <pet...@infradead.org> wrote: > > cpuidle_state::enter() methods should be IRQ invariant > > Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org> Reviewed-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> > --- > drivers/cpuidle/poll_state.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > --- a/drivers/cpuidle/poll_state.c > +++ b/drivers/cpuidle/poll_state.c > @@ -17,7 +17,7 @@ static int __cpuidle poll_idle(struct cp > > dev->poll_time_limit = false; > > - local_irq_enable(); > + raw_local_irq_enable(); > if (!current_set_polling_and_test()) { > unsigned int loop_count = 0; > u64 limit; > @@ -36,6 +36,8 @@ static int __cpuidle poll_idle(struct cp > } > } > } > + raw_local_irq_disable(); > + > current_clr_polling(); > > return index; > >