Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751387AbWCIHlM (ORCPT ); Thu, 9 Mar 2006 02:41:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751048AbWCIHlM (ORCPT ); Thu, 9 Mar 2006 02:41:12 -0500 Received: from ozlabs.org ([203.10.76.45]:20156 "EHLO ozlabs.org") by vger.kernel.org with ESMTP id S1750767AbWCIHlL (ORCPT ); Thu, 9 Mar 2006 02:41:11 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17423.56336.993754.818818@cargo.ozlabs.ibm.com> Date: Thu, 9 Mar 2006 18:41:04 +1100 From: Paul Mackerras To: Jesse Barnes Cc: Linus Torvalds , akpm@osdl.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, mingo@redhat.com, Alan Cox , linuxppc64-dev@ozlabs.org Subject: Re: [PATCH] Document Linux's memory barriers [try #2] In-Reply-To: <200603082036.19811.jbarnes@virtuousgeek.org> References: <17423.42185.78767.837295@cargo.ozlabs.ibm.com> <200603082036.19811.jbarnes@virtuousgeek.org> X-Mailer: VM 7.19 under Emacs 21.4.1 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 655 Lines: 17 Jesse Barnes writes: > Hm, a static checker should be able to find this stuff, shouldn't it? Good idea. I wonder if sparse could be extended to do it. Alternatively, it wouldn't be hard to check dynamically. Just have a per-cpu count of outstanding MMIO stores. Zero it in spin_lock and mmiowb, increment it in write*, and grizzle if spin_unlock finds it non-zero. Should be very little overhead. Paul. - 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/