mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
mm/internal.h becomes more and more bloated. Move declarations related to vmalloc to a new mm/vmalloc.h header. No functional changes. Link: https://lore.kernel.org/20260709-internal-h-v2-3-695631425968@kernel.org Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Acked-by: Muchun Song <muchun.song@linux.dev> Acked-by: Vlastimil Babka (SUSE) <vbabka@kernel.org> Acked-by: David Hildenbrand (Arm) <david@kernel.org> Acked-by: Lorenzo Stoakes <ljs@kernel.org> Acked-by: Pratyush Yadav <pratyush@kernel.org> Acked-by: SJ Park <sj@kernel.org> Cc: Alexander Graf <graf@amazon.com> Cc: Alexander Potapenko <glider@google.com> Cc: Brendan Jackman <jackmanb@google.com> Cc: Dennis Zhou <dennis@kernel.org> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Liam R. Howlett <liam@infradead.org> Cc: Marco Elver <elver@google.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: Pasha Tatashin <pasha.tatashin@soleen.com> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Tejun Heo <tj@kernel.org> Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com> Cc: Zi Yan <ziy@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
47 lines
1.3 KiB
C
47 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
|
|
|
|
#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 */
|