From: tip-bot for Xiaotian Feng <dfeng@redhat.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
venkatesh.pallipadi@intel.com, suresh.b.siddha@intel.com,
tglx@linutronix.de, dfeng@redhat.com, mingo@elte.hu
Subject: [tip:x86/mm] x86/pat: Trivial: don't create debugfs for memtype if pat is disabled
Date: Thu, 26 Nov 2009 17:27:38 GMT [thread overview]
Message-ID: <tip-dd4377b02d9f028006beed1b7b1695ee5d1498b6@git.kernel.org> (raw)
In-Reply-To: <1259236428-16329-1-git-send-email-dfeng@redhat.com>
Commit-ID: dd4377b02d9f028006beed1b7b1695ee5d1498b6
Gitweb: http://git.kernel.org/tip/dd4377b02d9f028006beed1b7b1695ee5d1498b6
Author: Xiaotian Feng <dfeng@redhat.com>
AuthorDate: Thu, 26 Nov 2009 19:53:48 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 26 Nov 2009 15:05:03 +0100
x86/pat: Trivial: don't create debugfs for memtype if pat is disabled
If pat is disabled (boot with nopat), there's no need to create
debugfs for it, it's empty all the time.
Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
LKML-Reference: <1259236428-16329-1-git-send-email-dfeng@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/mm/pat.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index ef71251..a81b7e7 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -1019,8 +1019,10 @@ static const struct file_operations memtype_fops = {
static int __init pat_memtype_list_init(void)
{
- debugfs_create_file("pat_memtype_list", S_IRUSR, arch_debugfs_dir,
- NULL, &memtype_fops);
+ if (pat_enabled) {
+ debugfs_create_file("pat_memtype_list", S_IRUSR,
+ arch_debugfs_dir, NULL, &memtype_fops);
+ }
return 0;
}
prev parent reply other threads:[~2009-11-26 17:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-26 11:53 [PATCH -tip] x86/pat: trivial: " Xiaotian Feng
2009-11-26 17:27 ` tip-bot for Xiaotian Feng [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-dd4377b02d9f028006beed1b7b1695ee5d1498b6@git.kernel.org \
--to=dfeng@redhat.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=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=venkatesh.pallipadi@intel.com \
/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