xref: /kernel/linux/linux-5.10/arch/arm64/include/asm/vmap_stack.h
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/arch/arm64/include/asm/
18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci// Copyright (C) 2017 Arm Ltd.
38c2ecf20Sopenharmony_ci#ifndef __ASM_VMAP_STACK_H
48c2ecf20Sopenharmony_ci#define __ASM_VMAP_STACK_H
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci#include <linux/bug.h>
78c2ecf20Sopenharmony_ci#include <linux/gfp.h>
88c2ecf20Sopenharmony_ci#include <linux/kconfig.h>
98c2ecf20Sopenharmony_ci#include <linux/vmalloc.h>
108c2ecf20Sopenharmony_ci#include <linux/pgtable.h>
118c2ecf20Sopenharmony_ci#include <asm/memory.h>
128c2ecf20Sopenharmony_ci#include <asm/thread_info.h>
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci/*
158c2ecf20Sopenharmony_ci * To ensure that VMAP'd stack overflow detection works correctly, all VMAP'd
168c2ecf20Sopenharmony_ci * stacks need to have the same alignment.
178c2ecf20Sopenharmony_ci */
188c2ecf20Sopenharmony_cistatic inline unsigned long *arch_alloc_vmap_stack(size_t stack_size, int node)
198c2ecf20Sopenharmony_ci{
208c2ecf20Sopenharmony_ci	BUILD_BUG_ON(!IS_ENABLED(CONFIG_VMAP_STACK));
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci	return __vmalloc_node(stack_size, THREAD_ALIGN, THREADINFO_GFP, node,
238c2ecf20Sopenharmony_ci			__builtin_return_address(0));
248c2ecf20Sopenharmony_ci}
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci#endif /* __ASM_VMAP_STACK_H */
27

Indexes created Thu Nov 07 10:32:03 CST 2024