diff options
Diffstat (limited to 'fs/proc/proc_misc.c')
| -rw-r--r-- | fs/proc/proc_misc.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 7e277f2ad466..c652d469dc08 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
| @@ -123,6 +123,11 @@ static int uptime_read_proc(char *page, char **start, off_t off, | |||
| 123 | return proc_calc_metrics(page, start, off, count, eof, len); | 123 | return proc_calc_metrics(page, start, off, count, eof, len); |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | int __attribute__((weak)) arch_report_meminfo(char *page) | ||
| 127 | { | ||
| 128 | return 0; | ||
| 129 | } | ||
| 130 | |||
| 126 | static int meminfo_read_proc(char *page, char **start, off_t off, | 131 | static int meminfo_read_proc(char *page, char **start, off_t off, |
| 127 | int count, int *eof, void *data) | 132 | int count, int *eof, void *data) |
| 128 | { | 133 | { |
| @@ -221,6 +226,8 @@ static int meminfo_read_proc(char *page, char **start, off_t off, | |||
| 221 | 226 | ||
| 222 | len += hugetlb_report_meminfo(page + len); | 227 | len += hugetlb_report_meminfo(page + len); |
| 223 | 228 | ||
| 229 | len += arch_report_meminfo(page + len); | ||
| 230 | |||
| 224 | return proc_calc_metrics(page, start, off, count, eof, len); | 231 | return proc_calc_metrics(page, start, off, count, eof, len); |
| 225 | #undef K | 232 | #undef K |
| 226 | } | 233 | } |
| @@ -472,6 +479,13 @@ static const struct file_operations proc_vmalloc_operations = { | |||
| 472 | }; | 479 | }; |
| 473 | #endif | 480 | #endif |
| 474 | 481 | ||
| 482 | #ifndef arch_irq_stat_cpu | ||
| 483 | #define arch_irq_stat_cpu(cpu) 0 | ||
| 484 | #endif | ||
| 485 | #ifndef arch_irq_stat | ||
| 486 | #define arch_irq_stat() 0 | ||
| 487 | #endif | ||
| 488 | |||
| 475 | static int show_stat(struct seq_file *p, void *v) | 489 | static int show_stat(struct seq_file *p, void *v) |
| 476 | { | 490 | { |
| 477 | int i; | 491 | int i; |
| @@ -509,7 +523,9 @@ static int show_stat(struct seq_file *p, void *v) | |||
| 509 | sum += temp; | 523 | sum += temp; |
| 510 | per_irq_sum[j] += temp; | 524 | per_irq_sum[j] += temp; |
| 511 | } | 525 | } |
| 526 | sum += arch_irq_stat_cpu(i); | ||
| 512 | } | 527 | } |
| 528 | sum += arch_irq_stat(); | ||
| 513 | 529 | ||
| 514 | seq_printf(p, "cpu %llu %llu %llu %llu %llu %llu %llu %llu %llu\n", | 530 | seq_printf(p, "cpu %llu %llu %llu %llu %llu %llu %llu %llu %llu\n", |
| 515 | (unsigned long long)cputime64_to_clock_t(user), | 531 | (unsigned long long)cputime64_to_clock_t(user), |
