[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190121164551.GF25149@mellanox.com>
Date: Mon, 21 Jan 2019 16:45:58 +0000
From: Jason Gunthorpe <jgg@...lanox.com>
To: Leon Romanovsky <leonro@...lanox.com>
CC: Saeed Mahameed <saeedm@...lanox.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
Maxim Mikityanskiy <maximmi@...lanox.com>,
Eran Ben Elisha <eranbe@...lanox.com>
Subject: Re: [PATCH mlx5-next 4/4] net/mlx5: Remove spinlock support from
mlx5_write64
On Sat, Jan 19, 2019 at 12:43:14AM -0700, Leon Romanovsky wrote:
> You need to do one of two things:
> 1. Require CONFIG_64BIT and delete this 32bit code.
> 2. Declare global mlx5 DB spinlock and use on 32bit systems, something
> like this:
> #if BITS_PER_LONG == 64
> __raw_writeq(*(u64 *)val, dest);
> #else
> spin_lock_irqsave(doorbell_lock, flags);
> __raw_writel((__force u32) val[0], dest);
> __raw_writel((__force u32) val[1], dest + 4);
> spin_unlock_irqrestore(doorbell_lock, flags);
> #endif
And why is this code using the __raw_ versions? Seems wrong too...
Jason
Powered by blists - more mailing lists