diff options
author | Stanislaw Kardach <skardach@marvell.com> | 2018-11-19 16:17:26 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-19 17:56:07 -0800 |
commit | 0964fc8f5f30f4ec7cce4c7a09c547ac87b4ed25 (patch) | |
tree | bff72b39402eb3ddd301d4344a3bbb90814a134a /drivers/net/ethernet/marvell/octeontx2/af/rvu.h | |
parent | 34425e8c7589b87fea3659c35d8a217110fcbd4b (diff) |
octeontx2-af: Relax resource lock into mutex
Mailbox message handling is done in a workqueue context scheduled
from interrupt handler. So resource locks does not need to be a spinlock.
Therefore relax them into a mutex so that later on we may use them
in routines that might sleep.
Signed-off-by: Stanislaw Kardach <skardach@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/octeontx2/af/rvu.h')
-rw-r--r-- | drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h index 308884c41eff..2795767f054e 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h @@ -64,7 +64,7 @@ struct nix_mcast { struct qmem *mcast_buf; int replay_pkind; int next_free_mce; - spinlock_t mce_lock; /* Serialize MCE updates */ + struct mutex mce_lock; /* Serialize MCE updates */ }; struct nix_mce_list { @@ -74,7 +74,7 @@ struct nix_mce_list { }; struct npc_mcam { - spinlock_t lock; /* MCAM entries and counters update lock */ + struct mutex lock; /* MCAM entries and counters update lock */ u8 keysize; /* MCAM keysize 112/224/448 bits */ u8 banks; /* Number of MCAM banks */ u8 banks_per_entry;/* Number of keywords in key */ @@ -174,7 +174,7 @@ struct rvu { struct rvu_hwinfo *hw; struct rvu_pfvf *pf; struct rvu_pfvf *hwvf; - spinlock_t rsrc_lock; /* Serialize resource alloc/free */ + struct mutex rsrc_lock; /* Serialize resource alloc/free */ /* Mbox */ struct otx2_mbox mbox; |