riscv: use 16KB kernel stack on 64-bit
authorAndreas Schwab <schwab@suse.de>
Mon, 6 Jul 2020 12:32:26 +0000 (14:32 +0200)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Tue, 14 Jul 2020 20:40:04 +0000 (13:40 -0700)
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@suse.de>
Reviewed-by: Anup Patel <anup@brainfault.org>
[Palmer: mention irqstack in the commit text]
Fixes: 7db91e57a0ac ("RISC-V: Task implementation")
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/include/asm/thread_info.h

index 1dd12a0..464a2bb 100644 (file)
 #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__