linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] powerpc: use lock guards for mutex Set 1
@ 2025-03-14 11:44 Shrikanth Hegde
  2025-03-14 11:44 ` [PATCH v2 1/6] powerpc: eeh: use lock guard for mutex Shrikanth Hegde
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Shrikanth Hegde @ 2025-03-14 11:44 UTC (permalink / raw)
  To: maddy, linuxppc-dev
  Cc: sshegde, npiggin, christophe.leroy, mpe, peterz, fbarrat, ajd,
	mahesh, oohall, hbathini, dhowells, haren, linux-kernel

This is an effort to make the code simpler by making use of lock
guards which were introduced in [1], which works by using __cleanup 
attributes. More details in v1 cover letter

This series aims mainly at simplifying code around mutex with goto
statements. If it makes sense, there are more code simplification which 
can done for preempt, rcu, spinlock as well. Even for mutex, there is
more which could be done. Even there are usecases for kfree which could
use the new __free infra. 

Please review. Code is compile/boot tested except for powernv. 
Have kept the patches separate for easier bisect. Let me if they should
be combined into one. Commit message is same for all. 

[1]: https://lkml.kernel.org/r/20230612093537.614161713%40infradead.org
v1: https://lore.kernel.org/all/20250314054544.1998928-1-sshegde@linux.ibm.com/#t

v1->v2:
- Fix changelog of powernv (Andrew Donnellan)
- use scoped_guard in couple of places to avoid holding mutex
  un-necessarily (Peter Zijlstra)

Shrikanth Hegde (6):
  powerpc: eeh: use lock guard for mutex
  powerpc: rtas: use lock guard for mutex
  powerpc: fadump: use lock guard for mutex
  powerpc: book3s: vas: use lock guard for mutex
  powerpc: powernv: ocxl: use lock guard for mutex
  powerpc: sysdev: use lock guard for mutex

 arch/powerpc/kernel/eeh.c                   | 20 +++----
 arch/powerpc/kernel/fadump.c                | 11 ++--
 arch/powerpc/kernel/rtas_flash.c            | 64 +++++++--------------
 arch/powerpc/platforms/book3s/vas-api.c     | 32 +++++------
 arch/powerpc/platforms/powernv/ocxl.c       | 12 +---
 arch/powerpc/sysdev/fsl_mpic_timer_wakeup.c |  8 +--
 6 files changed, 48 insertions(+), 99 deletions(-)

-- 
2.39.3



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

end of thread, other threads:[~2025-05-05  4:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-14 11:44 [PATCH v2 0/6] powerpc: use lock guards for mutex Set 1 Shrikanth Hegde
2025-03-14 11:44 ` [PATCH v2 1/6] powerpc: eeh: use lock guard for mutex Shrikanth Hegde
2025-03-14 11:44 ` [PATCH v2 2/6] powerpc: rtas: " Shrikanth Hegde
2025-03-14 11:44 ` [PATCH v2 3/6] powerpc: fadump: " Shrikanth Hegde
2025-03-14 11:45 ` [PATCH v2 4/6] powerpc: book3s: vas: " Shrikanth Hegde
2025-03-14 11:45 ` [PATCH v2 5/6] powerpc: powernv: ocxl: " Shrikanth Hegde
2025-03-19  4:00   ` Andrew Donnellan
2025-03-14 11:45 ` [PATCH v2 6/6] powerpc: sysdev: " Shrikanth Hegde
2025-04-30 13:10   ` Srikar Dronamraju
2025-05-05  4:02     ` Shrikanth Hegde
2025-04-30 13:29 ` [PATCH v2 0/6] powerpc: use lock guards for mutex Set 1 Srikar Dronamraju

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).