[PATCH] limit thread stack size with >4K pages
Helge Deller <[email protected]>
| Newsgroups | gmane.linux.ports.hppa |
|---|---|
| Message-ID | <[email protected]> |
This patch limits the thread stack size when pages >4 K were selected. i.e. THREAD_SIZE is calculated to "MAX(16K, PAGE_SIZE)" diff-tree 6033080df2431638223580559ebea54efb22bc42 (from cd54f53359c3e0deb898a5dbb199b70c5cb6ef0f) Author: Helge Deller <[email protected]> Date: Sat Mar 17 13:19:01 2007 +0100 [PARISC] limit thread stack size with >4K pages Signed-off-by: Helge Deller <[email protected]> diff --git a/include/asm-parisc/thread_info.h b/include/asm-parisc/thread_info.h index 949314c..ec92d66 100644 --- a/include/asm-parisc/thread_info.h +++ b/include/asm-parisc/thread_info.h @@ -34,11 +34,16 @@ struct thread_info { /* thread information allocation */ -#define THREAD_ORDER 2 +#if defined(CONFIG_PARISC_PAGE_SIZE_4KB) +# define THREAD_ORDER 2 +#elif defined(CONFIG_PARISC_PAGE_SIZE_16KB) +# define THREAD_ORDER 0 +#elif defined(CONFIG_PARISC_PAGE_SIZE_64KB) +# define THREAD_ORDER 0 +#endif /* Be sure to hunt all references to this down when you change the size of * the kernel stack */ #define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) -#define THREAD_SHIFT (PAGE_SHIFT + THREAD_ORDER) #define alloc_thread_info(tsk) ((struct thread_info *) \ __get_free_pages(GFP_KERNEL, THREAD_ORDER))