From: Peter Zijlstra <peterz@infradead.org>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Antoine Tenart <atenart@kernel.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
Waiman Long <longman@redhat.com>,
Boqun Feng <boqun.feng@gmail.com>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
linux-crypto@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
upstream@airoha.com
Subject: Re: [PATCH v4 1/3] spinlock: extend guard with spinlock_bh variants
Date: Fri, 25 Oct 2024 11:54:25 +0200 [thread overview]
Message-ID: <20241025095425.GI14555@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20241025094734.1614-1-ansuelsmth@gmail.com>
On Fri, Oct 25, 2024 at 11:47:22AM +0200, Christian Marangi wrote:
> Extend guard APIs with missing raw/spinlock_bh variants.
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Feel free to take this through whatever tree the rest of the patches are
targeted at. I don't think I've seen conflicting 'demand' so far.
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
> Changes v4:
> - Out of RFC
> Changes v2:
> - Add this patch
>
> include/linux/spinlock.h | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
> index 63dd8cf3c3c2..d3561c4a080e 100644
> --- a/include/linux/spinlock.h
> +++ b/include/linux/spinlock.h
> @@ -548,6 +548,12 @@ DEFINE_LOCK_GUARD_1(raw_spinlock_irq, raw_spinlock_t,
>
> DEFINE_LOCK_GUARD_1_COND(raw_spinlock_irq, _try, raw_spin_trylock_irq(_T->lock))
>
> +DEFINE_LOCK_GUARD_1(raw_spinlock_bh, raw_spinlock_t,
> + raw_spin_lock_bh(_T->lock),
> + raw_spin_unlock_bh(_T->lock))
> +
> +DEFINE_LOCK_GUARD_1_COND(raw_spinlock_bh, _try, raw_spin_trylock_bh(_T->lock))
> +
> DEFINE_LOCK_GUARD_1(raw_spinlock_irqsave, raw_spinlock_t,
> raw_spin_lock_irqsave(_T->lock, _T->flags),
> raw_spin_unlock_irqrestore(_T->lock, _T->flags),
> @@ -569,6 +575,13 @@ DEFINE_LOCK_GUARD_1(spinlock_irq, spinlock_t,
> DEFINE_LOCK_GUARD_1_COND(spinlock_irq, _try,
> spin_trylock_irq(_T->lock))
>
> +DEFINE_LOCK_GUARD_1(spinlock_bh, spinlock_t,
> + spin_lock_bh(_T->lock),
> + spin_unlock_bh(_T->lock))
> +
> +DEFINE_LOCK_GUARD_1_COND(spinlock_bh, _try,
> + spin_trylock_bh(_T->lock))
> +
> DEFINE_LOCK_GUARD_1(spinlock_irqsave, spinlock_t,
> spin_lock_irqsave(_T->lock, _T->flags),
> spin_unlock_irqrestore(_T->lock, _T->flags),
> --
> 2.45.2
>
prev parent reply other threads:[~2024-10-25 9:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-25 9:47 [PATCH v4 1/3] spinlock: extend guard with spinlock_bh variants Christian Marangi
2024-10-25 9:47 ` [PATCH v4 2/3] dt-bindings: crypto: Add Inside Secure SafeXcel EIP-93 crypto engine Christian Marangi
2024-10-25 16:44 ` Conor Dooley
2024-10-25 17:38 ` Christian Marangi
2024-10-27 22:31 ` Rob Herring
2024-10-25 9:47 ` [PATCH v4 3/3] crypto: Add Mediatek EIP-93 crypto engine support Christian Marangi
2024-10-26 12:14 ` kernel test robot
2024-10-28 8:47 ` Dan Carpenter
2024-10-28 8:54 ` Dan Carpenter
2024-10-28 8:48 ` Dan Carpenter
2024-10-25 9:54 ` Peter Zijlstra [this message]
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=20241025095425.GI14555@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=ansuelsmth@gmail.com \
--cc=atenart@kernel.org \
--cc=boqun.feng@gmail.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=justinstitt@google.com \
--cc=krzk+dt@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=robh@kernel.org \
--cc=upstream@airoha.com \
--cc=will@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox