[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <C5A28EF7B98F574C85C70238C8E9ECC04E682BF14F@ABGEX74E.FSC.NET>
Date: Tue, 1 Dec 2015 12:50:28 +0100
From: "Wilck, Martin" <martin.wilck@...fujitsu.com>
To: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
CC: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
"tpmdd-devel@...ts.sourceforge.net"
<tpmdd-devel@...ts.sourceforge.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
'Uwe Kleine-König'
<u.kleine-koenig@...gutronix.de>
Subject: Re: [tpmdd-devel] [PATCH 2/2] tpm_tis: Clean up the force=1 module
parameter
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" <martin.wilck@...fujitsu.com>
> Signed-off-by: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
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
Powered by blists - more mailing lists