1. 22 Mar, 2021 1 commit
    • Uwe Kleine-König's avatar
      pwm: bcm2835: Improve period and duty cycle calculation · ca0d2fb7
      Uwe Kleine-König authored
      With an input clk rate bigger than 2000000000, scaler would have been
      zero which then would have resulted in a division by zero.
      
      Also the originally implemented algorithm divided by the result of a
      division. This nearly always looses precision. Consider a requested period
      of 1000000 ns. With an input clock frequency of 32786885 Hz the hardware
      was configured with an actual period of 983869.007 ns (PERIOD = 32258)
      while the hardware can provide 1000003.508 ns (PERIOD = 32787).
      And note if the input clock frequency was 32786886 Hz instead, the hardware
      was configured to 1016656.477 ns (PERIOD = 33333) while the optimal
      setting results in 1000003.477 ns (PERIOD = 32787).
      
      This patch implements proper range checking and only divides once for
      the calculation of period (and similar for duty_cycle).
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Reviewed-by: default avatarLino Sanfilippo <LinoSanfilippo@gmx.de>
      Tested-by: default avatarLino Sanfilippo <LinoSanfilippo@gmx.de>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      ca0d2fb7
  2. 06 Mar, 2021 4 commits
  3. 05 Mar, 2021 33 commits
  4. 04 Mar, 2021 2 commits
    • Jens Axboe's avatar
      kernel: provide create_io_thread() helper · cc440e87
      Jens Axboe authored
      Provide a generic helper for setting up an io_uring worker. Returns a
      task_struct so that the caller can do whatever setup is needed, then call
      wake_up_new_task() to kick it into gear.
      
      Add a kernel_clone_args member, io_thread, which tells copy_process() to
      mark the task with PF_IO_WORKER.
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      cc440e87
    • Pavel Begunkov's avatar
      io_uring: reliably cancel linked timeouts · dd59a3d5
      Pavel Begunkov authored
      Linked timeouts are fired asynchronously (i.e. soft-irq), and use
      generic cancellation paths to do its stuff, including poking into io-wq.
      The problem is that it's racy to access tctx->io_wq, as
      io_uring_task_cancel() and others may be happening at this exact moment.
      Mark linked timeouts with REQ_F_INLIFGHT for now, making sure there are
      no timeouts before io-wq destraction.
      Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      dd59a3d5