Re: [PATCH v1 2/2] gpio: tegra: Use raw_spinlock
From: Dmitry Osipenko
Date: Wed Nov 04 2020 - 10:03:14 EST
04.11.2020 17:47, Andy Shevchenko пишет:
> On Wed, Nov 4, 2020 at 3:27 PM Dmitry Osipenko <digetx@xxxxxxxxx> wrote:
>>
>> Use raw_spinlock in order to fix spurious messages about invalid context
>> when spinlock debugging is enabled. This happens because there is a legit
>> nested raw_spinlock->spinlock locking which debug code can't recognize and
>> handle.
>
> This sounds like papering over a problem that exists somewhere else.
>
> What I would rather make as a selling point is that raw spin locks are
> necessary to be in the RT kernel for IRQ chips.
This should be a well-known problem because other GPIO drivers also have
it.
For example this one:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20201104&id=023892ec80f0efcffe22045e92bb89f3f1480f2d
Although, looking at it again, I think there is no real need to change
the dbc_lock since it doesn't relate to the IRQ. Perhaps this could be
improved in a v2.