[PATCH v2 2/4] xen-pcifront: Align address of flags to size of unsigned long

From: Fenghua Yu
Date: Mon Nov 25 2019 - 14:31:27 EST


The address of "flags" is passed to atomic bitops which require the
address is aligned to size of unsigned long.

Signed-off-by: Fenghua Yu <fenghua.yu@xxxxxxxxx>
---
include/xen/interface/io/pciif.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/xen/interface/io/pciif.h b/include/xen/interface/io/pciif.h
index d9922ae36eb5..639d5fb484a3 100644
--- a/include/xen/interface/io/pciif.h
+++ b/include/xen/interface/io/pciif.h
@@ -103,8 +103,11 @@ struct xen_pcie_aer_op {
uint32_t devfn;
};
struct xen_pci_sharedinfo {
- /* flags - XEN_PCIF_* */
- uint32_t flags;
+ /* flags - XEN_PCIF_*. Force alignment for atomic bit operations. */
+ union {
+ uint32_t flags;
+ unsigned long flags_alignment;
+ };
struct xen_pci_op op;
struct xen_pcie_aer_op aer_op;
};
--
2.19.1