Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936922AbWLFRXM (ORCPT ); Wed, 6 Dec 2006 12:23:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S936902AbWLFRXM (ORCPT ); Wed, 6 Dec 2006 12:23:12 -0500 Received: from smtp.osdl.org ([65.172.181.25]:46398 "EHLO smtp.osdl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936790AbWLFRXK (ORCPT ); Wed, 6 Dec 2006 12:23:10 -0500 Date: Wed, 6 Dec 2006 09:21:00 -0800 (PST) From: Linus Torvalds To: David Howells cc: akpm@osdl.org, linux-arm-kernel@lists.arm.linux.org.uk, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH] WorkStruct: Implement generic UP cmpxchg() where an arch doesn't support it In-Reply-To: <20061206164314.19870.33519.stgit@warthog.cambridge.redhat.com> Message-ID: References: <20061206164314.19870.33519.stgit@warthog.cambridge.redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 737 Lines: 20 On Wed, 6 Dec 2006, David Howells wrote: > > Implement generic UP cmpxchg() where an arch doesn't otherwise support it. > This assuming that the arch doesn't have support SMP without providing its own > cmpxchg() implementation. This is too ugly to live. At least the kernel/workqueue.c part. The requirement that everybody implement a workable cmpxchg (and falling back to spinlocks if required as per the atomic bit operations) looks ok, but don't show that in generic code. Linus - 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/