From: Andrey Pronin <apronin@chromium.org>
To: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: Peter Huewe <peterhuewe@gmx.de>,
Marcel Selhorst <tpmdd@selhorst.net>,
Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
Christophe Ricard <christophe.ricard@gmail.com>,
tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
dtor@chromium.org, Andrey Pronin <apronin@chromium.org>
Subject: [PATCH] tpm: fix cacheline alignment for DMA-able buffers
Date: Thu, 28 Jul 2016 19:59:13 -0700 [thread overview]
Message-ID: <1469761153-85576-1-git-send-email-apronin@chromium.org> (raw)
Annotate buffers used in spi transactions as ____cacheline_aligned
to use in DMA transfers.
Signed-off-by: Andrey Pronin <apronin@chromium.org>
---
drivers/char/tpm/st33zp24/spi.c | 4 ++--
drivers/char/tpm/tpm_tis_spi.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/char/tpm/st33zp24/spi.c b/drivers/char/tpm/st33zp24/spi.c
index 9f5a011..0e9aad9 100644
--- a/drivers/char/tpm/st33zp24/spi.c
+++ b/drivers/char/tpm/st33zp24/spi.c
@@ -70,8 +70,8 @@
struct st33zp24_spi_phy {
struct spi_device *spi_device;
- u8 tx_buf[ST33ZP24_SPI_BUFFER_SIZE];
- u8 rx_buf[ST33ZP24_SPI_BUFFER_SIZE];
+ u8 tx_buf[ST33ZP24_SPI_BUFFER_SIZE] ____cacheline_aligned;
+ u8 rx_buf[ST33ZP24_SPI_BUFFER_SIZE] ____cacheline_aligned;
int io_lpcpd;
int latency;
diff --git a/drivers/char/tpm/tpm_tis_spi.c b/drivers/char/tpm/tpm_tis_spi.c
index dbaad9c..58d7758 100644
--- a/drivers/char/tpm/tpm_tis_spi.c
+++ b/drivers/char/tpm/tpm_tis_spi.c
@@ -48,8 +48,8 @@ struct tpm_tis_spi_phy {
struct tpm_tis_data priv;
struct spi_device *spi_device;
- u8 tx_buf[MAX_SPI_FRAMESIZE + 4];
- u8 rx_buf[MAX_SPI_FRAMESIZE + 4];
+ u8 tx_buf[MAX_SPI_FRAMESIZE + 4] ____cacheline_aligned;
+ u8 rx_buf[MAX_SPI_FRAMESIZE + 4] ____cacheline_aligned;
};
static inline struct tpm_tis_spi_phy *to_tpm_tis_spi_phy(struct tpm_tis_data *data)
--
2.6.6
next reply other threads:[~2016-07-29 2:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-29 2:59 Andrey Pronin [this message]
2016-07-29 17:27 ` Jason Gunthorpe
[not found] ` <CAE_wzQ-=8Su6xzA8Cv+C6ma8iYJfnOwR=hW-KBKjBG+4eOwF4g@mail.gmail.com>
2016-08-09 9:46 ` Jarkko Sakkinen
2016-08-09 15:01 ` [tpmdd-devel] " Jarkko Sakkinen
[not found] ` <CAE_wzQ95LAm7JkfB=V2VZVc4Vha4GcRyOBH_J8ZEh1gG+ZjEAA@mail.gmail.com>
2016-08-09 22:08 ` Jason Gunthorpe
2016-08-10 10:36 ` Jarkko Sakkinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1469761153-85576-1-git-send-email-apronin@chromium.org \
--to=apronin@chromium.org \
--cc=christophe.ricard@gmail.com \
--cc=dtor@chromium.org \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=jgunthorpe@obsidianresearch.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=tpmdd-devel@lists.sourceforge.net \
--cc=tpmdd@selhorst.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®