* [PATCH -tip] x86/pat: trivial: don't create debugfs for memtype if pat is disabled
@ 2009-11-26 11:53 Xiaotian Feng
2009-11-26 17:27 ` [tip:x86/mm] x86/pat: Trivial: " tip-bot for Xiaotian Feng
0 siblings, 1 reply; 2+ messages in thread
From: Xiaotian Feng @ 2009-11-26 11:53 UTC (permalink / raw)
To: x86
Cc: linux-kernel, Xiaotian Feng, Thomas Gleixner, Ingo Molnar,
H. Peter Anvin, Suresh Siddha, Venkatesh Pallipadi
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: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
---
arch/x86/mm/pat.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index 01fc043..c37fd51 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -1014,8 +1014,9 @@ 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;
}
--
1.6.5.2
^ permalink raw reply [flat|nested] 2+ messages in thread* [tip:x86/mm] x86/pat: Trivial: don't create debugfs for memtype if pat is disabled
2009-11-26 11:53 [PATCH -tip] x86/pat: trivial: don't create debugfs for memtype if pat is disabled Xiaotian Feng
@ 2009-11-26 17:27 ` tip-bot for Xiaotian Feng
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Xiaotian Feng @ 2009-11-26 17:27 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, venkatesh.pallipadi, suresh.b.siddha,
tglx, dfeng, mingo
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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-26 17:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-26 11:53 [PATCH -tip] x86/pat: trivial: don't create debugfs for memtype if pat is disabled Xiaotian Feng
2009-11-26 17:27 ` [tip:x86/mm] x86/pat: Trivial: " tip-bot for Xiaotian Feng
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