Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262661AbUC2FYg (ORCPT ); Mon, 29 Mar 2004 00:24:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262665AbUC2FYg (ORCPT ); Mon, 29 Mar 2004 00:24:36 -0500 Received: from willy.net1.nerim.net ([62.212.114.60]:26892 "EHLO willy.net1.nerim.net") by vger.kernel.org with ESMTP id S262661AbUC2FYc (ORCPT ); Mon, 29 Mar 2004 00:24:32 -0500 Date: Mon, 29 Mar 2004 07:22:38 +0200 From: Willy Tarreau To: Len Brown Cc: Arkadiusz Miskiewicz , Marcelo Tosatti , linux-kernel@vger.kernel.org, ACPI Developers Subject: Re: Linux 2.4.26-rc1 (cmpxchg vs 80386 build) Message-ID: <20040329052238.GD1276@alpha.home.local> References: <1080535754.16221.188.camel@dhcppc4> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1080535754.16221.188.camel@dhcppc4> User-Agent: Mutt/1.4i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1379 Lines: 45 Hi Len, On Sun, Mar 28, 2004 at 11:49:15PM -0500, Len Brown wrote: > ACPI unconditionally used cmpxchg before this change also -- from asm(). > The asm() was broken, so we replaced it with C, > which invokes the cmpxchg macro, which isn't defined for > an 80386 build. > > I guess it is a build bug that the assembler allowed us > to invoke cmpxchg in an asm() for an 80386 build in earlier releases. > > I'm open to suggestions on the right way to fix this. > > 1. recommend CONFIG_ACPI=n for 80386 build. > > 2. force CONFIG_ACPI=n for 80386 build. > > 3. invoke cmpxchg from acpi even for 80386 build. > > 4. re-implement locks for the 80386 case. I like this one, but a simpler way : don't support SMP in this case, so that we won't have to play with locks. This would lead to something like this : #ifndef CONFIG_X86_CMPXCHG #ifndef CONFIG_SMP #define cmpxchg(lock,old,new) ((*lock == old) ? ((*lock = new), old) : (*lock)) #else #define cmpxchg(lock,old,new) This_System_Is_Not_Supported #endif #endif This code (if valid) might be added to asm-i386/system.h so that we don't touch ACPI code. Any comments ? Willy - 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/