Skip to content

Commit

Permalink
x86: compile pat debugfs interface only if CONFIG_X86_PAT is set
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Andreas Herrmann authored and Ingo Molnar committed Aug 11, 2008
1 parent 10fec20 commit 012f09e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/mm/pat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 */

0 comments on commit 012f09e

Please sign in to comment.