mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] Prohibit irq disable when disabled or enable when enabled
@ 2023-05-09 11:07 Nicholas Piggin
  2023-05-09 11:07 ` [RFC PATCH 1/3] hrtimer: balance irq save/restore Nicholas Piggin
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Nicholas Piggin @ 2023-05-09 11:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Nicholas Piggin, linux-arch, Thomas Gleixner, Peter Zijlstra

Hi,

Any thoughts on tightening this up and adding some warnings for this?
Motivated by a bug I added to powerpc which broke disabled-disable
callers.

Not that I necessarily want archs to be able to depend on this, it
would always be better to be tolerant. But it seems a risky pattern
for random code to be using.

This still fires off quite a few warnings on powerpc, and I haven't
test booted any other arch so probably wouldn't ask to upstream patch
3 just yet, but if there are no objections to the idea I might do a
bit more work on it.

Thanks,
Nick

Nicholas Piggin (3):
  hrtimer: balance irq save/restore
  init: Require archs call start_kernel with arch irqs disabled
  irqflags: Warn on irq disable when disabled and enable when enabled

 include/linux/irqflags.h       | 26 ++++++++++++++++++++++++--
 init/main.c                    |  6 +++++-
 kernel/locking/irqflag-debug.c | 14 ++++++++++++++
 kernel/time/hrtimer.c          | 22 +++++++++++-----------
 4 files changed, 54 insertions(+), 14 deletions(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-05-22  8:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-09 11:07 [RFC PATCH 0/3] Prohibit irq disable when disabled or enable when enabled Nicholas Piggin
2023-05-09 11:07 ` [RFC PATCH 1/3] hrtimer: balance irq save/restore Nicholas Piggin
2023-05-09 11:07 ` [RFC PATCH 2/3] init: Require archs call start_kernel with arch irqs disabled Nicholas Piggin
2023-05-09 11:07 ` [RFC PATCH 3/3] irqflags: Warn on irq disable when disabled and enable when enabled Nicholas Piggin
2023-05-22  8:25   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®