From: Kent Gibson <warthog618@gmail.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
linus.walleij@linaro.org, andy@kernel.org
Subject: Re: [PATCH v2 2/5] gpiolib: cdev: relocate debounce_period_us from struct gpio_desc
Date: Thu, 14 Dec 2023 23:08:05 +0800 [thread overview]
Message-ID: <ZXsaVSskFOXcSLZG@rigel> (raw)
In-Reply-To: <CAMRc=Mf4FpzLqQZ5phRZLbTsGCfdYaELZHnLM13vnWnkAkLXkQ@mail.gmail.com>
On Thu, Dec 14, 2023 at 03:56:37PM +0100, Bartosz Golaszewski wrote:
> On Thu, Dec 14, 2023 at 3:45 PM Kent Gibson <warthog618@gmail.com> wrote:
> >
> > On Thu, Dec 14, 2023 at 03:29:28PM +0100, Bartosz Golaszewski wrote:
> > > On Thu, Dec 14, 2023 at 10:58 AM Kent Gibson <warthog618@gmail.com> wrote:
> > > >
> > > >
> > > > +/*
> > > > + * Used to populate gpio_v2_line_info with cdev specific fields not contained
> > > > + * in the struct gpio_desc.
> > > > + * A line is determined to contain supplemental information by
> > > > + * line_is_supplemental().
> > > > + */
> > > > +static struct {
> > > > + /* a rbtree of the struct lines containing the supplemental info */
> > > > + struct rb_root tree;
> > > > + /* covers tree */
> > > > + spinlock_t lock;
> > >
> > > Looks like this is never taken from atomic context? Can this be a mutex instead?
> > >
> >
> > Correct, only from thread context.
> >
> > Can be a mutex, but it only covers tree lookups which should be quick
> > as the tree is kept minimal, and I wouldn't expect it to ever get to the
> > mutex slowpath, so a spinlock seemed more appropriate.
> >
>
> Fair enough.
>
> Bart
>
While I think of it, what tree should I be basing on?
These patches are based on v6.7-rc5, and I'm not aware of any other
changes they may contend with, but best to be on the right tree to be
sure.
Cheers,
Kent.
next prev parent reply other threads:[~2023-12-14 15:08 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-14 9:58 [PATCH v2 0/5] gpiolib: cdev: relocate debounce_period_us Kent Gibson
2023-12-14 9:58 ` [PATCH v2 1/5] gpiolib: cdev: adopt scoped_guard() Kent Gibson
2023-12-14 11:50 ` Kent Gibson
2023-12-14 14:53 ` Andy Shevchenko
2023-12-14 14:53 ` Andy Shevchenko
2023-12-14 9:58 ` [PATCH v2 2/5] gpiolib: cdev: relocate debounce_period_us from struct gpio_desc Kent Gibson
2023-12-14 14:29 ` Bartosz Golaszewski
2023-12-14 14:45 ` Kent Gibson
2023-12-14 14:56 ` Bartosz Golaszewski
2023-12-14 15:08 ` Kent Gibson [this message]
2023-12-14 15:03 ` Andy Shevchenko
2023-12-14 15:09 ` Andy Shevchenko
2023-12-14 16:14 ` Kent Gibson
2023-12-14 16:41 ` Andy Shevchenko
2023-12-14 21:06 ` Bartosz Golaszewski
2023-12-15 1:04 ` Kent Gibson
2023-12-15 8:07 ` Bartosz Golaszewski
2023-12-15 8:15 ` Kent Gibson
2023-12-15 16:31 ` Andy Shevchenko
2023-12-14 9:58 ` [PATCH v2 3/5] gpiolib: remove " Kent Gibson
2023-12-14 9:58 ` [PATCH v2 4/5] gpiolib: cdev: reduce locking in gpio_desc_to_lineinfo() Kent Gibson
2023-12-14 15:10 ` Andy Shevchenko
2023-12-14 15:19 ` Kent Gibson
2023-12-14 15:27 ` Andy Shevchenko
2023-12-14 15:34 ` Kent Gibson
2023-12-14 15:46 ` Kent Gibson
2023-12-14 15:52 ` Andy Shevchenko
2023-12-14 15:53 ` Kent Gibson
2023-12-14 16:02 ` Andy Shevchenko
2023-12-14 15:50 ` Andy Shevchenko
2023-12-14 16:05 ` Kent Gibson
2023-12-14 9:58 ` [PATCH v2 5/5] gpiolib: cdev: improve documentation of get/set values Kent Gibson
2023-12-14 15:12 ` Andy Shevchenko
2023-12-14 15:23 ` Kent Gibson
2023-12-14 15:27 ` Andy Shevchenko
-- strict thread matches above, loose matches on Subject: below --
2023-12-14 16:46 [PATCH v2 2/5] gpiolib: cdev: relocate debounce_period_us from struct gpio_desc Andy Shevchenko
2023-12-14 21:05 ` Bartosz Golaszewski
2023-12-15 20:23 Andy Shevchenko
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=ZXsaVSskFOXcSLZG@rigel \
--to=warthog618@gmail.com \
--cc=andy@kernel.org \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.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).