From owner-freebsd-current@FreeBSD.ORG Wed Sep 19 16:03:27 2007 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E60316A46B; Wed, 19 Sep 2007 16:03:26 +0000 (UTC) (envelope-from mux@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id C490813C4E8; Wed, 19 Sep 2007 16:03:26 +0000 (UTC) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 1253D1A4D8F; Wed, 19 Sep 2007 08:03:49 -0700 (PDT) Date: Wed, 19 Sep 2007 17:03:49 +0200 From: Maxime Henrion To: Jung-uk Kim Message-ID: <20070919150348.GB73569@elvis.mu.org> References: <200709181516.11207.jkim@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200709181516.11207.jkim@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-acpi@FreeBSD.org, freebsd-current@FreeBSD.org Subject: Re: [PATCH] OsdSynch.c modernization X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2007 16:03:27 -0000 Jung-uk Kim wrote: > I have rewritten sys/dev/acpica/Osd/OsdSynch.c to match the modern > ACPI-CA and -CURRENT: > > http://people.freebsd.org/~jkim/acpica/OsdSynch.diff > > Major changes are: > > 1. Semaphore is reimplemented with convar(9) instead of mutex(9). > > 2. Semaphore with ACPI_WAIT_FOREVER option actually waits forever now. > > 3. Obsolete and/or hidden debugging knobs and macros are removed. > > 4. ACPI-CA introduced AcpiOs*Mutex() to complement AcpiOs*Semaphore(): > > http://bugzilla.kernel.org/show_bug.cgi?id=6634 > > These functions are implemented and turned on by default. > > 5. Spinlock is reimplemented with sx lock and more closely implements > the intended behaviour (e.g., save/restore interrupts). > > It is orthogonal to Nate's effort of rewriting acpi_ec.c but I'd like > get more feedback *with* his last patch (revision D) because his > patch will be committed sooner or later. ;-) > > Please test/review and let us know if there is any regression or not. > > Thanks! Out of curiosity, is there any reason you didn't use the sema(9) API for semaphores and are instead implementing them in terms of mutex/condvar? Cheers, Maxime