From: Peter Zijlstra <peterz@infradead.org>
To: Daniel Thompson <daniel.thompson@linaro.org>
Cc: sumit.garg@linaro.org, jason.wessel@windriver.com,
dianders@chromium.org, kgdb-bugreport@lists.sourceforge.net,
linux-kernel@vger.kernel.org, patches@linaro.org,
pmladek@suse.com, sergey.senozhatsky@gmail.com,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>
Subject: Re: [RFC PATCH 1/2] debug: Convert dbg_slave_lock to an atomic
Date: Fri, 22 May 2020 18:26:47 +0200 [thread overview]
Message-ID: <20200522162647.GW317569@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20200522145510.2109799-2-daniel.thompson@linaro.org>
On Fri, May 22, 2020 at 03:55:09PM +0100, Daniel Thompson wrote:
> +static atomic_t slaves_must_spin;
> + if (!atomic_read(&slaves_must_spin))
> + atomic_set(&slaves_must_spin, 1);
> + atomic_set(&slaves_must_spin, 0);
There is no atomic operation there; this is pointless use of atomic_t.
next prev parent reply other threads:[~2020-05-22 16:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-22 14:55 [RFC PATCH 0/2] Introduce KGDB_DEBUG_SPINLOCKS Daniel Thompson
2020-05-22 14:55 ` [RFC PATCH 1/2] debug: Convert dbg_slave_lock to an atomic Daniel Thompson
2020-05-22 16:26 ` Peter Zijlstra [this message]
2020-05-22 14:55 ` [RFC PATCH 2/2] locking/spinlock/debug: Add checks for kgdb trap safety Daniel Thompson
2020-05-22 16:35 ` Peter Zijlstra
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=20200522162647.GW317569@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=daniel.thompson@linaro.org \
--cc=dianders@chromium.org \
--cc=jason.wessel@windriver.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=patches@linaro.org \
--cc=pmladek@suse.com \
--cc=sergey.senozhatsky@gmail.com \
--cc=sumit.garg@linaro.org \
--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;
as well as URLs for NNTP newsgroup(s).