Thread (3 messages) flat view 3 messages, 3 authors, 2021-09-01

Re: [PATCH net-next v2] bnxt_en: Fix 64-bit doorbell operation on 32-bit kernels

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2021-09-01 01:46:31


On 8/31/2021 6:15 PM, Michael Chan wrote:
The driver requires 64-bit doorbell writes to be atomic on 32-bit
architectures.  So we redefined writeq as a new macro with spinlock
protection on 32-bit architectures.  This created a new warning when
we added a new file in a recent patchset.  writeq is defined on many
32-bit architectures to do the memory write non-atomically and it
generated a new macro redefined warning.  This warning was fixed
incorrectly in the recent patch.

Fix this properly by adding a new bnxt_writeq() function that will
do the non-atomic write under spinlock on 32-bit systems.  All callers
in the driver will now call bnxt_writeq() instead.

v2: Need to pass in bp to bnxt_writeq()
     Use lo_hi_writeq() [suggested by Florian]

Reported-by: kernel test robot <redacted>
Fixes: f9ff578251dc ("bnxt_en: introduce new firmware message API based on DMA pools")
Reviewed-by: Edwin Peer <redacted>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help