Current definition of THREAD_SHIFT is (PAGE_SHIFT << THREAD_SIZE_ORDER) look incorrect. It should be (PAGE_SHIFT + THREAD_SIZE_ORDER) because the following equation should hold:
Say PAGE_SHIFT == 13 (as the default value in ARC) THREAD_SIZE_ORDER == 1 (as CONFIG_16KSTACKS=y) THREAD_SIZE == (1 << THREAD_SHIFT) == (1 << (PAGE_SHIFT + THREAD_SIZE_ORDER)) == (1 << 14) == 16KB Signed-off-by: Min-Hua Chen <minhuadotc...@gmail.com> --- arch/arc/include/asm/thread_info.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arc/include/asm/thread_info.h b/arch/arc/include/asm/thread_info.h index 6ba7fe417095..9f9dd021501c 100644 --- a/arch/arc/include/asm/thread_info.h +++ b/arch/arc/include/asm/thread_info.h @@ -22,7 +22,7 @@ #endif #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) -#define THREAD_SHIFT (PAGE_SHIFT << THREAD_SIZE_ORDER) +#define THREAD_SHIFT (PAGE_SHIFT + THREAD_SIZE_ORDER) #ifndef __ASSEMBLY__ -- 2.34.1 _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc