public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: trivial: remove unnecessary get_order in free_thread_info
@ 2011-08-20 13:24 Zhao Jin
  2011-08-22 22:49 ` [tip:x86/cleanups] x86, mm, trivial: Rmove " tip-bot for Zhao Jin
  2011-08-23 21:01 ` [tip:x86/cleanups] x86, mm, trivial: Remove unnecessary get_order() in free_thread_info() tip-bot for Zhao Jin
  0 siblings, 2 replies; 3+ messages in thread
From: Zhao Jin @ 2011-08-20 13:24 UTC (permalink / raw)
  To: tglx, mingo, hpa, x86, trivial; +Cc: linux-kernel

From: Zhao Jin <cronozhj@gmail.com>

Because THREAD_SIZE is defined as PAGE_SIZE << THREAD_ORDER on x86, the 
call of get_order(THREAD_SIZE) can be replaced with THREAD_ORDER.

Signed-off-by: Zhao Jin <cronozhj@gmail.com>
---
  arch/x86/kernel/process.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index e7e3b01..b9b3b1a 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -49,7 +49,7 @@ void free_thread_xstate(struct task_struct *tsk)
  void free_thread_info(struct thread_info *ti)
  {
      free_thread_xstate(ti->task);
-    free_pages((unsigned long)ti, get_order(THREAD_SIZE));
+    free_pages((unsigned long)ti, THREAD_ORDER);
  }

  void arch_task_cache_init(void)
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-23 21:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-20 13:24 [PATCH] x86: trivial: remove unnecessary get_order in free_thread_info Zhao Jin
2011-08-22 22:49 ` [tip:x86/cleanups] x86, mm, trivial: Rmove " tip-bot for Zhao Jin
2011-08-23 21:01 ` [tip:x86/cleanups] x86, mm, trivial: Remove unnecessary get_order() in free_thread_info() tip-bot for Zhao Jin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox