[tpmdd-devel] [PATCH] tpm_tis: fix stall after iowrite*()s

2017-08-14 Thread Haris Okanovic
ioread8() operations to TPM MMIO addresses can stall the cpu when immediately following a sequence of iowrite*()'s to the same region. For example, cyclitest measures ~400us latency spikes when a non-RT usermode application communicates with an SPI-based TPM chip (Intel Atom E3940 system,

[tpmdd-devel] [PATCH v2] msleep() delays - replace with usleep_range() in TPM 1.2/2.0 generic drivers

2017-08-14 Thread Hamza Attak
The patch simply replaces all msleep function calls with usleep_range calls in the generic drivers. Tested with an Infineon TPM 1.2, using the generic tpm-tis module, for a thousand PCR extends, we see results going from 1m57s unpatched to 40s with the new patch. We obtain similar results when

Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-14 Thread Mimi Zohar
On Mon, 2017-08-14 at 13:56 +0300, Jarkko Sakkinen wrote: > > > Since the main concern about this change is breaking old systems that > > > might potentially have other peripherals hanging off the LPC bus, can > > > we define a new Kconfig option, with the default as 'N'? > > > > > > Mimi > > >

Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-14 Thread Mimi Zohar
On Mon, 2017-08-14 at 13:56 +0300, Jarkko Sakkinen wrote: > > > > I would like to see tpm_msleep() wrapper to replace current msleep() > > > > usage across the subsystem before considering this. I.e. wrapper that > > > > internally uses usleep_range(). This way we can mechanically convert > > > >

Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-14 Thread Jarkko Sakkinen
On Mon, Aug 14, 2017 at 01:51:30PM +0300, Jarkko Sakkinen wrote: > On Fri, Aug 11, 2017 at 11:30:19AM -0400, Mimi Zohar wrote: > > On Fri, 2017-08-11 at 14:14 +0300, Jarkko Sakkinen wrote: > > > On Wed, Aug 09, 2017 at 11:00:36PM +0200, Peter Huewe wrote: > > > > Hi Ken, > > > > (again speaking

Re: [tpmdd-devel] [PATCH v2] tpm/tpm_crb: Access locality for only CRB_START method

2017-08-14 Thread Jarkko Sakkinen
On Sat, Aug 12, 2017 at 08:22:49PM -0500, Jiandi An wrote: > For ARM64, the locality is handled by Trust Zone in FW. > The layout does not have crb_regs_head. It is hitting > the following line. > dev_warn(dev, FW_BUG "Bad ACPI memory layout"); > > Current code excludes CRB_FL_ACPI_START and

Re: [tpmdd-devel] [PATCH v2] Do not disable driver and bus shutdown hook when class shutdown hook is set.

2017-08-14 Thread Jarkko Sakkinen
On Fri, Aug 11, 2017 at 03:44:43PM +0200, Michal Suchanek wrote: > As seen from the implementation of the single class shutdown hook this > is not very sound design. > > Rename the class shutdown hook to shutdown_pre to make it clear it runs > before the driver shutdown hook. > > Signed-off-by: