All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Naresh Kamboju <naresh.kamboju@linaro.org>,
	Linux-Next Mailing List <linux-next@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
	Waiman Long <longman@redhat.com>,
	Boqun Feng <boqun.feng@gmail.com>,
	Minchan Kim <minchan@kernel.org>,
	Mike Galbraith <umgwanakikbuti@gmail.com>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	Rich Felker <dalias@libc.org>,
	lkft-triage@lists.linaro.org
Subject: Re: [PATCH v2] locking: Fixup write_lock_nested() implementation.
Date: Wed, 24 Nov 2021 09:52:18 +1100	[thread overview]
Message-ID: <20211124095218.4a83f39e@canb.auug.org.au> (raw)
In-Reply-To: <20211123170134.y6xb7pmpgdn4m3bn@linutronix.de>

[-- Attachment #1: Type: text/plain, Size: 1978 bytes --]

Hi all,

On Tue, 23 Nov 2021 18:01:34 +0100 Sebastian Andrzej Siewior <bigeasy@linutronix.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@linutronix.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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-11-23 22:52 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 11:38 spinlock.c:306:9: error: implicit declaration of function '__raw_write_lock_nested' Naresh Kamboju
2021-11-23 13:19 ` Arnd Bergmann
2021-11-23 14:48   ` Geert Uytterhoeven
2021-11-23 14:50     ` Sebastian Andrzej Siewior
2021-11-23 16:07       ` [PATCH] locking: Fixup write_lock_nested() implementation Sebastian Andrzej Siewior
2021-11-23 17:01         ` [PATCH v2] " Sebastian Andrzej Siewior
2021-11-23 22:52           ` Stephen Rothwell [this message]
2021-11-24 10:01   ` spinlock.c:306:9: error: implicit declaration of function '__raw_write_lock_nested' Rob Landley
2021-11-24 10:43     ` Arnd Bergmann
2021-11-24  7:31 ` Rob Landley
2021-11-24  7:49   ` Arnd Bergmann
2021-11-24 13:15     ` André Almeida
2021-11-24 14:21       ` Arnd Bergmann
2021-11-24 13:21     ` [PATCH 1/1] futex: Wireup futex_waitv syscall André Almeida
2021-11-24 13:21       ` André Almeida
2021-11-24 13:21       ` André Almeida
2021-11-24 13:21       ` André Almeida
2021-11-24 13:49       ` Geert Uytterhoeven
2021-11-24 13:49         ` Geert Uytterhoeven
2021-11-24 13:49         ` Geert Uytterhoeven
2021-11-24 13:49         ` Geert Uytterhoeven
2021-11-24 14:29       ` Arnd Bergmann
2021-11-24 14:29         ` Arnd Bergmann
2021-11-24 14:29         ` Arnd Bergmann
2021-11-24 14:29         ` Arnd Bergmann
2021-11-24 15:56         ` André Almeida
2021-11-24 15:56           ` André Almeida
2021-11-24 15:56           ` André Almeida
2021-11-24 15:56           ` André Almeida
2021-11-24 23:18         ` Thomas Gleixner
2021-11-24 23:18           ` Thomas Gleixner
2021-11-24 23:18           ` Thomas Gleixner
2021-11-24 23:18           ` Thomas Gleixner
2021-11-24 17:23       ` Max Filippov
2021-11-24 17:23         ` Max Filippov
2021-11-24 17:23         ` Max Filippov
2021-11-24 17:23         ` Max Filippov
2021-11-24 23:07       ` Michael Ellerman
2021-11-24 23:07         ` Michael Ellerman
2021-11-24 23:07         ` Michael Ellerman
2021-11-24 23:07         ` Michael Ellerman
2021-11-24 23:38     ` spinlock.c:306:9: error: implicit declaration of function '__raw_write_lock_nested' Rob Landley
2021-11-25  7:25       ` Arnd Bergmann
2021-11-25 12:10         ` Rob Landley
2021-11-26 23:51           ` Stafford Horne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211124095218.4a83f39e@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=bigeasy@linutronix.de \
    --cc=boqun.feng@gmail.com \
    --cc=dalias@libc.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=longman@redhat.com \
    --cc=minchan@kernel.org \
    --cc=mingo@redhat.com \
    --cc=naresh.kamboju@linaro.org \
    --cc=peterz@infradead.org \
    --cc=senozhatsky@chromium.org \
    --cc=umgwanakikbuti@gmail.com \
    --cc=will@kernel.org \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.