Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/mm: Decouple <linux/vmalloc.h> from <asm/io.h>

Nothing in <asm/io.h> uses anything from <linux/vmalloc.h>, so
remove it from there and fix up the resulting build problems
triggered on x86 {64|32}-bit {def|allmod|allno}configs.

The breakages were triggering in places where x86 builds relied
on vmalloc() facilities but did not include <linux/vmalloc.h>
explicitly and relied on the implicit inclusion via <asm/io.h>.

Also add:

- <linux/init.h> to <linux/io.h>
- <asm/pgtable_types> to <asm/io.h>

... which were two other implicit header file dependencies.

Suggested-by: David Miller <davem@davemloft.net>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
[ Tidied up the changelog. ]
Acked-by: David Miller <davem@davemloft.net>
Acked-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Colin Cross <ccross@android.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: James E.J. Bottomley <JBottomley@odin.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Kristen Carlson Accardi <kristen@linux.intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Suma Ramars <sramars@cisco.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Stephen Rothwell and committed by
Ingo Molnar
d6472302 1e6277de

+15 -2
+1 -2
arch/x86/include/asm/io.h
··· 40 40 #include <linux/compiler.h> 41 41 #include <asm/page.h> 42 42 #include <asm/early_ioremap.h> 43 + #include <asm/pgtable_types.h> 43 44 44 45 #define build_mmio_read(name, size, type, reg, barrier) \ 45 46 static inline type name(const volatile void __iomem *addr) \ ··· 198 197 #ifdef __KERNEL__ 199 198 200 199 #include <asm-generic/iomap.h> 201 - 202 - #include <linux/vmalloc.h> 203 200 204 201 /* 205 202 * Convert a virtual cached pointer to an uncached pointer
+1
arch/x86/kernel/crash.c
··· 22 22 #include <linux/elfcore.h> 23 23 #include <linux/module.h> 24 24 #include <linux/slab.h> 25 + #include <linux/vmalloc.h> 25 26 26 27 #include <asm/processor.h> 27 28 #include <asm/hardirq.h>
+1
arch/x86/kernel/machine_kexec_64.c
··· 17 17 #include <linux/ftrace.h> 18 18 #include <linux/io.h> 19 19 #include <linux/suspend.h> 20 + #include <linux/vmalloc.h> 20 21 21 22 #include <asm/init.h> 22 23 #include <asm/pgtable.h>
+1
arch/x86/mm/pageattr-test.c
··· 9 9 #include <linux/random.h> 10 10 #include <linux/kernel.h> 11 11 #include <linux/mm.h> 12 + #include <linux/vmalloc.h> 12 13 13 14 #include <asm/cacheflush.h> 14 15 #include <asm/pgtable.h>
+1
arch/x86/mm/pageattr.c
··· 14 14 #include <linux/percpu.h> 15 15 #include <linux/gfp.h> 16 16 #include <linux/pci.h> 17 + #include <linux/vmalloc.h> 17 18 18 19 #include <asm/e820.h> 19 20 #include <asm/processor.h>
+1
arch/x86/xen/p2m.c
··· 67 67 #include <linux/seq_file.h> 68 68 #include <linux/bootmem.h> 69 69 #include <linux/slab.h> 70 + #include <linux/vmalloc.h> 70 71 71 72 #include <asm/cache.h> 72 73 #include <asm/setup.h>
+1
drivers/acpi/apei/erst.c
··· 35 35 #include <linux/nmi.h> 36 36 #include <linux/hardirq.h> 37 37 #include <linux/pstore.h> 38 + #include <linux/vmalloc.h> 38 39 #include <acpi/apei.h> 39 40 40 41 #include "apei-internal.h"
+1
drivers/cpufreq/intel_pstate.c
··· 26 26 #include <linux/fs.h> 27 27 #include <linux/debugfs.h> 28 28 #include <linux/acpi.h> 29 + #include <linux/vmalloc.h> 29 30 #include <trace/events/power.h> 30 31 31 32 #include <asm/div64.h>
+1
drivers/dma/mic_x100_dma.c
··· 22 22 #include <linux/module.h> 23 23 #include <linux/io.h> 24 24 #include <linux/seq_file.h> 25 + #include <linux/vmalloc.h> 25 26 26 27 #include "mic_x100_dma.h" 27 28
+1
drivers/net/hyperv/netvsc.c
··· 28 28 #include <linux/slab.h> 29 29 #include <linux/netdevice.h> 30 30 #include <linux/if_ether.h> 31 + #include <linux/vmalloc.h> 31 32 #include <asm/sync_bitops.h> 32 33 33 34 #include "hyperv_net.h"
+1
drivers/net/hyperv/rndis_filter.c
··· 27 27 #include <linux/netdevice.h> 28 28 #include <linux/if_vlan.h> 29 29 #include <linux/nls.h> 30 + #include <linux/vmalloc.h> 30 31 31 32 #include "hyperv_net.h" 32 33
+1
drivers/scsi/fnic/fnic_debugfs.c
··· 18 18 #include <linux/module.h> 19 19 #include <linux/errno.h> 20 20 #include <linux/debugfs.h> 21 + #include <linux/vmalloc.h> 21 22 #include "fnic.h" 22 23 23 24 static struct dentry *fnic_trace_debugfs_root;
+1
drivers/scsi/fnic/fnic_trace.c
··· 21 21 #include <linux/spinlock.h> 22 22 #include <linux/kallsyms.h> 23 23 #include <linux/time.h> 24 + #include <linux/vmalloc.h> 24 25 #include "fnic_io.h" 25 26 #include "fnic.h" 26 27
+1
include/linux/io.h
··· 19 19 #define _LINUX_IO_H 20 20 21 21 #include <linux/types.h> 22 + #include <linux/init.h> 22 23 #include <asm/io.h> 23 24 #include <asm/page.h> 24 25
+1
sound/pci/asihpi/hpioctl.c
··· 32 32 #include <linux/pci.h> 33 33 #include <linux/stringify.h> 34 34 #include <linux/module.h> 35 + #include <linux/vmalloc.h> 35 36 36 37 #ifdef MODULE_FIRMWARE 37 38 MODULE_FIRMWARE("asihpi/dsp5000.bin");