From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.ocgnet.org ([64.20.243.3]:48587 "EHLO smtp.ocgnet.org") by vger.kernel.org with ESMTP id S1751298AbWIYGJi (ORCPT ); Mon, 25 Sep 2006 02:09:38 -0400 Date: Mon, 25 Sep 2006 15:09:17 +0900 From: Paul Mundt Subject: Re: [PATCH] m32r: Revise __raw_read_trylock() Message-ID: <20060925060917.GA8422@localhost.na.rta> References: <20060922074813.GA20921@localhost.Internal.Linux-SH.ORG> <20060922112708.GR2585@parisc-linux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060922112708.GR2585@parisc-linux.org> Sender: linux-arch-owner@vger.kernel.org To: Matthew Wilcox Cc: Hirokazu Takata , Andrew Morton , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org List-ID: On Fri, Sep 22, 2006 at 05:27:08AM -0600, Matthew Wilcox wrote: > You're assuming: > > - a spinlock is an atomic_t. > - Said atomic_t uses RW_LOCK_BIAS to indicate locked/unlocked. > > This is true for m32r, but not for sparc. That makes sense, thanks for the clarification. > SuperH looks completely broken -- I don't see how holding a read lock > prevents someone else from getting a write lock. The SH write_trylock > uses RW_LOCK_BIAS, but write_lock doesn't. Are there any SMP SH > machines? Yes, it's broken, most of the work for that has been happening out of tree, and we'll have to sync it up again. The initial work was targetted at a pair of microcontrollers, but there were too many other issues there that the work was eventually abandoned. Recently it's started up again on more reasonable CPUs, so we'll be fixing these things up in order.