From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933109AbdEOUt1 convert rfc822-to-8bit (ORCPT ); Mon, 15 May 2017 16:49:27 -0400 Received: from mga02.intel.com ([134.134.136.20]:51697 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932862AbdEOUtZ (ORCPT ); Mon, 15 May 2017 16:49:25 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,346,1491289200"; d="scan'208";a="1130649401" From: "Winkler, Tomas" To: Jason Gunthorpe , Josh Zimmerman CC: Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" , "Jarkko Sakkinen" , "tpmdd-devel@lists.sourceforge.net" Subject: RE: [PATCH v3] Add "shutdown" to "struct class". Thread-Topic: [PATCH v3] Add "shutdown" to "struct class". Thread-Index: AQHSzaJJunx6HrAynE+SjhRgqKy67KH1eIqAgABkOyA= Date: Mon, 15 May 2017 20:49:16 +0000 Message-ID: <5B8DA87D05A7694D9FA63FD143655C1B641D90DB@hasmsx108.ger.corp.intel.com> References: <20170515173438.13420-1-joshz@google.com> <20170515174533.GB6229@obsidianresearch.com> In-Reply-To: <20170515174533.GB6229@obsidianresearch.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.184.70.11] 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 > -----Original Message----- > From: Jason Gunthorpe [mailto:jgunthorpe@obsidianresearch.com] > Sent: Monday, May 15, 2017 20:46 > To: Josh Zimmerman > Cc: Greg Kroah-Hartman ; linux- > kernel@vger.kernel.org; Winkler, Tomas ; Jarkko > Sakkinen ; tpmdd- > devel@lists.sourceforge.net > Subject: Re: [PATCH v3] Add "shutdown" to "struct class". > > On Mon, May 15, 2017 at 10:39:08AM -0700, Josh Zimmerman wrote: > > (Continuing thread from patch v1) > > > > On Sat, May 13, 2017 at 12:43:11PM +0000, Winkler, Tomas wrote: > > > > > > The TPM class has some common shutdown code that must be > > > > > > executed for all drivers. This adds some needed functionality > > > > > > for that > > > > > > > > > > The issue with this is, that on some platforms the only storage > > > > > can be eMMC and TPM is using it,. It has to be ensured that the > > > > > storage device won't go down before TPM2_shutdown is called. > > > > > And there is no direct device hierarchy to ensure an orderly > shutdown. > > > > > > > > Something will have to use the new device links stuff to define > > > > that dependency, but that seems unrelated to this patch? > > > > > > > > > Yep, it's not directly related to this specific patch, this is more relevant > particularly to TPM2_shutdown. > > > > Jason, do you want me to do that in my patch on the tpmdd-devel list? > > If so, mind giving me a documentation pointer or two? I'm not familiar > > with this area. > > No.. Ordering power management events is something someone with > knowledge of the specific emmc platform is going to have to tackle.. > It isn't really a core problem, platform specific code will have to setup the > needed device links to order power management properly.. eMMC is just an example, that can be other storage device (ufs, nvme) and some type of abstraction of underlying storage dependency would be required. I just wanted to put it on the table, not sure it has to be solved in this round. Tomas > > Jason