Commit 10fdf838 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman

lib: fix build failure in CONFIG_DEBUG_VIRTUAL test

On several arches, virt_to_phys() is in io.h

Build fails without it:

  CC      lib/test_debug_virtual.o
lib/test_debug_virtual.c: In function 'test_debug_virtual_init':
lib/test_debug_virtual.c:26:7: error: implicit declaration of function 'virt_to_phys' [-Werror=implicit-function-declaration]
  pa = virt_to_phys(va);

Fixes: e4dace36 ("lib: add test module for CONFIG_DEBUG_VIRTUAL")
Signed-off-by: default avatarChristophe Leroy <>
Reviewed-by: default avatarKees Cook <>
Signed-off-by: default avatarMichael Ellerman <>
parent ebd1d3b7
......@@ -5,6 +5,7 @@
#include <linux/vmalloc.h>
#include <linux/slab.h>
#include <linux/sizes.h>
#include <linux/io.h>
#include <asm/page.h>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment