Files
Lorenzo Stoakes (ARM) 6fd3e592c0 mm: add some missing includes to mm-local headers
There are a number of internal headers local to mm/ which reference
functions and data types without including the relevant headers.

mm/vma.h is a special case that intentionally does not include additional
headers, but the others are not.

This breaks tooling like clangd (which is where I noticed this), though
the build is OK due to the C files including the headers happening to
include required dependencies.

It's better to be explicit about dependencies anyway, so add the missing
includes and fix clangd as a bonus.

Link: https://lore.kernel.org/[email protected]
Signed-off-by: Lorenzo Stoakes (ARM) <[email protected]>
Acked-by: Vlastimil Babka (SUSE) <[email protected]>
Acked-by: David Hildenbrand (Arm) <[email protected]>
Acked-by: Zi Yan <[email protected]>
Reviewed-by: Barry Song <[email protected]>
Reviewed-by: Baoquan He <[email protected]>
Cc: Chris Li <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Kairui Song <[email protected]>
Cc: Kemeng Shi <[email protected]>
Cc: Liam R. Howlett <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Muchun Song <[email protected]>
Cc: Nhat Pham <[email protected]>
Cc: Oscar Salvador <[email protected]>
Cc: Roman Gushchin <[email protected]>
Cc: Shakeel Butt <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Cc: "Uladzislau Rezki (Sony)" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
2026-08-24 18:43:03 -07:00

49 lines
1.3 KiB
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* mm-internal APIs for vmalloc
*/
#ifndef __MM_VMALLOC_H
#define __MM_VMALLOC_H
#include <linux/vmalloc.h>
#ifdef CONFIG_MMU
void __init vmalloc_init(void);
int __must_check vmap_pages_range_noflush(unsigned long addr, unsigned long end,
pgprot_t prot, struct page **pages,
unsigned int page_shift, gfp_t gfp_mask);
unsigned int get_vm_area_page_order(struct vm_struct *vm);
#else
static inline void vmalloc_init(void) {}
static inline
int __must_check vmap_pages_range_noflush(unsigned long addr, unsigned long end,
pgprot_t prot, struct page **pages,
unsigned int page_shift, gfp_t gfp_mask)
{
return -EINVAL;
}
static inline void vunmap_range_noflush(unsigned long start, unsigned long end)
{
}
#endif
struct vm_struct *__get_vm_area_node(unsigned long size,
unsigned long align, unsigned long shift,
unsigned long vm_flags, unsigned long start,
unsigned long end, int node, gfp_t gfp_mask,
const void *caller);
void clear_vm_uninitialized_flag(struct vm_struct *vm);
int __must_check __vmap_pages_range_noflush(unsigned long addr,
unsigned long end, pgprot_t prot,
struct page **pages, unsigned int page_shift);
void vunmap_range_noflush(unsigned long start, unsigned long end);
void __vunmap_range_noflush(unsigned long start, unsigned long end);
#endif /* __MM_VMALLOC_H */