[RESEND PATCH 1/2] ARC: fix incorrect THREAD_SHIFT definition
From: Min-Hua Chen
Date: Thu May 25 2023 - 12:09:07 EST
Current definition of THREAD_SHIFT is (PAGE_SHIFT << THREAD_SIZE_ORDER)
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 <minhuadotchen@xxxxxxxxx>
---
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