Blame view
fs/proc/cpuinfo.c
740 Bytes
b24413180 License cleanup: ... |
1 |
// SPDX-License-Identifier: GPL-2.0 |
7d5905dc1 x86 / CPU: Always... |
2 |
#include <linux/cpufreq.h> |
8591cf432 proc: move /proc/... |
3 4 5 6 |
#include <linux/fs.h> #include <linux/init.h> #include <linux/proc_fs.h> #include <linux/seq_file.h> |
7d5905dc1 x86 / CPU: Always... |
7 8 9 |
__weak void arch_freq_prepare_all(void) { } |
8591cf432 proc: move /proc/... |
10 11 12 |
extern const struct seq_operations cpuinfo_op; static int cpuinfo_open(struct inode *inode, struct file *file) { |
7d5905dc1 x86 / CPU: Always... |
13 |
arch_freq_prepare_all(); |
8591cf432 proc: move /proc/... |
14 15 |
return seq_open(file, &cpuinfo_op); } |
97a32539b proc: convert eve... |
16 |
static const struct proc_ops cpuinfo_proc_ops = { |
d919b33da proc: faster open... |
17 |
.proc_flags = PROC_ENTRY_PERMANENT, |
97a32539b proc: convert eve... |
18 |
.proc_open = cpuinfo_open, |
d801fe130 FROMLIST: proc/cp... |
19 |
.proc_read_iter = seq_read_iter, |
97a32539b proc: convert eve... |
20 21 |
.proc_lseek = seq_lseek, .proc_release = seq_release, |
8591cf432 proc: move /proc/... |
22 23 24 25 |
}; static int __init proc_cpuinfo_init(void) { |
97a32539b proc: convert eve... |
26 |
proc_create("cpuinfo", 0, NULL, &cpuinfo_proc_ops); |
8591cf432 proc: move /proc/... |
27 28 |
return 0; } |
abaf3787a fs/proc: don't us... |
29 |
fs_initcall(proc_cpuinfo_init); |