From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753052AbcJEQhi (ORCPT ); Wed, 5 Oct 2016 12:37:38 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:38238 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751304AbcJEQhh (ORCPT ); Wed, 5 Oct 2016 12:37:37 -0400 Date: Wed, 5 Oct 2016 10:37:34 -0600 From: Jason Gunthorpe To: Jarkko Sakkinen Cc: "Winkler, Tomas" , "tpmdd-devel@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] tpm: don't destroy chip device prematurely Message-ID: <20161005163734.GD18636@obsidianresearch.com> References: <20161002102455.GA27464@intel.com> <20161002212126.GA25872@obsidianresearch.com> <5B8DA87D05A7694D9FA63FD143655C1B542F466B@hasmsx108.ger.corp.intel.com> <20161003124836.GE9990@intel.com> <20161004051946.GA10572@intel.com> <20161004164738.GA17149@obsidianresearch.com> <5B8DA87D05A7694D9FA63FD143655C1B542F4C92@hasmsx108.ger.corp.intel.com> <20161004231057.GA20062@obsidianresearch.com> <5B8DA87D05A7694D9FA63FD143655C1B542F5084@hasmsx108.ger.corp.intel.com> <20161005151526.GA9847@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161005151526.GA9847@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.151 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 05, 2016 at 06:15:26PM +0300, Jarkko Sakkinen wrote: > The important thing is to notice that runtime PM requires the device > to be "alive" and in the device hierarchy. It's a constraint... There are two devices. The chip->dev and the chip->dev.parent (aka the acpi_device) Runtime PM is *only* attached to the chip->dev.parent - it does not interact in any significant way with the chip->dev. device_del is on the chip->dev. The acpi_device remains intact, and fully functional. This is why the whole patch is so confusing to me. Jason From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH] tpm: don't destroy chip device prematurely Date: Wed, 5 Oct 2016 10:37:34 -0600 Message-ID: <20161005163734.GD18636@obsidianresearch.com> References: <20161002102455.GA27464@intel.com> <20161002212126.GA25872@obsidianresearch.com> <5B8DA87D05A7694D9FA63FD143655C1B542F466B@hasmsx108.ger.corp.intel.com> <20161003124836.GE9990@intel.com> <20161004051946.GA10572@intel.com> <20161004164738.GA17149@obsidianresearch.com> <5B8DA87D05A7694D9FA63FD143655C1B542F4C92@hasmsx108.ger.corp.intel.com> <20161004231057.GA20062@obsidianresearch.com> <5B8DA87D05A7694D9FA63FD143655C1B542F5084@hasmsx108.ger.corp.intel.com> <20161005151526.GA9847@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20161005151526.GA9847@intel.com> Sender: linux-kernel-owner@vger.kernel.org To: Jarkko Sakkinen Cc: "Winkler, Tomas" , "tpmdd-devel@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" List-Id: tpmdd-devel@lists.sourceforge.net On Wed, Oct 05, 2016 at 06:15:26PM +0300, Jarkko Sakkinen wrote: > The important thing is to notice that runtime PM requires the device > to be "alive" and in the device hierarchy. It's a constraint... There are two devices. The chip->dev and the chip->dev.parent (aka the acpi_device) Runtime PM is *only* attached to the chip->dev.parent - it does not interact in any significant way with the chip->dev. device_del is on the chip->dev. The acpi_device remains intact, and fully functional. This is why the whole patch is so confusing to me. Jason