]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
x86/kaslr: Fix build warning in KASLR code in boot stub
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Sun, 10 Apr 2022 20:00:25 +0000 (23:00 +0300)
committerBorislav Petkov <bp@suse.de>
Mon, 11 Apr 2022 07:41:12 +0000 (09:41 +0200)
lib/kaslr.c is used by both the main kernel and the boot stub. It
includes asm/io.h which is supposed to be used in the main kernel. It
leads to build warnings like this with clang 13:

  warning: implicit declaration of function 'outl' is invalid in C99 [-Wimplicit-function-declaration]

Replace <asm/io.h> with <asm/shared/io.h> which is suitable for both
cases.

Fixes: 1e8f93e18379 ("x86: Consolidate port I/O helpers")
Reported-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220410200025.3stf4jjvwfe5oxew@box.shutemov.name
arch/x86/lib/kaslr.c

index 2b3eb8c948a3d0d303d206f013ef78f840bf693a..a58f451a7dd32e30215019ca35ffab444c8ccc43 100644 (file)
@@ -11,7 +11,7 @@
 #include <asm/msr.h>
 #include <asm/archrandom.h>
 #include <asm/e820/api.h>
-#include <asm/io.h>
+#include <asm/shared/io.h>
 
 /*
  * When built for the regular kernel, several functions need to be stubbed out