Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[tip:x86/mm] x86/pat: Trivial: don't create debugfs for memtype if pat is disabled

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


dfeng at redhat

Nov 26, 2009, 9:27 AM

Post #1 of 1 (107 views)
Permalink
[tip:x86/mm] x86/pat: Trivial: don't create debugfs for memtype if pat is disabled

Commit-ID: dd4377b02d9f028006beed1b7b1695ee5d1498b6
Gitweb: http://git.kernel.org/tip/dd4377b02d9f028006beed1b7b1695ee5d1498b6
Author: Xiaotian Feng <dfeng [at] redhat>
AuthorDate: Thu, 26 Nov 2009 19:53:48 +0800
Committer: Ingo Molnar <mingo [at] elte>
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 [at] redhat>
Cc: Suresh Siddha <suresh.b.siddha [at] intel>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi [at] intel>
Cc: H. Peter Anvin <hpa [at] zytor>
LKML-Reference: <1259236428-16329-1-git-send-email-dfeng [at] redhat>
Signed-off-by: Ingo Molnar <mingo [at] elte>
---
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;
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.