mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] pvcalls-front: 64-bit align flags
@ 2018-02-27 19:54 Stefano Stabellini
  2018-02-27 21:19 ` Boris Ostrovsky
  2018-02-28  9:06 ` David Laight
  0 siblings, 2 replies; 6+ messages in thread
From: Stefano Stabellini @ 2018-02-27 19:54 UTC (permalink / raw)
  To: jgross, boris.ostrovsky; +Cc: sstabellini, xen-devel, linux-kernel

We are using test_and_* operations on the status and flag fields of
struct sock_mapping. However, these functions require the operand to be
64-bit aligned on arm64. Currently, only status is 64-bit aligned.

Make flags 64-bit aligned by introducing an explicit padding field.

Signed-off-by: Stefano Stabellini <stefano@aporeto.com>

diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c
index ca5b773..aa07b2a 100644
--- a/drivers/xen/pvcalls-front.c
+++ b/drivers/xen/pvcalls-front.c
@@ -78,6 +78,7 @@ struct sock_mapping {
 #define PVCALLS_STATUS_BIND          1
 #define PVCALLS_STATUS_LISTEN        2
 			uint8_t status;
+			uint8_t pad[7];
 		/*
 		 * Internal state-machine flags.
 		 * Only one accept operation can be inflight for a socket.

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

end of thread, other threads:[~2018-02-28  9:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-27 19:54 [PATCH] pvcalls-front: 64-bit align flags Stefano Stabellini
2018-02-27 21:19 ` Boris Ostrovsky
2018-02-27 21:32   ` Stefano Stabellini
2018-02-27 21:45     ` Boris Ostrovsky
2018-02-27 21:50       ` Stefano Stabellini
2018-02-28  9:06 ` David Laight

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®