On Tue, Aug 29, 2017 at 12:14:37PM +0000, alexander.stef...@infineon.com wrote: > > On Thu, Aug 24, 2017 at 10:27:43AM +0200, Alexander Steffen wrote: > > > The documentation says that DMA-safe memory is required for SPI > > transfers. > > > The I/O buffers passed in by the caller can be allocated anywhere, > > > including on the stack, which is not DMA-safe. So the data needs to be > > > copied to separate, DMA-safe buffers. > > > > > > We did not see any DMA-related issues on our test systems, even > > > without DMA-safe buffers. But this might simply be due to the fact > > > that the SPI transfer size is rather small, so our systems do not > > > bother to set up DMA transfers. Other systems might do so. > > > > > > v2: > > > - Updated commit message with more explanations. > > > > > > v3: > > > - Split into two patches, one for making the buffers DMA-safe and another > > > for using only a single buffer. > > > > > > Alexander Steffen (2): > > > tpm_tis_spi: Use DMA-safe memory for SPI transfers > > > tpm_tis_spi: Use a single buffer for SPI transfers > > > > > > drivers/char/tpm/tpm_tis_spi.c | 32 ++++++++++++++++++-------------- > > > 1 file changed, 18 insertions(+), 14 deletions(-) > > > > > > -- > > > 2.7.4 > > > > > > > Needs to be CC linux-kernel and linux-security-module > > I will resend the patches there. Is this process of what patches to send > where documented somewhere? MAINTAINERS mentions only tpmdd-devel. > > > and tested-by. > > I forgot to mention that before: Unless otherwise noted, everything that I > submit has been tested with: > > - tpm_tis on x86_64 with LPC TPMs 1.2 and 2.0 (Infineon SLB 9660 and SLB 9665) > - tpm_tis_spi on armv7l and aarch64 (Raspberry Pi 2 and 3) with SPI TPMs 1.2 > and 2.0 (Infineon SLB 9670) > - tpm_i2c_infineon on armv7l (Raspberry Pi 2) with I2C TPMs 1.2 (Infineon SLB > 9635 and SLB 9645) > > Since those tests are fully automated, I'm happy to integrate more TPM chips, > if anyone has got some for me ;-) > > To get some more test coverage for this SPI-specific change, maybe Benoit or > Christophe can rerun their tests? Though this change probably depends more on > the platform than on the TPM. As far as we could tell from the code, our > Raspberry Pis will never use DMA for the SPI transfers to the TPM, because > those transfers are too small. > > Alexander
I'll see later if I could peer test tpm_tis_spi with one machine that I have. /Jarkko ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ tpmdd-devel mailing list tpmdd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tpmdd-devel