From f9364df30420987e77599c4789ec0065c609a507 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Tue, 4 Jun 2019 13:10:51 +0200 Subject: s390/boot: disable address-of-packed-member warning Get rid of gcc9 warnings like this: arch/s390/boot/ipl_report.c: In function 'find_bootdata_space': arch/s390/boot/ipl_report.c:42:26: warning: taking address of packed member of 'struct ipl_rb_components' may result in an unaligned pointer value [-Waddress-of-packed-member] 42 | for_each_rb_entry(comp, comps) | ^~~~~ This is effectively the s390 variant of commit 20c6c1890455 ("x86/boot: Disable the address-of-packed-member compiler warning"). Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens --- arch/s390/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/Makefile b/arch/s390/Makefile index de8521fc9de5..e48013cf50a2 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -30,6 +30,7 @@ KBUILD_CFLAGS_DECOMPRESSOR += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY KBUILD_CFLAGS_DECOMPRESSOR += -fno-delete-null-pointer-checks -msoft-float KBUILD_CFLAGS_DECOMPRESSOR += -fno-asynchronous-unwind-tables KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-option,-ffreestanding) +KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-disable-warning, address-of-packed-member) KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g) KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,)) UTS_MACHINE := s390x -- cgit v1.2.3 From 93c2f55ffc89247079e4eb616c70ecc3c9614b05 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Sun, 9 Jun 2019 13:35:44 -0700 Subject: s390/ctl_reg: mark __ctl_set_bit and __ctl_clear_bit as __always_inline s390:tinyconfig fails to build with gcc 8.3.0. arch/s390/include/asm/ctl_reg.h:52:2: error: impossible constraint in 'asm' asm volatile( \ ^~~ arch/s390/include/asm/ctl_reg.h:62:2: note: in expansion of macro '__ctl_store' __ctl_store(reg, cr, cr); ^~~~~~~~~~~ s390/include/asm/ctl_reg.h:41:2: error: impossible constraint in 'asm' asm volatile( \ ^~~ arch/s390/include/asm/ctl_reg.h:64:2: note: in expansion of macro '__ctl_load' __ctl_load(reg, cr, cr); ^~~~~~~~~~ Marking __ctl_set_bit and __ctl_clear_bit as __always_inline fixes the problem. Fixes: 9012d011660e ("compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING") Signed-off-by: Guenter Roeck Signed-off-by: Heiko Carstens --- arch/s390/include/asm/ctl_reg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/s390/include/asm/ctl_reg.h b/arch/s390/include/asm/ctl_reg.h index 4600453536c2..3bda757317cf 100644 --- a/arch/s390/include/asm/ctl_reg.h +++ b/arch/s390/include/asm/ctl_reg.h @@ -55,7 +55,7 @@ : "i" (low), "i" (high)); \ } while (0) -static inline void __ctl_set_bit(unsigned int cr, unsigned int bit) +static __always_inline void __ctl_set_bit(unsigned int cr, unsigned int bit) { unsigned long reg; @@ -64,7 +64,7 @@ static inline void __ctl_set_bit(unsigned int cr, unsigned int bit) __ctl_load(reg, cr, cr); } -static inline void __ctl_clear_bit(unsigned int cr, unsigned int bit) +static __always_inline void __ctl_clear_bit(unsigned int cr, unsigned int bit) { unsigned long reg; -- cgit v1.2.3 From 11aff183225c5cf48fae074cd99d8f18ba84ed34 Mon Sep 17 00:00:00 2001 From: Farhan Ali Date: Mon, 3 Jun 2019 11:42:47 -0400 Subject: vfio-ccw: Destroy kmem cache region on module exit Free the vfio_ccw_cmd_region on module exit. Fixes: d5afd5d135c8 ("vfio-ccw: add handling for async channel instructions") Signed-off-by: Farhan Ali Message-Id: Signed-off-by: Cornelia Huck Signed-off-by: Heiko Carstens --- drivers/s390/cio/vfio_ccw_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c index ee8767f5845a..9125f7f4e64c 100644 --- a/drivers/s390/cio/vfio_ccw_drv.c +++ b/drivers/s390/cio/vfio_ccw_drv.c @@ -299,6 +299,7 @@ static void __exit vfio_ccw_sch_exit(void) css_driver_unregister(&vfio_ccw_sch_driver); isc_unregister(VFIO_CCW_ISC); kmem_cache_destroy(vfio_ccw_io_region); + kmem_cache_destroy(vfio_ccw_cmd_region); destroy_workqueue(vfio_ccw_work_q); } module_init(vfio_ccw_sch_init); -- cgit v1.2.3