On Fri, Jul 10, 2026 at 03:12:28PM -0700, Andrew Morton wrote:
> On Fri, 10 Jul 2026 14:27:12 -0700 Stanislav Kinsburskii 
> <[email protected]> wrote:
> 
> > --- a/drivers/accel/amdxdna/aie2_ctx.c
> > +++ b/drivers/accel/amdxdna/aie2_ctx.c
> > @@ -1061,22 +1061,11 @@ static int aie2_populate_range(struct 
> > amdxdna_gem_obj *abo)
> >             return -EFAULT;
> >     }
> >  
> > -   mapp->range.notifier_seq = mmu_interval_read_begin(&mapp->notifier);
> > -   mmap_read_lock(mm);
> > -   ret = hmm_range_fault(&mapp->range);
> > -   mmap_read_unlock(mm);
> > +   ret = hmm_range_fault_unlocked_timeout(&mapp->range,
> > +                   max_t(long, timeout - jiffies, 1));
> 
> max(timeout - jiffies, 1UL)?

"ma" for sure, thank you.
I have the same quesitong here: will "max(timeout - jiffies, 1UL)"
handle negative "timeout - jiffies" values correctly?

Thanks,
Stanislav

Reply via email to