mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 10:31:33 -04:00
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/20260804-fix-some-local-headers-v1-1-a7beb173c116@kernel.org Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> Acked-by: Vlastimil Babka (SUSE) <vbabka@kernel.org> Acked-by: David Hildenbrand (Arm) <david@kernel.org> Acked-by: Zi Yan <ziy@nvidia.com> Reviewed-by: Barry Song <baohua@kernel.org> Reviewed-by: Baoquan He <baoquan.he@linux.dev> Cc: Chris Li <chrisl@kernel.org> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Kairui Song <kasong@tencent.com> Cc: Kemeng Shi <shikemeng@huaweicloud.com> Cc: Liam R. Howlett <liam@infradead.org> Cc: Michal Hocko <mhocko@kernel.org> Cc: Mike Rapoport <rppt@kernel.org> Cc: Muchun Song <muchun.song@linux.dev> Cc: Nhat Pham <nphamcs@gmail.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: Roman Gushchin <roman.gushchin@linux.dev> Cc: Shakeel Butt <shakeel.butt@linux.dev> Cc: Suren Baghdasaryan <surenb@google.com> Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
49 lines
1.3 KiB
C
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 */
|