0001
0002
0003 #ifndef __ASM_VMAP_STACK_H
0004 #define __ASM_VMAP_STACK_H
0005
0006 #include <linux/bug.h>
0007 #include <linux/gfp.h>
0008 #include <linux/kconfig.h>
0009 #include <linux/vmalloc.h>
0010 #include <linux/pgtable.h>
0011 #include <asm/memory.h>
0012 #include <asm/thread_info.h>
0013
0014
0015
0016
0017
0018 static inline unsigned long *arch_alloc_vmap_stack(size_t stack_size, int node)
0019 {
0020 void *p;
0021
0022 BUILD_BUG_ON(!IS_ENABLED(CONFIG_VMAP_STACK));
0023
0024 p = __vmalloc_node(stack_size, THREAD_ALIGN, THREADINFO_GFP, node,
0025 __builtin_return_address(0));
0026 return kasan_reset_tag(p);
0027 }
0028
0029 #endif