[PATCH v2 0/6] powerpc: use lock guards for mutex Set 1

Shrikanth Hegde posted 6 patches 9 months, 1 week ago
There is a newer version of this series
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(-)
[PATCH v2 0/6] powerpc: use lock guards for mutex Set 1
Posted by Shrikanth Hegde 9 months, 1 week ago
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
Re: [PATCH v2 0/6] powerpc: use lock guards for mutex Set 1
Posted by Srikar Dronamraju 7 months, 3 weeks ago
* Shrikanth Hegde <sshegde@linux.ibm.com> [2025-03-14 17:14:56]:

> 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
> 

For all the patches in this series

Reviewed-by: Srikar Dronamraju <srikar@linux.ibm.com>

-- 
Thanks and Regards
Srikar Dronamraju