From owner-svn-src-all@FreeBSD.ORG Mon Nov 3 18:45:57 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFC171065672; Mon, 3 Nov 2008 18:45:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 620AA8FC13; Mon, 3 Nov 2008 18:45:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id mA3IjdRQ091877; Mon, 3 Nov 2008 13:45:51 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Alexander Motin Date: Mon, 3 Nov 2008 12:48:24 -0500 User-Agent: KMail/1.9.7 References: <200811021250.mA2CoGs1038957@svn.freebsd.org> In-Reply-To: <200811021250.mA2CoGs1038957@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811031248.24713.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Mon, 03 Nov 2008 13:45:51 -0500 (EST) X-Virus-Scanned: ClamAV 0.93.1/8559/Mon Nov 3 11:41:26 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184558 - head/sys/dev/acpica/Osd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Nov 2008 18:45:58 -0000 On Sunday 02 November 2008 07:50:16 am Alexander Motin wrote: > Author: mav > Date: Sun Nov 2 12:50:16 2008 > New Revision: 184558 > URL: http://svn.freebsd.org/changeset/base/184558 > > Log: > As soon as we have several threads per process now, it is not correct to > use process ID as ACPI thread ID. Concurrent requests with equal thread > IDs broke ACPI mutexes operation causing unpredictable errors including > AE_AML_MUTEX_NOT_ACQUIRED that I have seen. > > Use kernel thread ID instead of process ID for ACPI thread. > > Modified: > head/sys/dev/acpica/Osd/OsdSchedule.c > > Modified: head/sys/dev/acpica/Osd/OsdSchedule.c > ============================================================================== > --- head/sys/dev/acpica/Osd/OsdSchedule.c Sun Nov 2 11:49:19 2008 (r184557) > +++ head/sys/dev/acpica/Osd/OsdSchedule.c Sun Nov 2 12:50:16 2008 (r184558) > @@ -187,13 +187,9 @@ AcpiOsStall(UINT32 Microseconds) > ACPI_THREAD_ID > AcpiOsGetThreadId(void) > { > - struct proc *p; > > /* XXX do not add ACPI_FUNCTION_TRACE here, results in recursive call. */ > > - p = curproc; > - KASSERT(p != NULL, ("%s: curproc is NULL!", __func__)); > - > /* Returning 0 is not allowed. */ > - return (p->p_pid + 1); > + return (curthread->td_tid + 1); > } You don't need the '+ 1' or comment now. TIDs are never 0. -- John Baldwin