提交 012f09e7 编写于 作者: A Andreas Herrmann 提交者: Ingo Molnar

x86: compile pat debugfs interface only if CONFIG_X86_PAT is set

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: NAndreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 10fec20e
......@@ -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 */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册