Messages in this thread | | | From | Arnd Bergmann <> | Date | Tue, 16 Nov 2021 13:02:18 +0100 | Subject | Re: [PATCH] mfd: altera-sysmgr: enable raw spinlock feature for preempt-rt kernel |
| |
On Tue, Nov 16, 2021 at 11:54 AM Meng Li <Meng.Li@windriver.com> wrote: > diff --git a/drivers/mfd/altera-sysmgr.c b/drivers/mfd/altera-sysmgr.c > index 5d3715a28b28..27271cec5d53 100644 > --- a/drivers/mfd/altera-sysmgr.c > +++ b/drivers/mfd/altera-sysmgr.c > @@ -83,6 +83,9 @@ static struct regmap_config altr_sysmgr_regmap_cfg = { > .fast_io = true, > .use_single_read = true, > .use_single_write = true, > +#ifdef CONFIG_PREEMPT_RT > + .use_raw_spinlock = true, > +#endif
I think you should remove the #ifdef here: if PREEMPT_RT is disabled, the flag has no effect because spinlock behaves the same way as raw_spinlock. If anything else starts requiring the use of raw spinlocks, then we probably want the flag to be set here as well.
Arnd
| |