public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* x86:  compile pat debugfs interface only if CONFIG_X86_PAT is set
@ 2008-08-06 13:30 Andreas Herrmann
  2008-08-06 14:23 ` [PATCH] " Andreas Herrmann
  2008-08-11 19:31 ` Ingo Molnar
  0 siblings, 2 replies; 3+ messages in thread
From: Andreas Herrmann @ 2008-08-06 13:30 UTC (permalink / raw)
  To: H. Peter Anvin, Ingo Molnar, Thomas Gleixner; +Cc: linux-kernel


Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
---
 arch/x86/mm/pat.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Recently I've run a kernel w/o PAT support and wondered why there was
a file "x86/pat_memtype_list" in debugfs. Of course it's empty if PAT
is disabled ... so just get rid of this interface if PAT is disabled.

Please apply. (patch against v2.6.27-rc2)


Andreas

diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index 2fe3091..647b1c4 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -492,7 +492,7 @@ void unmap_devmem(unsigned long pfn, unsigned long size, pgprot_t vma_prot)
 	free_memtype(addr, addr + size);
 }
 
-#if defined(CONFIG_DEBUG_FS)
+#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_X86_PAT)
 
 /* get Nth element of the linked list */
 static struct memtype *memtype_get_idx(loff_t pos)
@@ -576,4 +576,4 @@ static int __init pat_memtype_list_init(void)
 
 late_initcall(pat_memtype_list_init);
 
-#endif /* CONFIG_DEBUG_FS */
+#endif /* CONFIG_DEBUG_FS && CONFIG_X86_PAT */
-- 
1.5.6.4




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] x86: compile pat debugfs interface only if CONFIG_X86_PAT is set
  2008-08-06 13:30 x86: compile pat debugfs interface only if CONFIG_X86_PAT is set Andreas Herrmann
@ 2008-08-06 14:23 ` Andreas Herrmann
  2008-08-11 19:31 ` Ingo Molnar
  1 sibling, 0 replies; 3+ messages in thread
From: Andreas Herrmann @ 2008-08-06 14:23 UTC (permalink / raw)
  To: H. Peter Anvin, Ingo Molnar, Thomas Gleixner; +Cc: linux-kernel


Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
---
 arch/x86/mm/pat.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Re-submission of the patch -- this time with a proper subject line ...

Regards,
Andreas

diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index 2fe3091..647b1c4 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -492,7 +492,7 @@ void unmap_devmem(unsigned long pfn, unsigned long size, pgprot_t vma_prot)
 	free_memtype(addr, addr + size);
 }
 
-#if defined(CONFIG_DEBUG_FS)
+#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_X86_PAT)
 
 /* get Nth element of the linked list */
 static struct memtype *memtype_get_idx(loff_t pos)
@@ -576,4 +576,4 @@ static int __init pat_memtype_list_init(void)
 
 late_initcall(pat_memtype_list_init);
 
-#endif /* CONFIG_DEBUG_FS */
+#endif /* CONFIG_DEBUG_FS && CONFIG_X86_PAT */
-- 
1.5.6.4




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: x86:  compile pat debugfs interface only if CONFIG_X86_PAT is set
  2008-08-06 13:30 x86: compile pat debugfs interface only if CONFIG_X86_PAT is set Andreas Herrmann
  2008-08-06 14:23 ` [PATCH] " Andreas Herrmann
@ 2008-08-11 19:31 ` Ingo Molnar
  1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2008-08-11 19:31 UTC (permalink / raw)
  To: Andreas Herrmann; +Cc: H. Peter Anvin, Thomas Gleixner, linux-kernel


* Andreas Herrmann <andreas.herrmann3@amd.com> wrote:

> 
> Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
> ---
>  arch/x86/mm/pat.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> Recently I've run a kernel w/o PAT support and wondered why there was
> a file "x86/pat_memtype_list" in debugfs. Of course it's empty if PAT
> is disabled ... so just get rid of this interface if PAT is disabled.

applied to tip/x86/pat - thanks Andreas.

	Ingo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-11 19:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-06 13:30 x86: compile pat debugfs interface only if CONFIG_X86_PAT is set Andreas Herrmann
2008-08-06 14:23 ` [PATCH] " Andreas Herrmann
2008-08-11 19:31 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox