diff options
| author | Guo Ren <guoren@linux.alibaba.com> | 2023-06-13 21:30:16 -0400 |
|---|---|---|
| committer | Palmer Dabbelt <palmer@rivosinc.com> | 2023-06-22 10:38:35 -0700 |
| commit | 163e76cc6ef43b7a5e9b6e245a6d6667c9d9b4a7 (patch) | |
| tree | ea81cf90ee824bbf0e4aa9a061cb5a96a06eadaa /arch/riscv/include/asm/thread_info.h | |
| parent | d5e45e810e0e08114035d31d88049544c038e6fc (diff) | |
| download | linux-next-163e76cc6ef43b7a5e9b6e245a6d6667c9d9b4a7.tar.gz linux-next-163e76cc6ef43b7a5e9b6e245a6d6667c9d9b4a7.zip | |
riscv: stack: Support HAVE_IRQ_EXIT_ON_IRQ_STACK
Add independent irq stacks for percpu to prevent kernel stack overflows.
It is also compatible with VMAP_STACK by arch_alloc_vmap_stack.
Tested-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
Cc: Clément Léger <cleger@rivosinc.com>
Link: https://lore.kernel.org/r/20230614013018.2168426-2-guoren@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/include/asm/thread_info.h')
| -rw-r--r-- | arch/riscv/include/asm/thread_info.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h index 97e6f65ec176..2f32875276b0 100644 --- a/arch/riscv/include/asm/thread_info.h +++ b/arch/riscv/include/asm/thread_info.h @@ -40,6 +40,8 @@ #define OVERFLOW_STACK_SIZE SZ_4K #define SHADOW_OVERFLOW_STACK_SIZE (1024) +#define IRQ_STACK_SIZE THREAD_SIZE + #ifndef __ASSEMBLY__ extern long shadow_stack[SHADOW_OVERFLOW_STACK_SIZE / sizeof(long)]; |
