From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937324AbYEBXci (ORCPT ); Fri, 2 May 2008 19:32:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932521AbYEBXc1 (ORCPT ); Fri, 2 May 2008 19:32:27 -0400 Received: from mail0.lsil.com ([147.145.40.20]:56562 "EHLO mail0.lsil.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760103AbYEBXc0 convert rfc822-to-8bit (ORCPT ); Fri, 2 May 2008 19:32:26 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Subject: RE: HELP: Is writeq an atomic operation?? Date: Fri, 2 May 2008 17:31:50 -0600 Message-ID: <0631C836DBF79F42B5A60C8C8D4E822901047B52@NAMAIL2.ad.lsil.com> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: HELP: Is writeq an atomic operation?? thread-index: Acisq1DWMeFtoTQkTEK0YVkgzmP/3wAAKjTg From: "Moore, Eric" To: "Roland Dreier" Cc: "David Miller" , , X-OriginalArrivalTime: 02 May 2008 23:31:50.0682 (UTC) FILETIME=[B25C87A0:01C8ACAC] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, May 02, 2008 5:22 PM, Roland Dreier wrote: > > Yeah, I forgot I have a #ifndef writeq, then defined the > x86_64 version > > of that. I've not tested on x86, so I'm not sure whether > it works. > > How are you handling writeq when its not defined, as the > case in x86? > > Write two writel() inside a spinlock to avoid any transactions in the > middle (the HW I'm dealing with can deal with two 32-bit transactions, > as long as nothing comes in the middle). If your hardware demands a > single 64-bit transaction, you may be in trouble, because I'm not sure > all 32-bit systems can generate such a PCIe transaction. > > You can see include/linux/mlx4/doorbell.h for exactly what I did. > Thanks for the code sample. Yes, I need to send a single atomic 64-bit transaction. Eric