X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-m68knommu%2Fthread_info.h;h=b8f009edf2b2cf5a2c88c756a7e3151f68a8e6e9;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=cedf441d375ecce34ddc4b1ef25a2b97f58eb595;hpb=6a77f38946aaee1cd85eeec6cf4229b204c15071;p=linux-2.6.git diff --git a/include/asm-m68knommu/thread_info.h b/include/asm-m68knommu/thread_info.h index cedf441d3..b8f009edf 100644 --- a/include/asm-m68knommu/thread_info.h +++ b/include/asm-m68knommu/thread_info.h @@ -14,16 +14,29 @@ #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< preemptable, <0 => BUG*/ + int preempt_count; /* 0 => preemptable, <0 => BUG */ struct restart_block restart_block; }; @@ -60,20 +73,10 @@ static inline struct thread_info *current_thread_info(void) /* 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) -#define get_thread_info(ti) get_task_struct((ti)->task) -#define put_thread_info(ti) put_task_struct((ti)->task) + __get_free_pages(GFP_KERNEL, THREAD_SIZE_ORDER)) +#define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_SIZE_ORDER) #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 /*