2 * linux/fs/proc/proc_misc.c
4 * linux/fs/proc/array.c
5 * Copyright (C) 1992 by Linus Torvalds
6 * based on ideas by Darren Senn
8 * This used to be the part of array.c. See the rest of history and credits
9 * there. I took this into a separate file and switched the thing to generic
10 * proc_file_inode_operations, leaving in array.c only per-process stuff.
11 * Inumbers allocation made dynamic (via create_proc_entry()). AV, May 1999.
14 * Fulton Green : Encapsulated position metric calculations.
15 * <kernel@FultonGreen.com>
18 #include <linux/types.h>
19 #include <linux/errno.h>
20 #include <linux/time.h>
21 #include <linux/kernel.h>
22 #include <linux/kernel_stat.h>
24 #include <linux/tty.h>
25 #include <linux/string.h>
26 #include <linux/mman.h>
27 #include <linux/proc_fs.h>
28 #include <linux/ioport.h>
30 #include <linux/mmzone.h>
31 #include <linux/pagemap.h>
32 #include <linux/interrupt.h>
33 #include <linux/swap.h>
34 #include <linux/slab.h>
35 #include <linux/genhd.h>
36 #include <linux/smp.h>
37 #include <linux/signal.h>
38 #include <linux/module.h>
39 #include <linux/init.h>
40 #include <linux/seq_file.h>
41 #include <linux/times.h>
42 #include <linux/profile.h>
43 #include <linux/utsname.h>
44 #include <linux/blkdev.h>
45 #include <linux/hugetlb.h>
46 #include <linux/jiffies.h>
47 #include <linux/sysrq.h>
48 #include <linux/vmalloc.h>
49 #include <linux/crash_dump.h>
50 #include <linux/pid_namespace.h>
51 #include <linux/bootmem.h>
52 #include <asm/uaccess.h>
53 #include <asm/pgtable.h>
56 #include <asm/div64.h>
59 #define LOAD_INT(x) ((x) >> FSHIFT)
60 #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
62 * Warning: stuff below (imported functions) assumes that its output will fit
63 * into one page. For some of those functions it may be wrong. Moreover, we
64 * have a way to deal with that gracefully. Right now I used straightforward
65 * wrappers, but this needs further analysis wrt potential overflows.
67 extern int get_hardware_list(char *);
68 extern int get_stram_list(char *);
69 extern int get_exec_domain_list(char *);
70 extern int get_dma_list(char *);
72 static int proc_calc_metrics(char *page, char **start, off_t off,
73 int count, int *eof, int len)
75 if (len <= off+count) *eof = 1;
78 if (len>count) len = count;
83 static int loadavg_read_proc(char *page, char **start, off_t off,
84 int count, int *eof, void *data)
91 seq = read_seqbegin(&xtime_lock);
92 a = avenrun[0] + (FIXED_1/200);
93 b = avenrun[1] + (FIXED_1/200);
94 c = avenrun[2] + (FIXED_1/200);
95 } while (read_seqretry(&xtime_lock, seq));
97 len = sprintf(page,"%d.%02d %d.%02d %d.%02d %ld/%d %d\n",
98 LOAD_INT(a), LOAD_FRAC(a),
99 LOAD_INT(b), LOAD_FRAC(b),
100 LOAD_INT(c), LOAD_FRAC(c),
101 nr_running(), nr_threads,
102 task_active_pid_ns(current)->last_pid);
103 return proc_calc_metrics(page, start, off, count, eof, len);
106 static int uptime_read_proc(char *page, char **start, off_t off,
107 int count, int *eof, void *data)
109 struct timespec uptime;
110 struct timespec idle;
112 cputime_t idletime = cputime_add(init_task.utime, init_task.stime);
114 do_posix_clock_monotonic_gettime(&uptime);
115 monotonic_to_bootbased(&uptime);
116 cputime_to_timespec(idletime, &idle);
117 len = sprintf(page,"%lu.%02lu %lu.%02lu\n",
118 (unsigned long) uptime.tv_sec,
119 (uptime.tv_nsec / (NSEC_PER_SEC / 100)),
120 (unsigned long) idle.tv_sec,
121 (idle.tv_nsec / (NSEC_PER_SEC / 100)));
123 return proc_calc_metrics(page, start, off, count, eof, len);
126 static int meminfo_read_proc(char *page, char **start, off_t off,
127 int count, int *eof, void *data)
131 unsigned long committed;
132 unsigned long allowed;
133 struct vmalloc_info vmi;
137 * display in kilobytes.
139 #define K(x) ((x) << (PAGE_SHIFT - 10))
142 committed = atomic_read(&vm_committed_space);
143 allowed = ((totalram_pages - hugetlb_total_pages())
144 * sysctl_overcommit_ratio / 100) + total_swap_pages;
146 cached = global_page_state(NR_FILE_PAGES) -
147 total_swapcache_pages - i.bufferram;
151 get_vmalloc_info(&vmi);
154 * Tagged format, for easy grepping and expansion.
157 "MemTotal: %8lu kB\n"
161 "SwapCached: %8lu kB\n"
163 "Inactive: %8lu kB\n"
164 #ifdef CONFIG_HIGHMEM
165 "HighTotal: %8lu kB\n"
166 "HighFree: %8lu kB\n"
167 "LowTotal: %8lu kB\n"
170 "SwapTotal: %8lu kB\n"
171 "SwapFree: %8lu kB\n"
173 "Writeback: %8lu kB\n"
174 "AnonPages: %8lu kB\n"
177 "SReclaimable: %8lu kB\n"
178 "SUnreclaim: %8lu kB\n"
179 "PageTables: %8lu kB\n"
180 "NFS_Unstable: %8lu kB\n"
182 "WritebackTmp: %8lu kB\n"
183 "CommitLimit: %8lu kB\n"
184 "Committed_AS: %8lu kB\n"
185 "VmallocTotal: %8lu kB\n"
186 "VmallocUsed: %8lu kB\n"
187 "VmallocChunk: %8lu kB\n",
192 K(total_swapcache_pages),
193 K(global_page_state(NR_ACTIVE)),
194 K(global_page_state(NR_INACTIVE)),
195 #ifdef CONFIG_HIGHMEM
198 K(i.totalram-i.totalhigh),
199 K(i.freeram-i.freehigh),
203 K(global_page_state(NR_FILE_DIRTY)),
204 K(global_page_state(NR_WRITEBACK)),
205 K(global_page_state(NR_ANON_PAGES)),
206 K(global_page_state(NR_FILE_MAPPED)),
207 K(global_page_state(NR_SLAB_RECLAIMABLE) +
208 global_page_state(NR_SLAB_UNRECLAIMABLE)),
209 K(global_page_state(NR_SLAB_RECLAIMABLE)),
210 K(global_page_state(NR_SLAB_UNRECLAIMABLE)),
211 K(global_page_state(NR_PAGETABLE)),
212 K(global_page_state(NR_UNSTABLE_NFS)),
213 K(global_page_state(NR_BOUNCE)),
214 K(global_page_state(NR_WRITEBACK_TEMP)),
217 (unsigned long)VMALLOC_TOTAL >> 10,
219 vmi.largest_chunk >> 10
222 len += hugetlb_report_meminfo(page + len);
224 return proc_calc_metrics(page, start, off, count, eof, len);
228 extern const struct seq_operations fragmentation_op;
229 static int fragmentation_open(struct inode *inode, struct file *file)
232 return seq_open(file, &fragmentation_op);
235 static const struct file_operations fragmentation_file_operations = {
236 .open = fragmentation_open,
239 .release = seq_release,
242 extern const struct seq_operations pagetypeinfo_op;
243 static int pagetypeinfo_open(struct inode *inode, struct file *file)
245 return seq_open(file, &pagetypeinfo_op);
248 static const struct file_operations pagetypeinfo_file_ops = {
249 .open = pagetypeinfo_open,
252 .release = seq_release,
255 extern const struct seq_operations zoneinfo_op;
256 static int zoneinfo_open(struct inode *inode, struct file *file)
258 return seq_open(file, &zoneinfo_op);
261 static const struct file_operations proc_zoneinfo_file_operations = {
262 .open = zoneinfo_open,
265 .release = seq_release,
268 static int version_read_proc(char *page, char **start, off_t off,
269 int count, int *eof, void *data)
273 len = snprintf(page, PAGE_SIZE, linux_proc_banner,
277 return proc_calc_metrics(page, start, off, count, eof, len);
280 extern const struct seq_operations cpuinfo_op;
281 static int cpuinfo_open(struct inode *inode, struct file *file)
283 return seq_open(file, &cpuinfo_op);
286 static const struct file_operations proc_cpuinfo_operations = {
287 .open = cpuinfo_open,
290 .release = seq_release,
293 static int devinfo_show(struct seq_file *f, void *v)
295 int i = *(loff_t *) v;
297 if (i < CHRDEV_MAJOR_HASH_SIZE) {
299 seq_printf(f, "Character devices:\n");
304 i -= CHRDEV_MAJOR_HASH_SIZE;
306 seq_printf(f, "\nBlock devices:\n");
313 static void *devinfo_start(struct seq_file *f, loff_t *pos)
315 if (*pos < (BLKDEV_MAJOR_HASH_SIZE + CHRDEV_MAJOR_HASH_SIZE))
320 static void *devinfo_next(struct seq_file *f, void *v, loff_t *pos)
323 if (*pos >= (BLKDEV_MAJOR_HASH_SIZE + CHRDEV_MAJOR_HASH_SIZE))
328 static void devinfo_stop(struct seq_file *f, void *v)
333 static const struct seq_operations devinfo_ops = {
334 .start = devinfo_start,
335 .next = devinfo_next,
336 .stop = devinfo_stop,
340 static int devinfo_open(struct inode *inode, struct file *filp)
342 return seq_open(filp, &devinfo_ops);
345 static const struct file_operations proc_devinfo_operations = {
346 .open = devinfo_open,
349 .release = seq_release,
352 extern const struct seq_operations vmstat_op;
353 static int vmstat_open(struct inode *inode, struct file *file)
355 return seq_open(file, &vmstat_op);
357 static const struct file_operations proc_vmstat_file_operations = {
361 .release = seq_release,
364 #ifdef CONFIG_PROC_HARDWARE
365 static int hardware_read_proc(char *page, char **start, off_t off,
366 int count, int *eof, void *data)
368 int len = get_hardware_list(page);
369 return proc_calc_metrics(page, start, off, count, eof, len);
373 #ifdef CONFIG_STRAM_PROC
374 static int stram_read_proc(char *page, char **start, off_t off,
375 int count, int *eof, void *data)
377 int len = get_stram_list(page);
378 return proc_calc_metrics(page, start, off, count, eof, len);
383 static int partitions_open(struct inode *inode, struct file *file)
385 return seq_open(file, &partitions_op);
387 static const struct file_operations proc_partitions_operations = {
388 .open = partitions_open,
391 .release = seq_release,
394 static int diskstats_open(struct inode *inode, struct file *file)
396 return seq_open(file, &diskstats_op);
398 static const struct file_operations proc_diskstats_operations = {
399 .open = diskstats_open,
402 .release = seq_release,
406 #ifdef CONFIG_MODULES
407 extern const struct seq_operations modules_op;
408 static int modules_open(struct inode *inode, struct file *file)
410 return seq_open(file, &modules_op);
412 static const struct file_operations proc_modules_operations = {
413 .open = modules_open,
416 .release = seq_release,
420 #ifdef CONFIG_SLABINFO
421 static int slabinfo_open(struct inode *inode, struct file *file)
423 return seq_open(file, &slabinfo_op);
425 static const struct file_operations proc_slabinfo_operations = {
426 .open = slabinfo_open,
428 .write = slabinfo_write,
430 .release = seq_release,
433 #ifdef CONFIG_DEBUG_SLAB_LEAK
434 extern const struct seq_operations slabstats_op;
435 static int slabstats_open(struct inode *inode, struct file *file)
437 unsigned long *n = kzalloc(PAGE_SIZE, GFP_KERNEL);
440 ret = seq_open(file, &slabstats_op);
442 struct seq_file *m = file->private_data;
443 *n = PAGE_SIZE / (2 * sizeof(unsigned long));
452 static const struct file_operations proc_slabstats_operations = {
453 .open = slabstats_open,
456 .release = seq_release_private,
462 static int vmalloc_open(struct inode *inode, struct file *file)
464 return seq_open(file, &vmalloc_op);
467 static const struct file_operations proc_vmalloc_operations = {
468 .open = vmalloc_open,
471 .release = seq_release,
475 #ifndef arch_irq_stat_cpu
476 #define arch_irq_stat_cpu(cpu) 0
478 #ifndef arch_irq_stat
479 #define arch_irq_stat() 0
482 static int show_stat(struct seq_file *p, void *v)
486 cputime64_t user, nice, system, idle, iowait, irq, softirq, steal;
489 struct timespec boottime;
490 unsigned int *per_irq_sum;
492 per_irq_sum = kzalloc(sizeof(unsigned int)*NR_IRQS, GFP_KERNEL);
496 user = nice = system = idle = iowait =
497 irq = softirq = steal = cputime64_zero;
498 guest = cputime64_zero;
499 getboottime(&boottime);
500 jif = boottime.tv_sec;
502 for_each_possible_cpu(i) {
505 user = cputime64_add(user, kstat_cpu(i).cpustat.user);
506 nice = cputime64_add(nice, kstat_cpu(i).cpustat.nice);
507 system = cputime64_add(system, kstat_cpu(i).cpustat.system);
508 idle = cputime64_add(idle, kstat_cpu(i).cpustat.idle);
509 iowait = cputime64_add(iowait, kstat_cpu(i).cpustat.iowait);
510 irq = cputime64_add(irq, kstat_cpu(i).cpustat.irq);
511 softirq = cputime64_add(softirq, kstat_cpu(i).cpustat.softirq);
512 steal = cputime64_add(steal, kstat_cpu(i).cpustat.steal);
513 guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest);
514 for (j = 0; j < NR_IRQS; j++) {
515 unsigned int temp = kstat_cpu(i).irqs[j];
517 per_irq_sum[j] += temp;
519 sum += arch_irq_stat_cpu(i);
521 sum += arch_irq_stat();
523 seq_printf(p, "cpu %llu %llu %llu %llu %llu %llu %llu %llu %llu\n",
524 (unsigned long long)cputime64_to_clock_t(user),
525 (unsigned long long)cputime64_to_clock_t(nice),
526 (unsigned long long)cputime64_to_clock_t(system),
527 (unsigned long long)cputime64_to_clock_t(idle),
528 (unsigned long long)cputime64_to_clock_t(iowait),
529 (unsigned long long)cputime64_to_clock_t(irq),
530 (unsigned long long)cputime64_to_clock_t(softirq),
531 (unsigned long long)cputime64_to_clock_t(steal),
532 (unsigned long long)cputime64_to_clock_t(guest));
533 for_each_online_cpu(i) {
535 /* Copy values here to work around gcc-2.95.3, gcc-2.96 */
536 user = kstat_cpu(i).cpustat.user;
537 nice = kstat_cpu(i).cpustat.nice;
538 system = kstat_cpu(i).cpustat.system;
539 idle = kstat_cpu(i).cpustat.idle;
540 iowait = kstat_cpu(i).cpustat.iowait;
541 irq = kstat_cpu(i).cpustat.irq;
542 softirq = kstat_cpu(i).cpustat.softirq;
543 steal = kstat_cpu(i).cpustat.steal;
544 guest = kstat_cpu(i).cpustat.guest;
546 "cpu%d %llu %llu %llu %llu %llu %llu %llu %llu %llu\n",
548 (unsigned long long)cputime64_to_clock_t(user),
549 (unsigned long long)cputime64_to_clock_t(nice),
550 (unsigned long long)cputime64_to_clock_t(system),
551 (unsigned long long)cputime64_to_clock_t(idle),
552 (unsigned long long)cputime64_to_clock_t(iowait),
553 (unsigned long long)cputime64_to_clock_t(irq),
554 (unsigned long long)cputime64_to_clock_t(softirq),
555 (unsigned long long)cputime64_to_clock_t(steal),
556 (unsigned long long)cputime64_to_clock_t(guest));
558 seq_printf(p, "intr %llu", (unsigned long long)sum);
560 for (i = 0; i < NR_IRQS; i++)
561 seq_printf(p, " %u", per_irq_sum[i]);
567 "procs_running %lu\n"
568 "procs_blocked %lu\n",
569 nr_context_switches(),
579 static int stat_open(struct inode *inode, struct file *file)
581 unsigned size = 4096 * (1 + num_possible_cpus() / 32);
586 /* don't ask for more than the kmalloc() max size, currently 128 KB */
587 if (size > 128 * 1024)
589 buf = kmalloc(size, GFP_KERNEL);
593 res = single_open(file, show_stat, NULL);
595 m = file->private_data;
602 static const struct file_operations proc_stat_operations = {
606 .release = single_release,
612 static void *int_seq_start(struct seq_file *f, loff_t *pos)
614 return (*pos <= NR_IRQS) ? pos : NULL;
617 static void *int_seq_next(struct seq_file *f, void *v, loff_t *pos)
625 static void int_seq_stop(struct seq_file *f, void *v)
631 static const struct seq_operations int_seq_ops = {
632 .start = int_seq_start,
633 .next = int_seq_next,
634 .stop = int_seq_stop,
635 .show = show_interrupts
638 static int interrupts_open(struct inode *inode, struct file *filp)
640 return seq_open(filp, &int_seq_ops);
643 static const struct file_operations proc_interrupts_operations = {
644 .open = interrupts_open,
647 .release = seq_release,
650 static int filesystems_read_proc(char *page, char **start, off_t off,
651 int count, int *eof, void *data)
653 int len = get_filesystem_list(page);
654 return proc_calc_metrics(page, start, off, count, eof, len);
657 static int cmdline_read_proc(char *page, char **start, off_t off,
658 int count, int *eof, void *data)
662 len = sprintf(page, "%s\n", saved_command_line);
663 return proc_calc_metrics(page, start, off, count, eof, len);
666 static int locks_open(struct inode *inode, struct file *filp)
668 return seq_open(filp, &locks_seq_operations);
671 static const struct file_operations proc_locks_operations = {
675 .release = seq_release,
678 static int execdomains_read_proc(char *page, char **start, off_t off,
679 int count, int *eof, void *data)
681 int len = get_exec_domain_list(page);
682 return proc_calc_metrics(page, start, off, count, eof, len);
685 #ifdef CONFIG_MAGIC_SYSRQ
687 * writing 'C' to /proc/sysrq-trigger is like sysrq-C
689 static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf,
690 size_t count, loff_t *ppos)
695 if (get_user(c, buf))
697 __handle_sysrq(c, NULL, 0);
702 static const struct file_operations proc_sysrq_trigger_operations = {
703 .write = write_sysrq_trigger,
707 #ifdef CONFIG_PROC_PAGE_MONITOR
708 #define KPMSIZE sizeof(u64)
709 #define KPMMASK (KPMSIZE - 1)
710 /* /proc/kpagecount - an array exposing page counts
712 * Each entry is a u64 representing the corresponding
713 * physical page count.
715 static ssize_t kpagecount_read(struct file *file, char __user *buf,
716 size_t count, loff_t *ppos)
718 u64 __user *out = (u64 __user *)buf;
720 unsigned long src = *ppos;
726 count = min_t(size_t, count, (max_pfn * KPMSIZE) - src);
727 if (src & KPMMASK || count & KPMMASK)
733 ppage = pfn_to_page(pfn);
738 pcount = atomic_read(&ppage->_count);
740 if (put_user(pcount, out++)) {
748 *ppos += (char __user *)out - buf;
750 ret = (char __user *)out - buf;
754 static struct file_operations proc_kpagecount_operations = {
756 .read = kpagecount_read,
759 /* /proc/kpageflags - an array exposing page flags
761 * Each entry is a u64 representing the corresponding
762 * physical page flags.
765 /* These macros are used to decouple internal flags from exported ones */
769 #define KPF_REFERENCED 2
770 #define KPF_UPTODATE 3
775 #define KPF_WRITEBACK 8
776 #define KPF_RECLAIM 9
779 #define kpf_copy_bit(flags, srcpos, dstpos) (((flags >> srcpos) & 1) << dstpos)
781 static ssize_t kpageflags_read(struct file *file, char __user *buf,
782 size_t count, loff_t *ppos)
784 u64 __user *out = (u64 __user *)buf;
786 unsigned long src = *ppos;
792 count = min_t(unsigned long, count, (max_pfn * KPMSIZE) - src);
793 if (src & KPMMASK || count & KPMMASK)
799 ppage = pfn_to_page(pfn);
804 kflags = ppage->flags;
806 uflags = kpf_copy_bit(KPF_LOCKED, PG_locked, kflags) |
807 kpf_copy_bit(kflags, KPF_ERROR, PG_error) |
808 kpf_copy_bit(kflags, KPF_REFERENCED, PG_referenced) |
809 kpf_copy_bit(kflags, KPF_UPTODATE, PG_uptodate) |
810 kpf_copy_bit(kflags, KPF_DIRTY, PG_dirty) |
811 kpf_copy_bit(kflags, KPF_LRU, PG_lru) |
812 kpf_copy_bit(kflags, KPF_ACTIVE, PG_active) |
813 kpf_copy_bit(kflags, KPF_SLAB, PG_slab) |
814 kpf_copy_bit(kflags, KPF_WRITEBACK, PG_writeback) |
815 kpf_copy_bit(kflags, KPF_RECLAIM, PG_reclaim) |
816 kpf_copy_bit(kflags, KPF_BUDDY, PG_buddy);
818 if (put_user(uflags, out++)) {
826 *ppos += (char __user *)out - buf;
828 ret = (char __user *)out - buf;
832 static struct file_operations proc_kpageflags_operations = {
834 .read = kpageflags_read,
836 #endif /* CONFIG_PROC_PAGE_MONITOR */
838 struct proc_dir_entry *proc_root_kcore;
840 void __init proc_misc_init(void)
844 int (*read_proc)(char*,char**,off_t,int,int*,void*);
845 } *p, simple_ones[] = {
846 {"loadavg", loadavg_read_proc},
847 {"uptime", uptime_read_proc},
848 {"meminfo", meminfo_read_proc},
849 {"version", version_read_proc},
850 #ifdef CONFIG_PROC_HARDWARE
851 {"hardware", hardware_read_proc},
853 #ifdef CONFIG_STRAM_PROC
854 {"stram", stram_read_proc},
856 {"filesystems", filesystems_read_proc},
857 {"cmdline", cmdline_read_proc},
858 {"execdomains", execdomains_read_proc},
861 for (p = simple_ones; p->name; p++)
862 create_proc_read_entry(p->name, 0, NULL, p->read_proc, NULL);
864 proc_symlink("mounts", NULL, "self/mounts");
866 /* And now for trickier ones */
868 proc_create("kmsg", S_IRUSR, NULL, &proc_kmsg_operations);
870 proc_create("locks", 0, NULL, &proc_locks_operations);
871 proc_create("devices", 0, NULL, &proc_devinfo_operations);
872 proc_create("cpuinfo", 0, NULL, &proc_cpuinfo_operations);
874 proc_create("partitions", 0, NULL, &proc_partitions_operations);
876 proc_create("stat", 0, NULL, &proc_stat_operations);
877 proc_create("interrupts", 0, NULL, &proc_interrupts_operations);
878 #ifdef CONFIG_SLABINFO
879 proc_create("slabinfo",S_IWUSR|S_IRUGO,NULL,&proc_slabinfo_operations);
880 #ifdef CONFIG_DEBUG_SLAB_LEAK
881 proc_create("slab_allocators", 0, NULL, &proc_slabstats_operations);
885 proc_create("vmallocinfo", S_IRUSR, NULL, &proc_vmalloc_operations);
887 proc_create("buddyinfo", S_IRUGO, NULL, &fragmentation_file_operations);
888 proc_create("pagetypeinfo", S_IRUGO, NULL, &pagetypeinfo_file_ops);
889 proc_create("vmstat", S_IRUGO, NULL, &proc_vmstat_file_operations);
890 proc_create("zoneinfo", S_IRUGO, NULL, &proc_zoneinfo_file_operations);
892 proc_create("diskstats", 0, NULL, &proc_diskstats_operations);
894 #ifdef CONFIG_MODULES
895 proc_create("modules", 0, NULL, &proc_modules_operations);
897 #ifdef CONFIG_SCHEDSTATS
898 proc_create("schedstat", 0, NULL, &proc_schedstat_operations);
900 #ifdef CONFIG_PROC_KCORE
901 proc_root_kcore = proc_create("kcore", S_IRUSR, NULL, &proc_kcore_operations);
903 proc_root_kcore->size =
904 (size_t)high_memory - PAGE_OFFSET + PAGE_SIZE;
906 #ifdef CONFIG_PROC_PAGE_MONITOR
907 proc_create("kpagecount", S_IRUSR, NULL, &proc_kpagecount_operations);
908 proc_create("kpageflags", S_IRUSR, NULL, &proc_kpageflags_operations);
910 #ifdef CONFIG_PROC_VMCORE
911 proc_vmcore = proc_create("vmcore", S_IRUSR, NULL, &proc_vmcore_operations);
913 #ifdef CONFIG_MAGIC_SYSRQ
914 proc_create("sysrq-trigger", S_IWUSR, NULL, &proc_sysrq_trigger_operations);