1. 19 Nov, 2020 3 commits
    • Jakub Kicinski's avatar
      Merge branch 'atm-replace-in_interrupt-usage' · 280bb3f9
      Jakub Kicinski authored
      Sebastian Andrzej Siewior says:
      
      ====================
      atm: Replace in_interrupt usage
      
      this mini series contains the removal of in_interrupt() in drivers/atm
      ====================
      
      Link: https://lore.kernel.org/r/20201116162117.387191-1-bigeasy@linutronix.deSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      280bb3f9
    • Sebastian Andrzej Siewior's avatar
      atm: lanai: Remove in_interrupt() usage · 2de680de
      Sebastian Andrzej Siewior authored
      lanai_shutdown_tx_vci() uses in_interrupt() to issue a warning message
      if the function was used in context in which it is not safe to sleep.
      
      The usage of in_interrupt() in driver code is deprecated as it can not always
      detect all states where it is not allowed to sleep.
      
      msleep() has debug code which will trigger a warning if used in bad
      context.
      
      Remove in_interrupt().
      
      Cc: Chas Williams <3chas3@gmail.com>
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2de680de
    • Sebastian Andrzej Siewior's avatar
      atm: nicstar: Replace in_interrupt() usage · f2bcc2fa
      Sebastian Andrzej Siewior authored
      push_scqe() uses in_interrupt() to figure out if it is allowed to sleep.
      
      The usage of in_interrupt() in drivers is phased out and Linus clearly
      requested that code which changes behaviour depending on context should
      either be separated or the context be conveyed in an argument passed by the
      caller, which usually knows the context.
      
      Aside of that in_interrupt() is not correct as it does not catch preempt
      disabled regions which neither can sleep.
      
      ns_send() (the only caller of push_scqe()) has the following callers:
      
      - vcc_sendmsg() used as proto_ops::sendmsg is expected to be invoked in
        preemtible context.
        -> vcc->dev->ops->send() (ns_send())
      
      - atm_vcc::send via atmdev_ops::send either directly (pointer copied by
        atm_init_aal34() or atm_init_aal5()) or via atm_send_aal0().
        This is invoked by drivers (like br2684, clip, pppoatm, ...) which are
        called from net_device_ops::ndo_start_xmit with BH disabled.
      
      Add atmdev_ops::send_bh which is used by callers from BH context
      (atm_send_aal*()) and if this callback missing then ::send is used
      instead.
      Implement this callback in nicstar and use it to replace in_interrupt().
      
      Cc: Chas Williams <3chas3@gmail.com>
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f2bcc2fa
  2. 18 Nov, 2020 25 commits
  3. 17 Nov, 2020 12 commits