From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-renesas-soc@vger.kernel.org
Cc: Matthew Wilcox <willy@infradead.org>,
linux-kernel@vger.kernel.org,
Bjorn Andersson <andersson@kernel.org>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
linux-remoteproc@vger.kernel.org
Subject: Re: [PATCH v5 3/3] hwspinlock: add low level debug capabilities
Date: Mon, 27 Jul 2026 10:03:10 +0200 [thread overview]
Message-ID: <amcQvjpxQHzUNrIx@ninjato> (raw)
In-Reply-To: <20260726214219.17703-8-wsa+renesas@sang-engineering.com>
> However, hwspin_lock_request_specific() takes an unsigned int, which
> will truncate the value.
True. XArray uses ulong, but hwspinlocks are actually uint. I'll replace
the ULONG_MAX with UINT_MAX.
> > + ret = hwspin_trylock(hwlock);
> > + if (ret != -EBUSY) {
>
> [Severity: Medium]
> Does this actually test the hardware lock exclusion?
>
> hwspin_trylock() internally invokes spin_trylock() to acquire a local CPU
> software lock. On the second call, the local software spinlock will fail and
> immediately return -EBUSY without ever testing the actual hardware lock
> operations (like hwlock->bank->ops->trylock()).
Bummer, I was quite sure to have used hwspin_trylock_raw already here.
Seems to have fallen through the cracks.
v6 on the way...
next prev parent reply other threads:[~2026-07-27 8:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-26 21:42 [PATCH v5 0/3] hwspinlock: convert to XArray and add " Wolfram Sang
2026-07-26 21:42 ` [PATCH v5 1/3] hwspinlock: Convert to XArray Wolfram Sang
2026-07-26 21:42 ` [PATCH v5 2/3] hwspinlock: add list of mailboxes to debugfs Wolfram Sang
2026-07-26 21:42 ` [PATCH v5 3/3] hwspinlock: add low level debug capabilities Wolfram Sang
2026-07-27 8:03 ` Wolfram Sang [this message]
2026-07-27 10:08 ` Wolfram Sang
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=amcQvjpxQHzUNrIx@ninjato \
--to=wsa+renesas@sang-engineering.com \
--cc=andersson@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=willy@infradead.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®