From: Guangbo Cui <2407018371@qq.com>
To: lyude@redhat.com
Cc: boqun.feng@gmail.com, linux-kernel@vger.kernel.org,
longman@redhat.com, mingo@redhat.com, peterz@infradead.org,
rust-for-linux@vger.kernel.org, tglx@linutronix.de,
will@kernel.org, 2407018371@qq.com
Subject: Re: [PATCH v9 9/9] locking: Switch to _irq_{disable,enable}() variants in cleanup guards
Date: Sat, 5 Apr 2025 16:25:11 +0800 [thread overview]
Message-ID: <tencent_6257D365DB7BACED49A32ED535ACE884CD09@qq.com> (raw)
In-Reply-To: <20250227221924.265259-10-lyude@redhat.com>
> include/linux/spinlock.h | 26 ++++++++++++--------------
> 1 file changed, 12 insertions(+), 14 deletions(-)
>
> diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
> index 897114d60cfd4..764c9fd797d0e 100644
> --- a/include/linux/spinlock.h
> +++ b/include/linux/spinlock.h
> @@ -605,18 +605,17 @@ DEFINE_LOCK_GUARD_1(raw_spinlock_nested, raw_spinlock_t,
> raw_spin_unlock(_T->lock))
>
> DEFINE_LOCK_GUARD_1(raw_spinlock_irq, raw_spinlock_t,
> - raw_spin_lock_irq(_T->lock),
> - raw_spin_unlock_irq(_T->lock))
> + raw_spin_lock_irq_disable(_T->lock),
> + raw_spin_unlock_irq_enable(_T->lock))
>
> -DEFINE_LOCK_GUARD_1_COND(raw_spinlock_irq, _try, raw_spin_trylock_irq(_T->lock))
> +DEFINE_LOCK_GUARD_1_COND(raw_spinlock_irq, _try, raw_spin_trylock_irq_disable(_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),
> - unsigned long flags)
> + raw_spin_lock_irq_disable(_T->lock),
> + raw_spin_unlock_irq_enable(_T->lock))
>
> DEFINE_LOCK_GUARD_1_COND(raw_spinlock_irqsave, _try,
> - raw_spin_trylock_irqsave(_T->lock, _T->flags))
> + raw_spin_trylock_irq_disable(_T->lock))
It seems that the `raw_spin_trylock_irq_disable` function is missing from
spinlock_rt.h, which will lead to a build failure when compiling with
PREEMPT_RT enabled.
Best regards,
Guangbo Cui
next prev parent reply other threads:[~2025-04-05 8:25 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250227221924.265259-1-lyude@redhat.com>
2025-02-27 22:10 ` [PATCH v9 1/9] preempt: Introduce HARDIRQ_DISABLE_BITS Lyude Paul
2025-02-27 23:09 ` Steven Rostedt
2025-02-28 1:33 ` Boqun Feng
2025-03-03 21:55 ` Lyude Paul
2025-02-28 7:57 ` Peter Zijlstra
2025-02-27 22:10 ` [PATCH v9 2/9] preempt: Introduce __preempt_count_{sub, add}_return() Lyude Paul
2025-02-28 1:49 ` Boqun Feng
2025-02-28 9:15 ` Heiko Carstens
2025-02-28 9:24 ` Peter Zijlstra
2025-04-30 21:38 ` Lyude Paul
2025-05-05 9:56 ` Heiko Carstens
2025-03-01 18:49 ` kernel test robot
2025-03-01 19:00 ` kernel test robot
2025-02-27 22:10 ` [PATCH v9 3/9] irq & spin_lock: Add counted interrupt disabling/enabling Lyude Paul
2025-03-01 20:19 ` kernel test robot
2025-02-27 22:10 ` [PATCH v9 4/9] rust: Introduce interrupt module Lyude Paul
2025-03-02 16:56 ` Dirk Behme
2025-02-27 22:10 ` [PATCH v9 5/9] rust: helper: Add spin_{un,}lock_irq_{enable,disable}() helpers Lyude Paul
2025-02-27 22:10 ` [PATCH v9 6/9] rust: sync: Add SpinLockIrq Lyude Paul
2025-03-02 11:51 ` Guangbo Cui
2025-03-03 22:15 ` Lyude Paul
2025-03-02 17:07 ` Dirk Behme
2025-04-04 21:56 ` Lyude Paul
2025-02-27 22:10 ` [PATCH v9 7/9] rust: sync: Introduce lock::Backend::Context Lyude Paul
2025-03-03 14:22 ` Dirk Behme
2025-02-27 22:10 ` [PATCH v9 8/9] rust: sync: lock: Add `Backend::BackendInContext` Lyude Paul
2025-03-03 14:23 ` Dirk Behme
2025-02-27 22:10 ` [PATCH v9 9/9] locking: Switch to _irq_{disable,enable}() variants in cleanup guards Lyude Paul
2025-04-05 8:25 ` Guangbo Cui [this message]
2025-04-05 8:55 ` Guangbo Cui
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=tencent_6257D365DB7BACED49A32ED535ACE884CD09@qq.com \
--to=2407018371@qq.com \
--cc=boqun.feng@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=lyude@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tglx@linutronix.de \
--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
all inboxes | Powered by JetHome®