Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755677AbdDNXcx convert rfc822-to-8bit (ORCPT ); Fri, 14 Apr 2017 19:32:53 -0400 Received: from mga07.intel.com ([134.134.136.100]:63835 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755233AbdDNXcu (ORCPT ); Fri, 14 Apr 2017 19:32:50 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,201,1488873600"; d="scan'208";a="77392742" From: "Moore, Robert" To: "Rafael J. Wysocki" CC: Guenter Roeck , "Zheng, Lv" , "Wysocki, Rafael J" , Len Brown , "linux-acpi@vger.kernel.org" , "devel@acpica.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] ACPICA: Export mutex functions Thread-Topic: [PATCH] ACPICA: Export mutex functions Thread-Index: AQHSs5+M5vQiVFw7h0mrGWRyQXwytKHB28gwgADYJ4D//5NAcIADpEYA//+cEZA= Date: Fri, 14 Apr 2017 23:32:48 +0000 Message-ID: <94F2FBAB4432B54E8AACC7DFDE6C92E37E592F3B@ORSMSX110.amr.corp.intel.com> References: <1492009990-3539-1-git-send-email-linux@roeck-us.net> <20170412212241.GA12384@roeck-us.net> <94F2FBAB4432B54E8AACC7DFDE6C92E37E592822@ORSMSX110.amr.corp.intel.com> <2456461.gJP0PmoWKK@aspire.rjw.lan> In-Reply-To: <2456461.gJP0PmoWKK@aspire.rjw.lan> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjU5ZWE4NWMtODgxOC00MDA5LWI0ZGUtYWI4YWFiZjQzNWNmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlJmUTJqXC83QWh5Y2lKUGdUTllLazdDSFhvZmxPS2o2Rjl6OUdrTkhZd1Y0PSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2337 Lines: 68 > -----Original Message----- > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > Sent: Friday, April 14, 2017 3:30 PM > To: Moore, Robert > Cc: Guenter Roeck; Zheng, Lv; Wysocki, Rafael J; Len Brown; linux- > acpi@vger.kernel.org; devel@acpica.org; linux-kernel@vger.kernel.org > Subject: Re: [PATCH] ACPICA: Export mutex functions > > On Wednesday, April 12, 2017 09:56:37 PM Moore, Robert wrote: > > > > > -----Original Message----- > > > From: Guenter Roeck [mailto:linux@roeck-us.net] > > > Sent: Wednesday, April 12, 2017 2:23 PM > > > To: Moore, Robert > > > Cc: Zheng, Lv ; Wysocki, Rafael J > > > ; Len Brown ; linux- > > > acpi@vger.kernel.org; devel@acpica.org; linux-kernel@vger.kernel.org > > > Subject: Re: [PATCH] ACPICA: Export mutex functions > > > > > > On Wed, Apr 12, 2017 at 03:29:55PM +0000, Moore, Robert wrote: > > > > The ACPICA mutex functions are based on the host OS functions, so > > > > they > > > don't really buy you anything. You should just use the native Linux > > > functions. > > > > > > > > > > You mean they don't really acquire the requested ACPI mutex, and the > > > underlying DSDT which declares and uses the mutex just ignores if > > > the mutex was acquired by acpi_acquire_mutex() ? > > > > > [Moore, Robert] > > > > OK, I understand now. Yes, these mutex interfaces are in fact intended > for the purpose you mention: > > > > * FUNCTION: AcpiAcquireMutex > > * > > * PARAMETERS: Handle - Mutex or prefix handle (optional) > > * Pathname - Mutex pathname (optional) > > * Timeout - Max time to wait for the lock > (millisec) > > * > > * RETURN: Status > > * > > * DESCRIPTION: Acquire an AML mutex. This is a device driver interface > to > > * AML mutex objects, and allows for transaction locking > between > > * drivers and AML code. The mutex node is pointed to by > > * Handle:Pathname. Either Handle or Pathname can be NULL, > but > > * not both. > > > > > > And yes, both the acquire and release interfaces should be exported. > > OK, so I'm assuming this will go in through the upstream ACPICA. > Yes, done for next release. Bob > Thanks, > Rafael