mlxsw: Narrow the critical section of devl_lock during ports creation/removal
authorJiri Pirko <jiri@nvidia.com>
Mon, 18 Apr 2022 06:42:32 +0000 (09:42 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Apr 2022 10:00:18 +0000 (11:00 +0100)
commitadc6462376b1a22d486ab5f6e624ba9528a380da
tree897dc2104df9d1a01287aab84dc093fc874c7241
parentebf0c53417319ff568d9b6238a60ba27395385f3
mlxsw: Narrow the critical section of devl_lock during ports creation/removal

No need to hold the lock for alloc and freecpu. So narrow the critical
section. Follow-up patch is going to benefit from this by adding more
code to the functions which will be out of the critical as well.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/minimal.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.c