]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/proc/proc_misc.c
maps4: make page monitoring /proc file optional
[linux-2.6-omap-h63xx.git] / fs / proc / proc_misc.c
index fd751ea37fce048becd7b057cbc3404450260d3e..51288db37a0cf2e25ed2037b3e5161f6bc52a49e 100644 (file)
@@ -676,6 +676,7 @@ static const struct file_operations proc_sysrq_trigger_operations = {
 };
 #endif
 
+#ifdef CONFIG_PROC_PAGE_MONITOR
 #define KPMSIZE sizeof(u64)
 #define KPMMASK (KPMSIZE - 1)
 /* /proc/kpagecount - an array exposing page counts
@@ -804,6 +805,7 @@ static struct file_operations proc_kpageflags_operations = {
        .llseek = mem_lseek,
        .read = kpageflags_read,
 };
+#endif /* CONFIG_PROC_PAGE_MONITOR */
 
 struct proc_dir_entry *proc_root_kcore;
 
@@ -885,8 +887,10 @@ void __init proc_misc_init(void)
                                (size_t)high_memory - PAGE_OFFSET + PAGE_SIZE;
        }
 #endif
+#ifdef CONFIG_PROC_PAGE_MONITOR
        create_seq_entry("kpagecount", S_IRUSR, &proc_kpagecount_operations);
        create_seq_entry("kpageflags", S_IRUSR, &proc_kpageflags_operations);
+#endif
 #ifdef CONFIG_PROC_VMCORE
        proc_vmcore = create_proc_entry("vmcore", S_IRUSR, NULL);
        if (proc_vmcore)