mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
m68k: Calculate THREAD_SIZE from THREAD_SIZE_ORDER
Current THREAD_SIZE_ORDER implementation is not generic. Improve it by: - Defining THREAD_SIZE_ORDER based on the specific platform config, - Calculating THREAD_SIZE from THREAD_SIZE_ORDER. Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Dawei Li <dawei.li@shingroup.cn> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/r/20240304085455.125063-1-dawei.li@shingroup.cn Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:
parent
4cece76496
commit
70d830e337
@ -12,14 +12,15 @@
|
||||
*/
|
||||
#if PAGE_SHIFT < 13
|
||||
#ifdef CONFIG_4KSTACKS
|
||||
#define THREAD_SIZE 4096
|
||||
#define THREAD_SIZE_ORDER 0
|
||||
#else
|
||||
#define THREAD_SIZE 8192
|
||||
#define THREAD_SIZE_ORDER 1
|
||||
#endif
|
||||
#else
|
||||
#define THREAD_SIZE PAGE_SIZE
|
||||
#define THREAD_SIZE_ORDER 0
|
||||
#endif
|
||||
#define THREAD_SIZE_ORDER ((THREAD_SIZE / PAGE_SIZE) - 1)
|
||||
|
||||
#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user