Skip to contentSkip to conversation

arm64: Remove assertion on CONFIG_VMAP_STACK

PATCH Applied Dawei Li 3 participants 3 messages Nov 3, 2025 – Nov 7, 2025 arm64

lore
Share & tools
lore

Dawei Li

author
#0 lore raw

PATCH 1/1 arm64: Remove assertion on CONFIG_VMAP_STACK

CONFIG_VMAP_STACK is selected by arm64 arch unconditionly since commit ef6861b8e6dd ("arm64: Mandate VMAP_STACK").

Remove the redundant assertion and headers.

---
 arch/arm64/include/asm/vmap_stack.h | 4 ----
 arch/arm64/kernel/sdei.c            | 4 ----
 2 files changed, 8 deletions(-)
arch/arm64/include/asm/vmap_stack.h +0 -4
index 20873099c035..75daee1a07e9 100644
@@ -3,9 +3,7 @@
 #ifndef __ASM_VMAP_STACK_H
 #define __ASM_VMAP_STACK_H
 
-#include <linux/bug.h>
 #include <linux/gfp.h>
-#include <linux/kconfig.h>
 #include <linux/vmalloc.h>
 #include <linux/pgtable.h>
 #include <asm/memory.h>
@@ -19,8 +17,6 @@ static inline unsigned long *arch_alloc_vmap_stack(size_t stack_size, int node)
 {
 	void *p;
 
-	BUILD_BUG_ON(!IS_ENABLED(CONFIG_VMAP_STACK));
-
 	p = __vmalloc_node(stack_size, THREAD_ALIGN, THREADINFO_GFP, node,
 			__builtin_return_address(0));
 	return kasan_reset_tag(p);
arch/arm64/kernel/sdei.c +0 -4
index 95169f7b6531..213ac72ce4fd 100644
@@ -63,8 +63,6 @@ static void free_sdei_stacks(void)
 {
 	int cpu;
 
-	BUILD_BUG_ON(!IS_ENABLED(CONFIG_VMAP_STACK));
-
 	for_each_possible_cpu(cpu) {
 		_free_sdei_stack(&sdei_stack_normal_ptr, cpu);
 		_free_sdei_stack(&sdei_stack_critical_ptr, cpu);
@@ -88,8 +86,6 @@ static int init_sdei_stacks(void)
 	int cpu;
 	int err = 0;
 
-	BUILD_BUG_ON(!IS_ENABLED(CONFIG_VMAP_STACK));
-
 	for_each_possible_cpu(cpu) {
 		err = _init_sdei_stack(&sdei_stack_normal_ptr, cpu);
 		if (err)
Signature · 1 line
2.25.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Dawei Li

CONFIG_VMAP_STACK is selected by arm64 arch unconditionly since commit ef6861b8e6dd ("arm64: Mandate VMAP_STACK").

Remove the redundant assertion and headers.

---
 arch/arm64/include/asm/vmap_stack.h | 4 ----
 arch/arm64/kernel/sdei.c            | 4 ----
 2 files changed, 8 deletions(-)

Will

maintainer Applied
#2 lore raw
In reply to Dawei Li
Quoted 6 lines · Dawei Li

CONFIG_VMAP_STACK is selected by arm64 arch unconditionly since commit ef6861b8e6dd ("arm64: Mandate VMAP_STACK").

Remove the redundant assertion and headers.

Applied to arm64 (for-next/misc), thanks!

[1/1] arm64: Remove assertion on CONFIG_VMAP_STACK

      https://git.kernel.org/arm64/c/4002068508ca
Signature · 1 line
Catalin