[patchlet] locking: fix trivial f70405afc99b RT build breakage

Mike Galbraith posted 1 patch 1 year, 10 months ago
include/linux/rwbase_rt.h |    1 +
include/linux/rwsem.h     |    2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
[patchlet] locking: fix trivial f70405afc99b RT build breakage
Posted by Mike Galbraith 1 year, 10 months ago

Two trivial RT build issues arrived along with f70405afc99b: WARN_ON() being
undefined as added to include/linux/rwbase_rt.h, and the wrong parameter (typo)
being passed to rw_base_assert_held_write().

Fixes: f70405afc99b ("locking: Add rwsem_assert_held() and rwsem_assert_held_write()")
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Mike Galbraith <efault@gmx.de>
---
 include/linux/rwbase_rt.h |    1 +
 include/linux/rwsem.h     |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

--- a/include/linux/rwbase_rt.h
+++ b/include/linux/rwbase_rt.h
@@ -4,6 +4,7 @@

 #include <linux/rtmutex.h>
 #include <linux/atomic.h>
+#include <linux/bug.h>

 #define READER_BIAS		(1U << 31)
 #define WRITER_BIAS		(1U << 30)
--- a/include/linux/rwsem.h
+++ b/include/linux/rwsem.h
@@ -174,7 +174,7 @@ static inline void rwsem_assert_held_nol

 static inline void rwsem_assert_held_write_nolockdep(const struct rw_semaphore *sem)
 {
-	rw_base_assert_held_write(sem);
+	rw_base_assert_held_write(&sem->rwbase);
 }

 static __always_inline int rwsem_is_contended(struct rw_semaphore *sem)
Re: [patchlet] locking: fix trivial f70405afc99b RT build breakage
Posted by Matthew Wilcox 1 year, 10 months ago
On Thu, Apr 04, 2024 at 07:02:41AM +0200, Mike Galbraith wrote:
> 
> Two trivial RT build issues arrived along with f70405afc99b: WARN_ON() being
> undefined as added to include/linux/rwbase_rt.h, and the wrong parameter (typo)
> being passed to rw_base_assert_held_write().
> 
> Fixes: f70405afc99b ("locking: Add rwsem_assert_held() and rwsem_assert_held_write()")
> Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
> Signed-off-by: Mike Galbraith <efault@gmx.de>

Is Sebastian's patch not merged yet?

https://lore.kernel.org/lkml/20240319182050.U4AzUF3I@linutronix.de/

>  include/linux/rwbase_rt.h |    1 +
>  include/linux/rwsem.h     |    2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> --- a/include/linux/rwbase_rt.h
> +++ b/include/linux/rwbase_rt.h
> @@ -4,6 +4,7 @@
> 
>  #include <linux/rtmutex.h>
>  #include <linux/atomic.h>
> +#include <linux/bug.h>
> 
>  #define READER_BIAS		(1U << 31)
>  #define WRITER_BIAS		(1U << 30)
> --- a/include/linux/rwsem.h
> +++ b/include/linux/rwsem.h
> @@ -174,7 +174,7 @@ static inline void rwsem_assert_held_nol
> 
>  static inline void rwsem_assert_held_write_nolockdep(const struct rw_semaphore *sem)
>  {
> -	rw_base_assert_held_write(sem);
> +	rw_base_assert_held_write(&sem->rwbase);
>  }
> 
>  static __always_inline int rwsem_is_contended(struct rw_semaphore *sem)
>
Re: [patchlet] locking: fix trivial f70405afc99b RT build breakage
Posted by Mike Galbraith 1 year, 10 months ago
On Thu, 2024-04-04 at 13:46 +0100, Matthew Wilcox wrote:
> On Thu, Apr 04, 2024 at 07:02:41AM +0200, Mike Galbraith wrote:
> >
> > Two trivial RT build issues arrived along with f70405afc99b: WARN_ON() being
> > undefined as added to include/linux/rwbase_rt.h, and the wrong parameter (typo)
> > being passed to rw_base_assert_held_write().
> >
> > Fixes: f70405afc99b ("locking: Add rwsem_assert_held() and rwsem_assert_held_write()")
> > Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
> > Signed-off-by: Mike Galbraith <efault@gmx.de>
>
> Is Sebastian's patch not merged yet?
>
> https://lore.kernel.org/lkml/20240319182050.U4AzUF3I@linutronix.de/

Ah, known issue.  Neeevermind.

	-Mike
>