From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751813AbdIUTVQ (ORCPT ); Thu, 21 Sep 2017 15:21:16 -0400 Received: from esa3.dell-outbound.iphmx.com ([68.232.153.94]:64229 "EHLO esa3.dell-outbound.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751666AbdIUTVO (ORCPT ); Thu, 21 Sep 2017 15:21:14 -0400 From: X-LoopCount0: from 10.166.132.152 X-IronPort-AV: E=Sophos;i="5.42,426,1500958800"; d="scan'208";a="64319250" X-DLP: DLP_GlobalPCIDSS To: CC: , , , , Subject: RE: [PATCH 09/12] platform/x86: wmi: create character devices when requested by drivers Thread-Topic: [PATCH 09/12] platform/x86: wmi: create character devices when requested by drivers Thread-Index: AQHTMvkxCJ8Tv+0dSkeVHa7fg/4ymKK/tupQ Date: Thu, 21 Sep 2017 19:21:12 +0000 Message-ID: <17f26fac70f049b9bea4e55d67da1ea9@ausx13mpc120.AMER.DELL.COM> References: <0147d9b2d81428711f4e2c8cf1baff71ba81764e.1505999739.git.mario.limonciello@dell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.143.242.75] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v8LJLLWB029091 > -----Original Message----- > From: Andy Shevchenko [mailto:andy.shevchenko@gmail.com] > Sent: Thursday, September 21, 2017 11:47 AM > To: Limonciello, Mario > Cc: dvhart@infradead.org; LKML ; Platform Driver > ; quasisec@google.com; Pali Rohár > > Subject: Re: [PATCH 09/12] platform/x86: wmi: create character devices when > requested by drivers > > On Thu, Sep 21, 2017 at 4:57 PM, Mario Limonciello > wrote: > > For WMI operations that are only Set or Query read or write sysfs > > attributes created by WMI vendor drivers make sense. > > > > For other WMI operations that are run on Method, there needs to be a > > way to guarantee to userspace that the results from the method call > > belong to the data request to the method call. Sysfs attributes don't > > work well in this scenario because two userspace processes may be > > competing at reading/writing an attribute and step on each other's > > data. > > > > When a WMI vendor driver declares a set of functions in a > > file_operations object the WMI bus driver will create a character > > device that maps to those file operations. > > > > The WMI vendor drivers will be responsible for managing access to > > this character device and proper locking on it. > > > > When a WMI vendor driver is unloaded the WMI bus driver will clean > > up the character device. > > > > > @@ -44,12 +44,17 @@ > > #include > > #include > > #include > > +#include > > +#include > > Keep alphabetical ordering. > The existing list wasn't in alphabetical order. I'll submit a patch in v2 earlier in the series to sort and then put them in the right place for my patch.