Re: [PATCH] MIPS: VZ: Only include loongson_regs.h for CPU_LOONGSON64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





在 2020/8/8 下午11:31, Greg KH 写道:
On Sat, Aug 08, 2020 at 08:50:52PM +0800, Huacai Chen wrote:
Only Loongson64 platform has and needs loongson_regs.h, including it
unconditionally will cause build errors.

Fixes: 7f2a83f1c2a941ebfee5 ("KVM: MIPS: Add CPUCFG emulation for Loongson-3")
Cc: stable@xxxxxxxxxxxxxxx
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Huacai Chen <chenhc@xxxxxxxxxx>
---
  arch/mips/kvm/vz.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/arch/mips/kvm/vz.c b/arch/mips/kvm/vz.c
index 3932f76..a474578 100644
--- a/arch/mips/kvm/vz.c
+++ b/arch/mips/kvm/vz.c
@@ -29,7 +29,9 @@
  #include <linux/kvm_host.h>
#include "interrupt.h"
+#ifdef CONFIG_CPU_LOONGSON64
  #include "loongson_regs.h"
+#endif
The fix for this should be in the .h file, no #ifdef should be needed in
a .c file.

The header file can only be reached when CONFIG_CPU_LOONGSON64 is selected...
Otherwise the include path of this file won't be a part of CFLAGS.

Thanks.

- Jiaxun


thanks,

greg k-h



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux