mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <zhantao.tang@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: <bigeasy@linutronix.de>, <tglx@linutronix.de>,
	<rostedt@goodmis.org>, <linux-rt-users@vger.kernel.org>
Subject: [PATCH linux-5.2.y-rt only] hrtimer: correct the logic for grab expiry lock
Date: Wed, 12 Aug 2020 18:50:53 +0800	[thread overview]
Message-ID: <20200812105053.602-1-zhantao.tang@windriver.com> (raw)

From: Zhantao Tang <zhantao.tang@windriver.com>

In commit: 47b6de0b7f22 ("hrtimer: Add a missing bracket and hide `migration_base' on !SMP")
a inline function is_migration_base() is introduced. But
the logic of the hrtimer_grab_expiry_lock was changed.

This patch is to correct it.

Signed-off-by: Zhantao Tang <zhantao.tang@windriver.com>
---
 kernel/time/hrtimer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index b3adac366fd1..6b47e310c68e 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -944,7 +944,7 @@ void hrtimer_grab_expiry_lock(const struct hrtimer *timer)
 {
 	struct hrtimer_clock_base *base = READ_ONCE(timer->base);
 
-	if (timer->is_soft && is_migration_base(base)) {
+	if (timer->is_soft && !is_migration_base(base)) {
 		spin_lock(&base->cpu_base->softirq_expiry_lock);
 		spin_unlock(&base->cpu_base->softirq_expiry_lock);
 	}
-- 
2.17.1


             reply	other threads:[~2020-08-12 10:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-12 10:50 zhantao.tang [this message]
2020-08-12 11:45 ` Rasmus Villemoes
2020-08-12 15:08   ` Steven Rostedt
2020-08-13  1:57   ` Zhantao Tang

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=20200812105053.602-1-zhantao.tang@windriver.com \
    --to=zhantao.tang@windriver.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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®