All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mempool/octeontx: fix natural alignment being optimized out
@ 2018-01-18 13:44 Pavan Nikhilesh
  2018-01-18 16:54 ` santosh
  0 siblings, 1 reply; 3+ messages in thread
From: Pavan Nikhilesh @ 2018-01-18 13:44 UTC (permalink / raw)
  To: jerin.jacob, santosh.shukla; +Cc: dev, Pavan Nikhilesh, stable

The mbox messages are naturally aligned and in some cases compiler
optimization might disregard natural alignment.
Use volatile key word to force compiler to disable optimizing and
maintain alignment.

Fixes: aecb8e093b52 ("event/octeontx: introduce specialized mbox message copy")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 drivers/mempool/octeontx/octeontx_mbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mempool/octeontx/octeontx_mbox.c b/drivers/mempool/octeontx/octeontx_mbox.c
index 640a58d3d..c89f4f513 100644
--- a/drivers/mempool/octeontx/octeontx_mbox.c
+++ b/drivers/mempool/octeontx/octeontx_mbox.c
@@ -61,7 +61,7 @@ struct mbox_ram_hdr {
 };
 
 static inline void
-mbox_msgcpy(uint8_t *d, const uint8_t *s, uint16_t size)
+mbox_msgcpy(volatile uint8_t *d, volatile const uint8_t *s, uint16_t size)
 {
 	uint16_t i;
 
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-18 23:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-18 13:44 [PATCH] mempool/octeontx: fix natural alignment being optimized out Pavan Nikhilesh
2018-01-18 16:54 ` santosh
2018-01-18 23:33   ` [dpdk-stable] " Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.