In message: Re: [linux-yocto][v5.10/standard/preempt-rt/sdkv5.10/axxia][PATCH] 
fix rtmutex build error
on 27/10/2024 Wang, Jinfeng (CN) wrote:

> Hi Burce,
> 
> this patch is needed in all the preempt-rt branch, could you please merge
> them all:
> 
>   v5.10/standard/preempt-rt/base
>   v5.10/standard/preempt-rt/bcm-2xxx-rpi
>   v5.10/standard/preempt-rt/cn-sdkv4.18/cn96xx
>   v5.10/standard/preempt-rt/cn-sdkv5.4/octeon
>   v5.10/standard/preempt-rt/intel-sdk-5.10/intel-socfpga
>   v5.10/standard/preempt-rt/nxp-sdk-5.10/nxp-s32g2xx
>   v5.10/standard/preempt-rt/nxp-sdk-5.10/nxp-soc
>   v5.10/standard/preempt-rt/sdkv5.10/xlnx-soc
>   v5.10/standard/preempt-rt/ti-sdk-5.10/ti-j72xx
>   v5.10/standard/preempt-rt/x86
> 
>   v5.10/standard/preempt-rt/sdkv5.10/axxia   ----this is already described
> in the title.

merged.

Bruce

> 
> 
> Thanks.
> 
> Jinfeng
> 
> On 10/25/2024 3:22 PM, Wang, Jinfeng (CN) via lists.yoctoproject.org wrote:
> > From: Jinfeng Wang <jinfeng.wang...@windriver.com>
> > 
> > Fix the following error:
> >    rtmutex.c:1608:9: error: implicit declaration of function 
> > 'rt_mutex_print_deadlock';
> >    did you mean 'rt_mutex_handle_deadlock'?
> > 
> >    rtmutex.c:1739:63: error: passing argument 3 of 
> > 'rt_mutex_handle_deadlock' from
> >    incompatible pointer type [-Werror=incompatible-pointer-types]
> > 
> > Signed-off-by: Jinfeng Wang <jinfeng.wang...@windriver.com>
> > ---
> >   kernel/locking/rtmutex.c | 38 ++++----------------------------------
> >   1 file changed, 4 insertions(+), 34 deletions(-)
> > 
> > diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
> > index 875381d72255..bec7e07a80dc 100644
> > --- a/kernel/locking/rtmutex.c
> > +++ b/kernel/locking/rtmutex.c
> > @@ -1602,10 +1602,7 @@ static void rt_mutex_handle_deadlock(int res, int 
> > detect_deadlock,
> >             return;
> >     raw_spin_unlock_irq(&lock->wait_lock);
> > -   /*
> > -    * Yell lowdly and stop the task right here.
> > -    */
> > -   rt_mutex_print_deadlock(w);
> > +
> >     while (1) {
> >             set_current_state(TASK_INTERRUPTIBLE);
> >             schedule();
> > @@ -1736,7 +1733,7 @@ int __sched rt_mutex_slowlock_locked(struct rt_mutex 
> > *lock, int state,
> >             remove_waiter(lock, waiter);
> >             /* ww_mutex wants to report EDEADLK/EALREADY, let it */
> >             if (!ww_ctx)
> > -                   rt_mutex_handle_deadlock(ret, chwalk, waiter);
> > +                   rt_mutex_handle_deadlock(ret, chwalk, lock, waiter);
> >     } else if (ww_ctx) {
> >             ww_mutex_account_lock(lock, ww_ctx);
> >     }
> > @@ -1774,35 +1771,8 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state,
> >      */
> >     raw_spin_lock_irqsave(&lock->wait_lock, flags);
> > -   /* Try to acquire the lock again: */
> > -   if (try_to_take_rt_mutex(lock, current, NULL)) {
> > -           raw_spin_unlock_irqrestore(&lock->wait_lock, flags);
> > -           return 0;
> > -   }
> > -
> > -   set_current_state(state);
> > -
> > -   /* Setup the timer, when timeout != NULL */
> > -   if (unlikely(timeout))
> > -           hrtimer_start_expires(&timeout->timer, HRTIMER_MODE_ABS);
> > -
> > -   ret = task_blocks_on_rt_mutex(lock, &waiter, current, chwalk);
> > -
> > -   if (likely(!ret))
> > -           /* sleep on the mutex */
> > -           ret = __rt_mutex_slowlock(lock, state, timeout, &waiter);
> > -
> > -   if (unlikely(ret)) {
> > -           __set_current_state(TASK_RUNNING);
> > -           remove_waiter(lock, &waiter);
> > -           rt_mutex_handle_deadlock(ret, chwalk, lock, &waiter);
> > -   }
> > -
> > -   /*
> > -    * try_to_take_rt_mutex() sets the waiter bit
> > -    * unconditionally. We might have to fix that up.
> > -    */
> > -   fixup_rt_mutex_waiters(lock);
> > +   ret = rt_mutex_slowlock_locked(lock, state, timeout, chwalk, ww_ctx,
> > +                                  &waiter);
> >     raw_spin_unlock_irqrestore(&lock->wait_lock, flags);
> > 
> > 
> > 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#14520): 
https://lists.yoctoproject.org/g/linux-yocto/message/14520
Mute This Topic: https://lists.yoctoproject.org/mt/109204300/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to