From owner-freebsd-stable@FreeBSD.ORG Mon May 11 17:45:41 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 5EB5D1065673; Mon, 11 May 2009 17:45:41 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: John Baldwin Date: Mon, 11 May 2009 13:44:59 -0400 User-Agent: KMail/1.6.2 References: <49F8B859.7060908@umn.edu> <200905051743.03520.jkim@FreeBSD.org> <200905110952.01736.jhb@freebsd.org> In-Reply-To: <200905110952.01736.jhb@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200905111345.29761.jkim@FreeBSD.org> Cc: Alan Amesbury , freebsd-acpi@freebsd.org, freebsd-stable@freebsd.org, Andriy Gapon Subject: Re: Garbled output from kgdb? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2009 17:45:42 -0000 On Monday 11 May 2009 09:52 am, John Baldwin wrote: > On Tuesday 05 May 2009 5:43:01 pm Jung-uk Kim wrote: > > On Tuesday 05 May 2009 04:09 pm, Jung-uk Kim wrote: > > > On Tuesday 05 May 2009 12:51 pm, Andriy Gapon wrote: > > > > BTW, this issue seems to be fixed in Jung-uk's acpi patches > > > > for newer acpica imports, but it is not fixed both in > > > > stable/7 and head. > > > > > > Yes, it was fixed in my patchsets long ago, which uses spin > > > lock for AcpiOsAcquireLock(). :-) > > > > The attached patch is for -STABLE. Note that it is only compile > > tested on amd64. > > This looks fine to test. The patch has gratuitous style changes I > wouldn't include in a commit though. It should work but I don't plan to commit it any time soon. :-) In fact, the patch was meant to be a rewrite for new ACPI-CA, which actually has a real mutex. Currently, mutex is emulated with semaphore. The problem is semaphore has no concept of ownership while mutex does, i.e., any thread can acquire/release it without checking its ownership or order. FYI, the OSL API (ACPI_MUTEX_TYPE) is finalized in ACPI-CA 20081204. Jung-uk Kim