Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S271169AbUJVDO1 (ORCPT ); Thu, 21 Oct 2004 23:14:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S271058AbUJVDLh (ORCPT ); Thu, 21 Oct 2004 23:11:37 -0400 Received: from omx2-ext.sgi.com ([192.48.171.19]:24201 "EHLO omx2.sgi.com") by vger.kernel.org with ESMTP id S271169AbUJVDGH (ORCPT ); Thu, 21 Oct 2004 23:06:07 -0400 From: Jesse Barnes To: Grant Grundler Subject: Re: [PATCH] I/O space write barrier Date: Thu, 21 Oct 2004 22:05:50 -0500 User-Agent: KMail/1.7 Cc: Jesse Barnes , akpm@osdl.org, linux-kernel@vger.kernel.org, tony.luck@intel.com, linux-ia64@vger.kernel.org References: <200410211613.19601.jbarnes@engr.sgi.com> <20041022010150.GH3878@cup.hp.com> In-Reply-To: <20041022010150.GH3878@cup.hp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410212205.51672.jbarnes@sgi.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1397 Lines: 32 On Thursday, October 21, 2004 8:01 pm, Grant Grundler wrote: > > + > > + sp->flags |= SRB_SENT; > > + ha->actthreads++; > > + WRT_REG_WORD(&reg->mailbox4, ha->req_ring_index); > > + > > + /* > > + * A Memory Mapped I/O Write Barrier is needed to ensure that > > this write + * of the request queue in register is ordered ahead > > of writes issued + * after this one by other CPUs. Access to the > > register is protected + * by the host_lock. Without the mmiowb, > > however, it is possible for + * this CPU to release the host lock, > > another CPU acquire the host lock, + * and write to the request > > queue in, and have the second write make it + * to the chip first. > > + */ > > + mmiowb(); /* posted write ordering */ > > + > > This is the example code I'd like to see replaced with your > synthetic example above. Ok, that makes sense. I'd like to update the documentation with a separate patch though, if that's ok with you. I think Greg had some ideas about other things to cover as well. Greg? Thanks, Jesse - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/