Re: udelay vs usleep_range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> But looking into the code on line 634 where I found the udelay(33), I
> have the impression that this is a false positive, something your
> checkpatch didn't catch properly. That call is inside a function named
> nvec_interrupt(), and the line:
> 
>         err = devm_request_irq(&pdev->dev, nvec->irq, nvec_interrupt,
> 0, "nvec", nvec);
> 
> declares it as the interrupt handler. The interrupt handler can't
> sleep(interrupt handler runs in the atomic context in terminology of
> timers-howto.txt), and using udelay() seems to be the thing to do
> here.
>
devm_request_irq
  -> devm_request_threaded_irq 
       -> request_threaded_irq

so this should be ok here.

thx!
hofrat

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux