1. 10 11月, 2022 1 次提交
  2. 02 11月, 2022 1 次提交
  3. 29 9月, 2022 2 次提交
  4. 17 8月, 2022 1 次提交
  5. 04 8月, 2022 3 次提交
  6. 26 7月, 2022 1 次提交
    • K
      net: stmmac: Use readl_poll_timeout_atomic() in atomic state · ceaf8ddd
      Kevin Hao 提交于
      stable inclusion
      from stable-v5.10.113
      commit f593f49fcd174ebe0ebeebecf46fadc134593ddb
      category: bugfix
      bugzilla: https://gitee.com/openeuler/kernel/issues/I5ISAH
      
      Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f593f49fcd174ebe0ebeebecf46fadc134593ddb
      
      --------------------------------
      
      [ Upstream commit 234901de ]
      
      The init_systime() may be invoked in atomic state. We have observed the
      following call trace when running "phc_ctl /dev/ptp0 set" on a Intel
      Agilex board.
        BUG: sleeping function called from invalid context at drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c:74
        in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 381, name: phc_ctl
        preempt_count: 1, expected: 0
        RCU nest depth: 0, expected: 0
        Preemption disabled at:
        [<ffff80000892ef78>] stmmac_set_time+0x34/0x8c
        CPU: 2 PID: 381 Comm: phc_ctl Not tainted 5.18.0-rc2-next-20220414-yocto-standard+ #567
        Hardware name: SoCFPGA Agilex SoCDK (DT)
        Call trace:
         dump_backtrace.part.0+0xc4/0xd0
         show_stack+0x24/0x40
         dump_stack_lvl+0x7c/0xa0
         dump_stack+0x18/0x34
         __might_resched+0x154/0x1c0
         __might_sleep+0x58/0x90
         init_systime+0x78/0x120
         stmmac_set_time+0x64/0x8c
         ptp_clock_settime+0x60/0x9c
         pc_clock_settime+0x6c/0xc0
         __arm64_sys_clock_settime+0x88/0xf0
         invoke_syscall+0x5c/0x130
         el0_svc_common.constprop.0+0x4c/0x100
         do_el0_svc+0x7c/0xa0
         el0_svc+0x58/0xcc
         el0t_64_sync_handler+0xa4/0x130
         el0t_64_sync+0x18c/0x190
      
      So we should use readl_poll_timeout_atomic() here instead of
      readl_poll_timeout().
      
      Also adjust the delay time to 10us to fix a "__bad_udelay" build error
      reported by "kernel test robot <lkp@intel.com>". I have tested this on
      Intel Agilex and NXP S32G boards, there is no delay needed at all.
      So the 10us delay should be long enough for most cases.
      
      Fixes: ff8ed737 ("net: stmmac: use readl_poll_timeout() function in init_systime()")
      Signed-off-by: NKevin Hao <haokexin@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
      Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
      ceaf8ddd
  7. 19 7月, 2022 1 次提交
  8. 18 7月, 2022 1 次提交
  9. 28 5月, 2022 1 次提交
  10. 19 5月, 2022 1 次提交
  11. 17 5月, 2022 2 次提交
  12. 10 5月, 2022 1 次提交
  13. 14 1月, 2022 5 次提交
  14. 27 12月, 2021 1 次提交
  15. 06 12月, 2021 7 次提交
  16. 15 11月, 2021 4 次提交
  17. 21 10月, 2021 1 次提交
  18. 19 10月, 2021 2 次提交
  19. 15 10月, 2021 2 次提交
  20. 26 9月, 2021 1 次提交
  21. 06 7月, 2021 1 次提交