aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-parisc
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-07-25 04:45:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-25 13:53:28 -0400
commitb69c49b78457f681ecfb3147bd968434ee6559c1 (patch)
tree9557c950c21cf4336ccc403136ea11384150af31 /include/asm-parisc
parent62ec30d45ecbb85b5991474c8f04192697687495 (diff)
clean up duplicated alloc/free_thread_info
We duplicate alloc/free_thread_info defines on many platforms (the majority uses __get_free_pages/free_pages). This patch defines common defines and removes these duplicated defines. __HAVE_ARCH_THREAD_INFO_ALLOCATOR is introduced for platforms that do something different. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-parisc')
-rw-r--r--include/asm-parisc/thread_info.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/asm-parisc/thread_info.h b/include/asm-parisc/thread_info.h
index 2d9c7500867b..9f812741c355 100644
--- a/include/asm-parisc/thread_info.h
+++ b/include/asm-parisc/thread_info.h
@@ -34,15 +34,11 @@ struct thread_info {
34 34
35/* thread information allocation */ 35/* thread information allocation */
36 36
37#define THREAD_ORDER 2 37#define THREAD_SIZE_ORDER 2
38/* Be sure to hunt all references to this down when you change the size of 38/* Be sure to hunt all references to this down when you change the size of
39 * the kernel stack */ 39 * the kernel stack */
40#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) 40#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
41#define THREAD_SHIFT (PAGE_SHIFT + THREAD_ORDER) 41#define THREAD_SHIFT (PAGE_SHIFT + THREAD_SIZE_ORDER)
42
43#define alloc_thread_info(tsk) ((struct thread_info *) \
44 __get_free_pages(GFP_KERNEL, THREAD_ORDER))
45#define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER)
46 42
47/* how to get the thread information struct from C */ 43/* how to get the thread information struct from C */
48#define current_thread_info() ((struct thread_info *)mfctl(30)) 44#define current_thread_info() ((struct thread_info *)mfctl(30))