aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiaotian Feng <dfeng@redhat.com>2009-11-26 06:53:48 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-26 09:05:03 -0500
commitdd4377b02d9f028006beed1b7b1695ee5d1498b6 (patch)
tree3036c47915a06eeca6d6b7c75e859bb812fa0690
parent5bf65b9ba67226eae9ffc398a0369fc4da35c259 (diff)
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>
-rw-r--r--arch/x86/mm/pat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index ef712518b5b4..a81b7e73275d 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -1019,8 +1019,10 @@ static const struct file_operations memtype_fops = {
1019 1019
1020static int __init pat_memtype_list_init(void) 1020static int __init pat_memtype_list_init(void)
1021{ 1021{
1022 debugfs_create_file("pat_memtype_list", S_IRUSR, arch_debugfs_dir, 1022 if (pat_enabled) {
1023 NULL, &memtype_fops); 1023 debugfs_create_file("pat_memtype_list", S_IRUSR,
1024 arch_debugfs_dir, NULL, &memtype_fops);
1025 }
1024 return 0; 1026 return 0;
1025} 1027}
1026 1028