Skip to content

Commit 963a08e

Browse files
Sebastian Ottoupton
authored andcommitted
KVM: arm64: fix override-init warnings in W=1 builds
Add -Wno-override-init to the build flags for sys_regs.c, handle_exit.c, and switch.c to fix warnings like the following: arch/arm64/kvm/hyp/vhe/switch.c:271:43: warning: initialized field overwritten [-Woverride-init] 271 | [ESR_ELx_EC_CP15_32] = kvm_hyp_handle_cp15_32, | Signed-off-by: Sebastian Ott <[email protected]> Reviewed-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent 32b9a52 commit 963a08e

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

arch/arm64/kvm/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ include $(srctree)/virt/kvm/Makefile.kvm
1010
obj-$(CONFIG_KVM) += kvm.o
1111
obj-$(CONFIG_KVM) += hyp/
1212

13+
CFLAGS_sys_regs.o += -Wno-override-init
14+
CFLAGS_handle_exit.o += -Wno-override-init
15+
1316
kvm-y += arm.o mmu.o mmio.o psci.o hypercalls.o pvtime.o \
1417
inject_fault.o va_layout.o handle_exit.o \
1518
guest.o debug.o reset.o sys_regs.o stacktrace.o \

arch/arm64/kvm/hyp/nvhe/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ HOST_EXTRACFLAGS += -I$(objtree)/include
2020
lib-objs := clear_page.o copy_page.o memcpy.o memset.o
2121
lib-objs := $(addprefix ../../../lib/, $(lib-objs))
2222

23+
CFLAGS_switch.nvhe.o += -Wno-override-init
24+
2325
hyp-obj-y := timer-sr.o sysreg-sr.o debug-sr.o switch.o tlb.o hyp-init.o host.o \
2426
hyp-main.o hyp-smp.o psci-relay.o early_alloc.o page_alloc.o \
2527
cache.o setup.o mm.o mem_protect.o sys_regs.o pkvm.o stacktrace.o ffa.o

arch/arm64/kvm/hyp/vhe/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
asflags-y := -D__KVM_VHE_HYPERVISOR__
77
ccflags-y := -D__KVM_VHE_HYPERVISOR__
88

9+
CFLAGS_switch.o += -Wno-override-init
10+
911
obj-y := timer-sr.o sysreg-sr.o debug-sr.o switch.o tlb.o
1012
obj-y += ../vgic-v3-sr.o ../aarch32.o ../vgic-v2-cpuif-proxy.o ../entry.o \
1113
../fpsimd.o ../hyp-entry.o ../exception.o

0 commit comments

Comments
 (0)