diff options
| author | David Mosberger <davidm@napali.hpl.hp.com> | 2003-06-04 08:35:36 -0700 |
|---|---|---|
| committer | David Mosberger <davidm@tiger.hpl.hp.com> | 2003-06-04 08:35:36 -0700 |
| commit | 7df5cefd63cf77fe9a7ee3b78113452ed07653e6 (patch) | |
| tree | fcbc534848c4ec67669d269d4116c7240b0dfc9d /include | |
| parent | d62b7983996d57d3ce3f0e45ea7b0d6b7030005c (diff) | |
[PATCH] allow thread_info to be allocated as part of task_struct
This re-organizes the thread info allocations a bit, so that
architectures like ia64 that want to allocate the thread_info structure
as part of the task structure allocation can do so.
The bulk of the patch is adding the "tsk" information to the thread
info allocator (ignored by all non-ia64 architectures), and switching
the order of the allocators to make this all possible.
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-alpha/thread_info.h | 2 | ||||
| -rw-r--r-- | include/asm-arm/thread_info.h | 2 | ||||
| -rw-r--r-- | include/asm-h8300/thread_info.h | 2 | ||||
| -rw-r--r-- | include/asm-i386/thread_info.h | 2 | ||||
| -rw-r--r-- | include/asm-m68k/thread_info.h | 4 | ||||
| -rw-r--r-- | include/asm-m68knommu/thread_info.h | 2 | ||||
| -rw-r--r-- | include/asm-parisc/thread_info.h | 2 | ||||
| -rw-r--r-- | include/asm-ppc/thread_info.h | 2 | ||||
| -rw-r--r-- | include/asm-ppc64/thread_info.h | 2 | ||||
| -rw-r--r-- | include/asm-s390/thread_info.h | 2 | ||||
| -rw-r--r-- | include/asm-sparc/thread_info.h | 2 | ||||
| -rw-r--r-- | include/asm-sparc64/thread_info.h | 4 | ||||
| -rw-r--r-- | include/asm-um/thread_info.h | 2 | ||||
| -rw-r--r-- | include/asm-v850/thread_info.h | 2 | ||||
| -rw-r--r-- | include/asm-x86_64/thread_info.h | 2 |
15 files changed, 17 insertions, 17 deletions
diff --git a/include/asm-alpha/thread_info.h b/include/asm-alpha/thread_info.h index f798b77816c9..1f19c2add410 100644 --- a/include/asm-alpha/thread_info.h +++ b/include/asm-alpha/thread_info.h @@ -51,7 +51,7 @@ register struct thread_info *__current_thread_info __asm__("$8"); /* Thread information allocation. */ #define THREAD_SIZE (2*PAGE_SIZE) -#define alloc_thread_info() \ +#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) diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h index 8ca864104452..60bec9ec8c79 100644 --- a/include/asm-arm/thread_info.h +++ b/include/asm-arm/thread_info.h @@ -84,7 +84,7 @@ static inline struct thread_info *current_thread_info(void) #define THREAD_SIZE (8192) -extern struct thread_info *alloc_thread_info(void); +extern struct thread_info *alloc_thread_info(struct task_struct *task); extern void free_thread_info(struct thread_info *); #define get_thread_info(ti) get_task_struct((ti)->task) diff --git a/include/asm-h8300/thread_info.h b/include/asm-h8300/thread_info.h index 1c9b5b957021..d14102386280 100644 --- a/include/asm-h8300/thread_info.h +++ b/include/asm-h8300/thread_info.h @@ -65,7 +65,7 @@ static inline struct thread_info *current_thread_info(void) } /* thread information allocation */ -#define alloc_thread_info() ((struct thread_info *) \ +#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) diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h index 0bf7210b8a85..a278e34aa158 100644 --- a/include/asm-i386/thread_info.h +++ b/include/asm-i386/thread_info.h @@ -87,7 +87,7 @@ static inline struct thread_info *current_thread_info(void) /* thread information allocation */ #define THREAD_SIZE (2*PAGE_SIZE) -#define alloc_thread_info() ((struct thread_info *) __get_free_pages(GFP_KERNEL,1)) +#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) diff --git a/include/asm-m68k/thread_info.h b/include/asm-m68k/thread_info.h index 49988674166f..3d35213123b1 100644 --- a/include/asm-m68k/thread_info.h +++ b/include/asm-m68k/thread_info.h @@ -28,10 +28,10 @@ struct thread_info { /* THREAD_SIZE should be 8k, so handle differently for 4k and 8k machines */ #if PAGE_SHIFT == 13 /* 8k machines */ -#define alloc_thread_info() ((struct thread_info *)__get_free_pages(GFP_KERNEL,0)) +#define alloc_thread_info(tsk) ((struct thread_info *)__get_free_pages(GFP_KERNEL,0)) #define free_thread_info(ti) free_pages((unsigned long)(ti),0) #else /* otherwise assume 4k pages */ -#define alloc_thread_info() ((struct thread_info *)__get_free_pages(GFP_KERNEL,1)) +#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) #endif /* PAGE_SHIFT == 13 */ diff --git a/include/asm-m68knommu/thread_info.h b/include/asm-m68knommu/thread_info.h index 6447fc51e07a..f45b12a2cd17 100644 --- a/include/asm-m68knommu/thread_info.h +++ b/include/asm-m68knommu/thread_info.h @@ -65,7 +65,7 @@ static inline struct thread_info *current_thread_info(void) } /* thread information allocation */ -#define alloc_thread_info() ((struct thread_info *) \ +#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) diff --git a/include/asm-parisc/thread_info.h b/include/asm-parisc/thread_info.h index 57fb3ae6b022..c709d0049528 100644 --- a/include/asm-parisc/thread_info.h +++ b/include/asm-parisc/thread_info.h @@ -37,7 +37,7 @@ struct thread_info { #define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) #define THREAD_SHIFT (PAGE_SHIFT + THREAD_ORDER) -#define alloc_thread_info() ((struct thread_info *) \ +#define alloc_thread_info(tsk) ((struct thread_info *) \ __get_free_pages(GFP_KERNEL, THREAD_ORDER)) #define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER) #define get_thread_info(ti) get_task_struct((ti)->task) diff --git a/include/asm-ppc/thread_info.h b/include/asm-ppc/thread_info.h index 5ee1cf139c9e..4d77601389f9 100644 --- a/include/asm-ppc/thread_info.h +++ b/include/asm-ppc/thread_info.h @@ -54,7 +54,7 @@ static inline struct thread_info *current_thread_info(void) } /* thread information allocation */ -#define alloc_thread_info() ((struct thread_info *) \ +#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) diff --git a/include/asm-ppc64/thread_info.h b/include/asm-ppc64/thread_info.h index 5b9083400848..345008a8a14b 100644 --- a/include/asm-ppc64/thread_info.h +++ b/include/asm-ppc64/thread_info.h @@ -52,7 +52,7 @@ struct thread_info { #define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) #define THREAD_SHIFT (PAGE_SHIFT + THREAD_ORDER) -#define alloc_thread_info() ((struct thread_info *) \ +#define alloc_thread_info(tsk) ((struct thread_info *) \ __get_free_pages(GFP_KERNEL, THREAD_ORDER)) #define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER) #define get_thread_info(ti) get_task_struct((ti)->task) diff --git a/include/asm-s390/thread_info.h b/include/asm-s390/thread_info.h index a46e8fd2c7ac..1e9a320899bb 100644 --- a/include/asm-s390/thread_info.h +++ b/include/asm-s390/thread_info.h @@ -68,7 +68,7 @@ static inline struct thread_info *current_thread_info(void) } /* thread information allocation */ -#define alloc_thread_info() ((struct thread_info *) \ +#define alloc_thread_info(tsk) ((struct thread_info *) \ __get_free_pages(GFP_KERNEL,THREAD_ORDER)) #define free_thread_info(ti) free_pages((unsigned long) (ti),THREAD_ORDER) #define get_thread_info(ti) get_task_struct((ti)->task) diff --git a/include/asm-sparc/thread_info.h b/include/asm-sparc/thread_info.h index bc004d4c0e3b..94ef1063ed48 100644 --- a/include/asm-sparc/thread_info.h +++ b/include/asm-sparc/thread_info.h @@ -78,7 +78,7 @@ register struct thread_info *current_thread_info_reg asm("g6"); #endif BTFIXUPDEF_CALL(struct thread_info *, alloc_thread_info, void) -#define alloc_thread_info() BTFIXUP_CALL(alloc_thread_info)() +#define alloc_thread_info(tsk) BTFIXUP_CALL(alloc_thread_info)() BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *) #define free_thread_info(ti) BTFIXUP_CALL(free_thread_info)(ti) diff --git a/include/asm-sparc64/thread_info.h b/include/asm-sparc64/thread_info.h index 298ce3e9027d..88dd8b32345a 100644 --- a/include/asm-sparc64/thread_info.h +++ b/include/asm-sparc64/thread_info.h @@ -142,10 +142,10 @@ register struct thread_info *current_thread_info_reg asm("g6"); /* thread information allocation */ #if PAGE_SHIFT == 13 -#define alloc_thread_info() ((struct thread_info *)__get_free_pages(GFP_KERNEL, 1)) +#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) #else /* PAGE_SHIFT == 13 */ -#define alloc_thread_info() ((struct thread_info *)__get_free_pages(GFP_KERNEL, 0)) +#define alloc_thread_info(tsk)((struct thread_info *)__get_free_pages(GFP_KERNEL, 0)) #define free_thread_info(ti) free_pages((unsigned long)(ti),0) #endif /* PAGE_SHIFT == 13 */ diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h index bd3f4fe40c6b..6a606bf0b684 100644 --- a/include/asm-um/thread_info.h +++ b/include/asm-um/thread_info.h @@ -49,7 +49,7 @@ static inline struct thread_info *current_thread_info(void) /* thread information allocation */ #define THREAD_SIZE (4*PAGE_SIZE) -#define alloc_thread_info() ((struct thread_info *) \ +#define alloc_thread_info(tsk) ((struct thread_info *) \ __get_free_pages(GFP_KERNEL,2)) #define free_thread_info(ti) free_pages((unsigned long) (ti), 2) #define get_thread_info(ti) get_task_struct((ti)->task) diff --git a/include/asm-v850/thread_info.h b/include/asm-v850/thread_info.h index 3e20d565d5bd..b5770136e433 100644 --- a/include/asm-v850/thread_info.h +++ b/include/asm-v850/thread_info.h @@ -54,7 +54,7 @@ struct thread_info { */ /* thread information allocation */ -#define alloc_thread_info() ((struct thread_info *) \ +#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) diff --git a/include/asm-x86_64/thread_info.h b/include/asm-x86_64/thread_info.h index a4bbd2239afa..d9a9989c20d9 100644 --- a/include/asm-x86_64/thread_info.h +++ b/include/asm-x86_64/thread_info.h @@ -73,7 +73,7 @@ static inline struct thread_info *stack_thread_info(void) } /* thread information allocation */ -#define alloc_thread_info() \ +#define alloc_thread_info(tsk) \ ((struct thread_info *) __get_free_pages(GFP_KERNEL,THREAD_ORDER)) #define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER) #define get_thread_info(ti) get_task_struct((ti)->task) |
