@@ -29,6 +29,9 @@ EXPORT_SYMBOL(ioport_unmap);
#endif
#ifdef CONFIG_PCI
+
+#include <asm/pgtable.h> // for VMALLOC_*
+
unsigned long pcibios_min_io = 0x1000;
EXPORT_SYMBOL(pcibios_min_io);
@@ -10,6 +10,7 @@
#include <linux/vmalloc.h>
#include <linux/slab.h>
#include <linux/comedi/comedidev.h>
+#include <asm/pgtable.h> // for PAGE_KERNEL*
#include "comedi_internal.h"
#ifdef PAGE_KERNEL_NOCACHE
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright(c) 2023 Intel Corporation */
#include <linux/dma-mapping.h>
+#include <linux/fs.h> // for simple_read_from_buffer()
#include <linux/kernel.h>
#include <linux/string_helpers.h>
#include <linux/stringify.h>
@@ -31,6 +31,7 @@
#include <linux/spinlock.h>
#include <linux/of.h>
#include <linux/of_dma.h>
+#include <asm/pgtable.h> // for ZERO_PAGE()
#include "virt-dma.h"
@@ -15,6 +15,7 @@
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kernel.h>
+#include <linux/mm.h> // for PAGE_ALIGN()
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_dma.h>
@@ -12,6 +12,7 @@
#include <linux/dmaengine.h>
#include <linux/interrupt.h>
#include <linux/list.h>
+#include <linux/mm.h> // for PAGE_ALIGN()
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of.h>
@@ -5,6 +5,7 @@
#include <linux/slab.h>
#include <linux/io.h>
+#include <linux/mm.h> // for PAGE_ALIGN()
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/errno.h>
@@ -5,6 +5,7 @@
#include <linux/io.h>
#include <linux/errno.h>
#include <linux/delay.h>
+#include <linux/mm.h> // for PAGE_ALIGN()
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/types.h>
@@ -10,6 +10,7 @@
#include <linux/kref.h>
#include <linux/mailbox_client.h>
#include <linux/mailbox_controller.h>
+#include <linux/mm.h> // for PAGE_ALIGN()
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_platform.h>
@@ -6,6 +6,7 @@
#include <linux/slab.h>
#include <linux/kernel.h>
+#include <linux/mm.h> // for PAGE_ALIGN()
#include <linux/module.h>
#include <linux/device.h>
#include <linux/workqueue.h>
@@ -5,6 +5,8 @@
#include <linux/interval_tree.h>
#include <linux/iommufd.h>
#include <linux/iommu.h>
+#include <linux/capability.h>
+#include <linux/slab.h>
#include <uapi/linux/iommufd.h>
#include "io_pagetable.h"
@@ -5,6 +5,7 @@
*/
#include <linux/slab.h>
#include <linux/iommu.h>
+#include <linux/mm.h> // for GUP_PIN_COUNTING_BIAS
#include <linux/xarray.h>
#include <linux/file.h>
#include <linux/anon_inodes.h>
@@ -8,6 +8,7 @@
#include <linux/firmware.h>
#include <linux/interrupt.h>
#include <linux/iommu.h>
+#include <linux/mm.h> // for totalram_pages()
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_platform.h>
@@ -18,6 +18,7 @@
*
*/
+#include <linux/mm.h> // for PAGE_ALIGN()
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/kernel.h>
@@ -11,6 +11,7 @@
#include <linux/interrupt.h>
#include <linux/panic_notifier.h>
#include <linux/kref.h>
+#include <linux/mm.h> // for io_remap_pfn_range()
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/pci.h>
@@ -10,6 +10,7 @@
#include <linux/idr.h>
#include <linux/list.h>
#include <linux/miscdevice.h>
+#include <linux/mm.h> // for find_vma()
#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/of.h>
@@ -17,6 +17,7 @@
#include <linux/kernel.h>
#include <linux/types.h>
+#include <linux/mm.h> // for struct vm_operations_struct
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/string.h>
@@ -2,6 +2,7 @@
#include <linux/compat.h>
#include <linux/dma-mapping.h>
#include <linux/iommu.h>
+#include <linux/mm.h> // for struct vm_operations_struct
#include <linux/module.h>
#include <linux/poll.h>
#include <linux/slab.h>
@@ -9,6 +9,8 @@
#include "sfdp.h"
+#include <linux/sizes.h> // for SZ_*
+
#define SPI_NOR_MAX_ID_LEN 6
/*
* 256 bytes is a sane default for most older flashes. Newer flashes will
@@ -16,6 +16,7 @@
#include <linux/slab.h>
#include <linux/genalloc.h>
#include <linux/memremap.h>
+#include <linux/mm.h> // for VM_MAYSHARE
#include <linux/percpu-refcount.h>
#include <linux/random.h>
#include <linux/seq_buf.h>
@@ -25,6 +25,7 @@
#include <linux/logic_pio.h>
#include <linux/pm_wakeup.h>
#include <linux/device.h>
+#include <linux/pgtable.h> // for pgprot_device()
#include <linux/pm_runtime.h>
#include <linux/pci_hotplug.h>
#include <linux/vmalloc.h>
@@ -16,6 +16,7 @@
#include <linux/remoteproc.h>
#include <linux/remoteproc/mtk_scp.h>
#include <linux/rpmsg/mtk_rpmsg.h>
+#include <linux/slab.h>
#include "mtk_common.h"
#include "remoteproc_internal.h"
@@ -18,6 +18,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>
+#include <linux/mm.h> // for PAGE_ALIGN()
#include <linux/module.h>
#include <linux/device.h>
#include <linux/panic_notifier.h>
@@ -6,6 +6,7 @@
#include <linux/kernel.h>
#include <linux/cdev.h>
#include <linux/err.h>
+#include <linux/mm.h> // for remap_pfn_range()
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/of.h>
@@ -11,6 +11,7 @@
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
+#include <linux/sizes.h> // for SZ_*
#include <linux/spi/spi.h>
#include <linux/spi/spi-mem.h>
@@ -33,6 +33,8 @@
#include <linux/slab.h>
#include <linux/spi/spi.h>
+#include <asm/pgtable.h> // for ZERO_PAGE()
+
/* SPI register offsets */
#define BCM2835_SPI_CS 0x00
#define BCM2835_SPI_FIFO 0x04
@@ -8,6 +8,7 @@
#include <linux/iopoll.h>
#include <linux/module.h>
+#include <linux/sizes.h> // for SZ_*
#include <linux/mtd/partitions.h>
#include <linux/mtd/spi-nor.h>
@@ -12,6 +12,7 @@
#include <linux/hrtimer.h>
#include <linux/dma-mapping.h>
#include <linux/kmsan.h>
+#include <linux/mm.h> // for PAGE_ALIGN()
#include <linux/spinlock.h>
#include <xen/xen.h>
@@ -7,6 +7,8 @@
#include <linux/fs.h> /* only for vma_is_dax() */
+#include <asm/page.h> // for pmd_t
+
vm_fault_t do_huge_pmd_anonymous_page(struct vm_fault *vmf);
int copy_huge_pmd(struct mm_struct *dst_mm, struct mm_struct *src_mm,
pmd_t *dst_pmd, pmd_t *src_pmd, unsigned long addr,
@@ -14,6 +14,7 @@
#include <linux/err.h>
#include <linux/of.h>
#include <linux/iova_bitmap.h>
+#include <linux/uaccess.h> // for copy_struct_from_user()
#define IOMMU_READ (1 << 0)
#define IOMMU_WRITE (1 << 1)
@@ -6,6 +6,8 @@
#ifndef _NVME_KEYRING_H
#define _NVME_KEYRING_H
+#include <linux/key.h>
+
#if IS_ENABLED(CONFIG_NVME_KEYRING)
key_serial_t nvme_tls_psk_default(struct key *keyring,
@@ -12,6 +12,9 @@
#ifndef __GENERATING_BOUNDS_H
#include <linux/mm_types.h>
#include <generated/bounds.h>
+#ifdef CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
+#include <linux/jump_label.h> // for DECLARE_STATIC_KEY_FALSE
+#endif
#endif /* !__GENERATING_BOUNDS_H */
/*
@@ -8,6 +8,12 @@
#include <linux/mm.h>
#include <asm/io.h>
+#ifdef CONFIG_UML
+#include <asm/pgtable.h> // for virt_to_page(), page_to_phys()
+#else
+#include <asm/page.h> // for virt_to_page(), page_to_phys()
+#endif
+
struct scatterlist {
unsigned long page_link;
unsigned int offset;
@@ -4,6 +4,7 @@
#include <linux/types.h>
#include <linux/percpu.h>
+#include <linux/mm.h> // for folio_zone(), folio_nr_pages()
#include <linux/mmzone.h>
#include <linux/vm_event_item.h>
#include <linux/atomic.h>
@@ -13,6 +13,9 @@
#ifndef SCSICAM_H
#define SCSICAM_H
+
+#include <linux/types.h> // for sector_t
+
int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip);
bool scsi_partsize(struct block_device *bdev, sector_t capacity, int geom[3]);
unsigned char *scsi_bios_ptable(struct block_device *bdev);
@@ -4,6 +4,7 @@
* the allocated memory contains normal pages in the direct kernel mapping.
*/
#include <linux/dma-map-ops.h>
+#include <linux/mm.h> // for PAGE_ALIGN()
static struct page *dma_common_vaddr_to_page(void *cpu_addr)
{
@@ -3,6 +3,7 @@
* Copyright (c) 2014 The Linux Foundation
*/
#include <linux/dma-map-ops.h>
+#include <linux/mm.h> // for vmap(), PAGE_ALIGN()
#include <linux/slab.h>
#include <linux/vmalloc.h>
@@ -47,6 +47,7 @@
#include <linux/oom.h>
#include <linux/tick.h>
#include <linux/rcupdate_trace.h>
+#include <linux/mm.h> // for mem_dump_obj()
#include <linux/nmi.h>
#include "rcu.h"
@@ -25,6 +25,7 @@
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/export.h>
+#include <linux/mm.h> // for want_init_on_alloc()
#include <linux/mutex.h>
#include <linux/poison.h>
#include <linux/sched.h>
After developing the other patches in this series, I had lots of build failures because "#include <linux/mm.h>" was missing. This patch fixes those build failures by adding the missing "#include" lines. To allow bisects, it is ordered before the others. Signed-off-by: Max Kellermann <max.kellermann@ionos.com> --- arch/arm/mm/iomap.c | 3 +++ drivers/comedi/comedi_buf.c | 1 + drivers/crypto/intel/qat/qat_common/adf_gen4_pm_debugfs.c | 1 + drivers/dma/bcm2835-dma.c | 1 + drivers/dma/dma-axi-dmac.c | 1 + drivers/dma/sh/rcar-dmac.c | 1 + drivers/firmware/qcom/qcom_scm-legacy.c | 1 + drivers/firmware/qcom/qcom_scm-smc.c | 1 + drivers/firmware/raspberrypi.c | 1 + drivers/iio/buffer/industrialio-buffer-dma.c | 1 + drivers/iommu/iommufd/ioas.c | 2 ++ drivers/iommu/iommufd/selftest.c | 1 + drivers/media/platform/mediatek/vpu/mtk_vpu.c | 1 + drivers/media/platform/ti/omap/omap_voutlib.c | 1 + drivers/misc/bcm-vk/bcm_vk_dev.c | 1 + drivers/misc/fastrpc.c | 1 + drivers/misc/genwqe/card_dev.c | 1 + drivers/misc/uacce/uacce.c | 1 + drivers/mtd/spi-nor/core.h | 2 ++ drivers/pci/p2pdma.c | 1 + drivers/pci/pci.c | 1 + drivers/remoteproc/mtk_scp.c | 1 + drivers/remoteproc/remoteproc_core.c | 1 + drivers/soc/qcom/rmtfs_mem.c | 1 + drivers/spi/spi-aspeed-smc.c | 1 + drivers/spi/spi-bcm2835.c | 2 ++ drivers/spi/spi-intel.c | 1 + drivers/virtio/virtio_ring.c | 1 + include/linux/huge_mm.h | 2 ++ include/linux/iommu.h | 1 + include/linux/nvme-keyring.h | 2 ++ include/linux/page-flags.h | 3 +++ include/linux/scatterlist.h | 6 ++++++ include/linux/vmstat.h | 1 + include/scsi/scsicam.h | 3 +++ kernel/dma/ops_helpers.c | 1 + kernel/dma/remap.c | 1 + kernel/rcu/rcutorture.c | 1 + mm/dmapool.c | 1 + 39 files changed, 55 insertions(+)