ChangeSet 1.2210, 2005/03/26 13:29:14-08:00, [EMAIL PROTECTED] [PATCH] m68knommu: 4k stack support Support for 4k kernel stacks on m68knommu. This cleans up the use of THREAD_SIZE, so it is used instead of hard coded size. Also remove local offset definitions, these are generated in asm-offsets. Patches original from Patch submitted by Philippe De Muyter <[EMAIL PROTECTED]> Signed-off-by: Greg Ungerer <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
thread_info.h | 27 ++++++++++++++++----------- 1 files changed, 16 insertions(+), 11 deletions(-) diff -Nru a/include/asm-m68knommu/thread_info.h b/include/asm-m68knommu/thread_info.h --- a/include/asm-m68knommu/thread_info.h 2005-03-26 17:28:42 -08:00 +++ b/include/asm-m68knommu/thread_info.h 2005-03-26 17:28:42 -08:00 @@ -15,8 +15,21 @@ #ifndef __ASSEMBLY__ /* + * Size of kernel stack for each process. This must be a power of 2... + */ +#ifdef CONFIG_4KSTACKS +#define THREAD_SIZE_ORDER (0) +#else +#define THREAD_SIZE_ORDER (1) +#endif + +/* + * for asm files, THREAD_SIZE is now generated by asm-offsets.c + */ +#define THREAD_SIZE (PAGE_SIZE<<THREAD_SIZE_ORDER) + +/* * low level task data. - * If you change this, change the TI_* offsets below to match. */ struct thread_info { struct task_struct *task; /* main task structure */ @@ -60,19 +73,11 @@ /* thread information allocation */ #define alloc_thread_info(tsk) ((struct thread_info *) \ - __get_free_pages(GFP_KERNEL, 1)) -#define free_thread_info(ti) free_pages((unsigned long) (ti), 1) + __get_free_pages(GFP_KERNEL, THREAD_SIZE_ORDER)) +#define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_SIZE_ORDER) #define get_thread_info(ti) get_task_struct((ti)->task) #define put_thread_info(ti) put_task_struct((ti)->task) #endif /* __ASSEMBLY__ */ - -/* - * Offsets in thread_info structure, used in assembly code - */ -#define TI_TASK 0 -#define TI_EXECDOMAIN 4 -#define TI_FLAGS 8 -#define TI_CPU 12 #define PREEMPT_ACTIVE 0x4000000 - To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html