Re: [PATCH 1/2] hwspinlock: reverse logic for used channels
From: Wolfram Sang
Date: Fri Jun 19 2026 - 03:18:16 EST
On Fri, Jun 19, 2026 at 07:06:34AM +0200, Wolfram Sang wrote:
>
> > > @@ -42,8 +42,8 @@
> > > * used as the ID's of the hwspinlock instances).
> > > *
> > > * The radix tree API supports tagging items in the tree, which this
> > > - * framework uses to mark unused hwspinlock instances (see the
> > > - * HWSPINLOCK_UNUSED tag above). As a result, the process of querying the
> > > + * framework uses to mark used hwspinlock instances (see the
> > > + * HWSPINLOCK_USED tag above). As a result, the process of querying the
> > > * tree, looking for an unused hwspinlock instance, is now reduced to a
> > > * single radix tree API call.
> > > */
> >
> > [Severity: Low]
> > Is the documentation internally contradictory here? Because the tag is now
> > exclusively applied to USED locks, it seems impossible to query for an
> > UNUSED lock with a single tag-based API call.
>
> Can reword to "getting the hwspinlock state". The core doesn't offer to
> look for just some unused hwlock. Only specific locks are looked for and
> their state is queried.
On second thought, this still shows the original intention of using an
UNUSED flag instead of a USED flag. I will probably drop this patch in
v2. It is less intrusive and probably more future proof.
Attachment:
signature.asc
Description: PGP signature