[parisc-linux] [PATCH] limit thread stack size with >4K pages
James Bottomley
James.Bottomley at SteelEye.com
Sat Mar 17 07:47:44 MDT 2007
On Sat, 2007-03-17 at 13:23 +0100, Helge Deller wrote:
> -#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
That's a bit ugly ... and would break if someone added new page sizes.
Can't we do something like
#if PAGE_BITS > 16
#define THREAD_ORDER 0
#else
#define THREAD_ORDER (16 - PAGE_BITS)
#endif
?
James
More information about the parisc-linux
mailing list