[PATCH 1/1][FOCAL][RISC-V][SRU] riscv: use 16KB kernel stack on 64-bit
Colin King
colin.king at canonical.com
Mon Jul 20 08:49:51 UTC 2020
From: Andreas Schwab <schwab at suse.de>
https://bugs.launchpad.net/bugs/1879470
With the current 8KB stack size there are frequent overflows in a 64-bit
configuration. We may split IRQ stacks off in the future, but this fixes a
number of issues right now.
Signed-off-by: Andreas Schwab <schwab at suse.de>
Reviewed-by: Anup Patel <anup at brainfault.org>
[Palmer: mention irqstack in the commit text]
Fixes: 7db91e57a0ac ("RISC-V: Task implementation")
Cc: stable at vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmerdabbelt at google.com>
(cherry picked from commit 0cac21b02ba5f3095fd2dcc77c26a25a0b2432ed)
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
arch/riscv/include/asm/thread_info.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h
index 1dd12a0cbb2b..464a2bbc97ea 100644
--- a/arch/riscv/include/asm/thread_info.h
+++ b/arch/riscv/include/asm/thread_info.h
@@ -12,7 +12,11 @@
#include <linux/const.h>
/* thread information allocation */
+#ifdef CONFIG_64BIT
+#define THREAD_SIZE_ORDER (2)
+#else
#define THREAD_SIZE_ORDER (1)
+#endif
#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
#ifndef __ASSEMBLY__
--
2.27.0
More information about the kernel-team
mailing list