1. 30 7月, 2019 11 次提交
  2. 29 7月, 2019 10 次提交
  3. 28 7月, 2019 12 次提交
  4. 27 7月, 2019 1 次提交
  5. 26 7月, 2019 4 次提交
  6. 25 7月, 2019 2 次提交
    • A
      mlx4: avoid large stack usage in mlx4_init_hca() · 9eed21c0
      Arnd Bergmann 提交于
      The mlx4_dev_cap and mlx4_init_hca_param are really too large
      to be put on the kernel stack, as shown by this clang warning:
      
      drivers/net/ethernet/mellanox/mlx4/main.c:3304:12: error: stack frame size of 1088 bytes in function 'mlx4_load_one' [-Werror,-Wframe-larger-than=]
      
      With gcc, the problem is the same, but it does not warn because
      it does not inline this function, and therefore stays just below
      the warning limit, while clang is just above it.
      
      Use kzalloc for dynamic allocation instead of putting them
      on stack. This gets the combined stack frame down to 424 bytes.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9eed21c0
    • A
      qed: reduce maximum stack frame size · 7c116e02
      Arnd Bergmann 提交于
      clang warns about an overly large stack frame in one function
      when it decides to inline all __qed_get_vport_*() functions into
      __qed_get_vport_stats():
      
      drivers/net/ethernet/qlogic/qed/qed_l2.c:1889:13: error: stack frame size of 1128 bytes in function '_qed_get_vport_stats' [-Werror,-Wframe-larger-than=]
      
      Use a noinline_for_stack annotation to prevent clang from inlining
      these, which keeps the maximum stack usage at around half of that
      in the worst case, similar to what we get with gcc.
      
      Fixes: 86622ee7 ("qed: Move statistics to L2 code")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7c116e02