In message: [linux-yocto PATCH] drivers: mpam: Drop the improper assertions on 11/08/2023 Kevin Hao wrote:
> From: Kevin Hao <[email protected]> > > The mpam_reprogram_ris_partid() and mpam_reset_ris() may be invoked on a > specific CPU by smp_call_on_cpu(). According to the implementation of > smp_call_on_cpu(), that also means these functions would be executed > in the worker kthread context. Both the > lockdep_assert_preemption_disabled() and lockdep_assert_held() > assertions are not suitable in this context because: > - the lockdep_assert_preemption_disabled() will trigger false positive > since the preempt is enabled in the worker kthread, but it will not > migrate to other CPU since the worker kthread is bound to one CPU. > - the implementation of lockdep_assert_held() is to check the lock > acquired by the current process. So in a worker kthread, it > definitely not acquire the &msc->lock. > > Signed-off-by: Kevin Hao <[email protected]> > --- > Hi Bruce, > > Please help me merge this into the following two branches: > v5.15/standard/cn-sdkv5.15/octeon > v5.15/standard/preempt-rt/cn-sdkv5.15/octeon merged. Bruce > > drivers/platform/mpam/mpam_devices.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/platform/mpam/mpam_devices.c > b/drivers/platform/mpam/mpam_devices.c > index 6fd355048d99..bd705dfe2498 100644 > --- a/drivers/platform/mpam/mpam_devices.c > +++ b/drivers/platform/mpam/mpam_devices.c > @@ -1040,8 +1040,6 @@ static void mpam_reprogram_ris_partid(struct > mpam_msc_ris *ris, u16 partid, > u16 bwa_fract = GENMASK(15, rprops->bwa_wd); > u16 minval; > > - lockdep_assert_held(&msc->lock); > - > spin_lock(&msc->part_sel_lock); > __mpam_part_sel(ris->ris_idx, partid, msc); > > @@ -1206,13 +1204,9 @@ static int mpam_save_mbwu_state(void *arg) > static int mpam_reset_ris(void *arg) > { > struct mpam_msc_ris *ris = arg; > - struct mpam_msc *msc = ris->msc; > struct reprogram_ris reprogram_arg; > struct mpam_config empty_cfg = { 0 }; > > - lockdep_assert_preemption_disabled(); /* don't migrate to another CPU */ > - lockdep_assert_held(&msc->lock); > - > if (ris->in_reset_state) > return 0; > > -- > 2.39.2 >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#12964): https://lists.yoctoproject.org/g/linux-yocto/message/12964 Mute This Topic: https://lists.yoctoproject.org/mt/100679186/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/leave/6687884/21656/624485779/xyzzy [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
