]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
powerpc/pseries/htmdump: Include header file to get is_kvm_guest() definition
authorAthira Rajeev <atrajeev@linux.ibm.com>
Tue, 6 May 2025 13:52:32 +0000 (19:22 +0530)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Mon, 12 May 2025 04:52:11 +0000 (10:22 +0530)
htmdump_init calls is_kvm_guest() to check for guest environment.
is_kvm_guest() is defined in kvm_guest.h header file. Without including
the header file, build hits error failing to find the function.

  arch/powerpc/platforms/pseries/htmdump.c: In function 'htmdump_init':
  arch/powerpc/platforms/pseries/htmdump.c:469:6: error: implicit declaration of function 'is_kvm_guest';
  did you mean '__key_get'? [-Werror=implicit-function-declaration]
  if (is_kvm_guest()) {
      ^~~~~~~~~~~~
      __key_get

This is observed in configs where CONFIG_KVM_GUEST is disabled.
Include header file explicitly to avoid the build error

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505061324.elUl4njU-lkp@intel.com/
Signed-off-by: Athira Rajeev <atrajeev@linux.ibm.com>
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20250506135232.69014-1-atrajeev@linux.ibm.com
arch/powerpc/platforms/pseries/htmdump.c

index af15d50c924b051d2b506627c6fafb4a7549ef4e..742ec52c9d4df9024947793fdd7440c9548bec04 100644 (file)
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/machdep.h>
 #include <asm/plpar_wrappers.h>
+#include <asm/kvm_guest.h>
 
 static void *htm_buf;
 static void *htm_status_buf;