Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756117AbbLALuo (ORCPT ); Tue, 1 Dec 2015 06:50:44 -0500 Received: from dgate10.ts.fujitsu.com ([80.70.172.49]:1158 "EHLO dgate10.ts.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756043AbbLALun (ORCPT ); Tue, 1 Dec 2015 06:50:43 -0500 DomainKey-Signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:Received:Received:From:To:CC:Date:Subject: Thread-Topic:Thread-Index:Message-ID:References: In-Reply-To:Accept-Language:Content-Language: X-MS-Has-Attach:X-MS-TNEF-Correlator:acceptlanguage: Content-Type:Content-Transfer-Encoding:MIME-Version; b=Cc9+eE3h+9YTAWufzeMvZFiXyLcVaNdrOwAr8hZmCpFMHixfvXHoi+HM H+ZSeegnusv2UkJX8J5z/Mk5Q/mpajhqNoSCkFBgWT4tQJbDx8AavfSnH 5ybgUPg75ky99b3Nr/M8f8AHPVBbE+5rzy+WnJk+Ym2jKC5iUaeKkrZ5g VdkbY8hdQMZUaZ+Z5VAN+Zg9XnAIG9fngwJoQSDLKNpjboWBGxgHoEd4g GP2p13CUdxYHLXFupQbqY1fc/p04D; X-SBRSScore: None From: "Wilck, Martin" To: Jason Gunthorpe CC: Jarkko Sakkinen , "tpmdd-devel@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" , =?utf-8?B?J1V3ZSBLbGVpbmUtS8O2bmlnJw==?= Date: Tue, 1 Dec 2015 12:50:28 +0100 Subject: Re: [tpmdd-devel] [PATCH 2/2] tpm_tis: Clean up the force=1 module parameter Thread-Topic: [tpmdd-devel] [PATCH 2/2] tpm_tis: Clean up the force=1 module parameter Thread-Index: AdEsLnkWRUxhFMTUR4qCUQSezZz84A== Message-ID: References: <1448911632-20070-1-git-send-email-jgunthorpe@obsidianresearch.com> <1448911632-20070-3-git-send-email-jgunthorpe@obsidianresearch.com> In-Reply-To: <1448911632-20070-3-git-send-email-jgunthorpe@obsidianresearch.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US 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 mail.home.local id tB1BoorB027246 Content-Length: 1528 Lines: 37 On Mo, 2015-11-30 at 12:27 -0700, Jason Gunthorpe wrote: > The TPM core has long assumed that every device has a driver attached, > however b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are > called unconditionally") breaks that assumption. > > Rework the TPM setup to create a platform device with resources and > then allow the driver core to naturally bind and probe it through the > normal mechanisms. All this structure is needed anyhow to enable TPM > for OF environments. > > Finally, since the entire flow is changing convert the init/exit to use > the modern ifdef-less coding style when possible > > Reported-by: "Wilck, Martin" > Signed-off-by: Jason Gunthorpe I tested this on my system, deliberately reverting my own fix for platform_driver_probe() beforehand. It works, no panic any more. The patch introduces one user-visible change, because now the ACPI and PnP drivers are registered even with "force=1". This causes my TPM to be show up twice in sysfs: /sys/bus/acpi/drivers/tpm_tis/MSFT0101:00 -> ../../../../devices/LNXSYSTM:00/LNXSYBUS:00/MSFT0101:00 /sys/bus/platform/drivers/tpm_tis/tpm_tis -> ../../../../devices/platform/tpm_tis Only the platform device is actually bound to the physical device, though. I'm not sure if I like this. Regards Martin ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?