OpenCloudOS-Kernel/arch/loongarch/kvm
Tiezhu Yang 65294a2d3e LoongArch: Add ifdefs to fix LSX and LASX related warnings
commit 80376323e2b6a4559f86b2b4d864848ac25cb054 upstream.

There exist some warnings when building kernel if CONFIG_CPU_HAS_LBT is
set but CONFIG_CPU_HAS_LSX and CONFIG_CPU_HAS_LASX are not set. In this
case, there are no definitions of _restore_lsx & _restore_lasx and there
are also no definitions of kvm_restore_lsx & kvm_restore_lasx in fpu.S
and switch.S respectively, just add some ifdefs to fix these warnings.

  AS      arch/loongarch/kernel/fpu.o
arch/loongarch/kernel/fpu.o: warning: objtool: unexpected relocation symbol type in .rela.discard.func_stack_frame_non_standard: 0
arch/loongarch/kernel/fpu.o: warning: objtool: unexpected relocation symbol type in .rela.discard.func_stack_frame_non_standard: 0

  AS [M]  arch/loongarch/kvm/switch.o
arch/loongarch/kvm/switch.o: warning: objtool: unexpected relocation symbol type in .rela.discard.func_stack_frame_non_standard: 0
arch/loongarch/kvm/switch.o: warning: objtool: unexpected relocation symbol type in .rela.discard.func_stack_frame_non_standard: 0

  MODPOST Module.symvers
ERROR: modpost: "kvm_restore_lsx" [arch/loongarch/kvm/kvm.ko] undefined!
ERROR: modpost: "kvm_restore_lasx" [arch/loongarch/kvm/kvm.ko] undefined!

Cc: stable@vger.kernel.org # 6.9+
Fixes: cb8a2ef0848c ("LoongArch: Add ORC stack unwinder support")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202408120955.qls5oNQY-lkp@intel.com/
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2024-11-12 16:59:59 +08:00
..
intc LoongArch: KVM: Add irqfd support 2024-11-06 19:36:37 +08:00
Kconfig LoongArch: add iommu support 2024-11-06 19:40:31 +08:00
Makefile LoongArch: KVM: Add irqfd support 2024-11-06 19:36:37 +08:00
exit.c LoongArch: KVM: Add cpucfg area for kvm hypervisor 2024-11-06 19:36:40 +08:00
interrupt.c LoongArch: KVM: Implement vcpu interrupt operations 2024-04-12 20:49:41 +08:00
irqfd.c LoongArch: KVM: Add irqfd support 2024-11-06 19:36:37 +08:00
main.c LoongArch: KVM: Delay secondary mmu tlb flush until guest entry 2024-11-06 19:36:38 +08:00
mmu.c LoongArch: KVM: always make pte young in page map's fast path 2024-11-06 19:36:38 +08:00
switch.S LoongArch: Add ifdefs to fix LSX and LASX related warnings 2024-11-12 16:59:59 +08:00
timer.c LoongArch: KVM: Invalidate guest steal time address on vCPU reset 2024-11-06 19:36:39 +08:00
tlb.c LoongArch: KVM: Delay secondary mmu tlb flush until guest entry 2024-11-06 19:36:38 +08:00
trace.h LoongArch: KVM: Add mmio trace events support 2024-11-06 19:36:38 +08:00
vcpu.c LoongArch: KVM: Add vcpu mapping from physical cpuid 2024-11-06 19:36:40 +08:00
vm.c LoongArch: KVM: Add vcpu mapping from physical cpuid 2024-11-06 19:36:40 +08:00