diff --git a/arch/s390/include/asm/pci.h b/arch/s390/include/asm/pci.h index dc763eae7c493381ccf8976b1a08ff9091696e87..f833082d91674ef244b713ef1c93bf4354538017 100644 --- a/arch/s390/include/asm/pci.h +++ b/arch/s390/include/asm/pci.h @@ -45,7 +45,7 @@ struct zpci_fmb { u64 rpcit_ops; u64 dma_rbytes; u64 dma_wbytes; -} __packed __aligned(16); +} __packed __aligned(64); enum zpci_state { ZPCI_FN_STATE_RESERVED, diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index f76d01e69fb8f220a1c1bd7f849d381c71076348..9fd59a7cfcd3c31133bac69b6e62ffbf0a9654ed 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c @@ -860,8 +860,11 @@ static inline int barsize(u8 size) static int zpci_mem_init(void) { + BUILD_BUG_ON(!is_power_of_2(__alignof__(struct zpci_fmb)) || + __alignof__(struct zpci_fmb) < sizeof(struct zpci_fmb)); + zdev_fmb_cache = kmem_cache_create("PCI_FMB_cache", sizeof(struct zpci_fmb), - 16, 0, NULL); + __alignof__(struct zpci_fmb), 0, NULL); if (!zdev_fmb_cache) goto error_fmb;