[tpmdd-devel] Fwd: [PATCH] [RFC] tpm_tis: tpm_tcg_flush() after iowrite*()s

2017-08-08 Thread Haris Okanovic
Forwarded Message Subject: [PATCH] [RFC] tpm_tis: tpm_tcg_flush() after iowrite*()s Date: Fri, 4 Aug 2017 16:56:51 -0500 From: Haris Okanovic To: linux-rt-us...@vger.kernel.org, linux-ker...@vger.kernel.org CC: haris.okano...@ni.com, haris...@gmail.com, julia.cartwri...@ni.com

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

2017-08-14 Thread Haris Okanovic
that follows. The enclosed change appears to fix this issue: read the TPM chip's access register (status code) after every iowrite*() operation to amortize the cost of flushing data to chip across multiple instructions. Signed-off-by: Haris Okanovic --- https://patchwork.kernel.org/patch/9882

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

2017-08-15 Thread Haris Okanovic
On 08/15/2017 01:11 AM, Alexander Stein wrote: On Monday 14 August 2017 17:53:47, Haris Okanovic wrote: --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c @@ -52,6 +52,22 @@ static inline struct tpm_tis_tcg_phy *to_tpm_tis_tcg_phy(struct tpm_tis_data *da return container_of

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

2017-08-15 Thread Haris Okanovic
that follows. The enclosed change appears to fix this issue: read the TPM chip's access register (status code) after every iowrite*() operation to amortize the cost of flushing data to chip across multiple instructions. Signed-off-by: Haris Okanovic --- [PATCH v2] Add tpm_tis_flush() fun

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

2017-08-17 Thread Haris Okanovic
Neither wmb() nor mb() have any effect when substituted for ioread8(iobase + TPM_ACCESS(0)) in tpm_tis_flush(). I still see 300 - 400 us spikes in cyclictest invoking my TPM chip's RNG. -- Haris On 08/17/2017 12:17 PM, Jason Gunthorpe wrote: On Thu, Aug 17, 2017 at 12:38:07PM +0200, Sebastia