mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Zhao Jin <cronozhj@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	cronozhj@gmail.com, tglx@linutronix.de, hpa@linux.intel.com,
	mingo@elte.hu
Subject: [tip:x86/cleanups] x86, mm, trivial: Remove unnecessary get_order() in free_thread_info()
Date: Tue, 23 Aug 2011 21:01:20 GMT	[thread overview]
Message-ID: <tip-c812d8f7ad27bd5f1ed1c790eea8527b6f8ff1c7@git.kernel.org> (raw)
In-Reply-To: <4E4FB5A9.700@gmail.com>

Commit-ID:  c812d8f7ad27bd5f1ed1c790eea8527b6f8ff1c7
Gitweb:     http://git.kernel.org/tip/c812d8f7ad27bd5f1ed1c790eea8527b6f8ff1c7
Author:     Zhao Jin <cronozhj@gmail.com>
AuthorDate: Sat, 20 Aug 2011 21:24:57 +0800
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 23 Aug 2011 21:49:35 +0200

x86, mm, trivial: Remove unnecessary get_order() in free_thread_info()

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>
Link: http://lkml.kernel.org/r/4E4FB5A9.700@gmail.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 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)

      parent reply	other threads:[~2011-08-23 21:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-bot for Zhao Jin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-c812d8f7ad27bd5f1ed1c790eea8527b6f8ff1c7@git.kernel.org \
    --to=cronozhj@gmail.com \
    --cc=hpa@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome