[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211124095218.4a83f39e@canb.auug.org.au>
Date: Wed, 24 Nov 2021 09:52:18 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Arnd Bergmann <arnd@...db.de>,
Naresh Kamboju <naresh.kamboju@...aro.org>,
Linux-Next Mailing List <linux-next@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
Linux-sh list <linux-sh@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
Waiman Long <longman@...hat.com>,
Boqun Feng <boqun.feng@...il.com>,
Minchan Kim <minchan@...nel.org>,
Mike Galbraith <umgwanakikbuti@...il.com>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
Rich Felker <dalias@...c.org>, lkft-triage@...ts.linaro.org
Subject: Re: [PATCH v2] locking: Fixup write_lock_nested() implementation.
Hi all,
On Tue, 23 Nov 2021 18:01:34 +0100 Sebastian Andrzej Siewior <bigeasy@...utronix.de> wrote:
>
> Andrew, please merge it into:
> locking/rwlocks: introduce write_lock_nested
> locking-rwlocks-introduce-write_lock_nested.patch
>
> And if someone could test it, I get sh4 defconfig built with and without
> lockdep. x86 seems still to build, too. So it can't be that bad.
>
> v1…v2: I noticed a typo in _raw_write_lock_nested() and decided that it
> is no needed so now it is removed for !CONFIG_INLINE_WRITE_LOCK.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> ---
> include/linux/rwlock_api_smp.h | 1 -
> kernel/locking/spinlock.c | 4 ++++
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/rwlock_api_smp.h b/include/linux/rwlock_api_smp.h
> index f0c535ec4e654..dceb0a59b6927 100644
> --- a/include/linux/rwlock_api_smp.h
> +++ b/include/linux/rwlock_api_smp.h
> @@ -47,7 +47,6 @@ _raw_write_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
>
> #ifdef CONFIG_INLINE_WRITE_LOCK
> #define _raw_write_lock(lock) __raw_write_lock(lock)
> -#define _raw_write_lock_nested(lock, subclass) __raw_write_lock_nested(lock, subclass)
> #endif
>
> #ifdef CONFIG_INLINE_READ_LOCK_BH
> diff --git a/kernel/locking/spinlock.c b/kernel/locking/spinlock.c
> index 996811efa6d6e..7f49baaa49793 100644
> --- a/kernel/locking/spinlock.c
> +++ b/kernel/locking/spinlock.c
> @@ -301,6 +301,10 @@ void __lockfunc _raw_write_lock(rwlock_t *lock)
> }
> EXPORT_SYMBOL(_raw_write_lock);
>
> +#ifndef CONFIG_DEBUG_LOCK_ALLOC
> +#define __raw_write_lock_nested(lock, subclass) __raw_write_lock(((void)(subclass), (lock)))
> +#endif
> +
> void __lockfunc _raw_write_lock_nested(rwlock_t *lock, int subclass)
> {
> __raw_write_lock_nested(lock, subclass);
> --
> 2.34.0
>
I have added that patch to iinux-next today.
--
Cheers,
Stephen Rothwell
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists