mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 05:17:11 +07:00
97a32539b9
The most notable change is DEFINE_SHOW_ATTRIBUTE macro split in seq_file.h. Conversion rule is: llseek => proc_lseek unlocked_ioctl => proc_ioctl xxx => proc_xxx delete ".owner = THIS_MODULE" line [akpm@linux-foundation.org: fix drivers/isdn/capi/kcapi_proc.c] [sfr@canb.auug.org.au: fix kernel/sched/psi.c] Link: http://lkml.kernel.org/r/20200122180545.36222f50@canb.auug.org.au Link: http://lkml.kernel.org/r/20191225172546.GB13378@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
32 lines
693 B
C
32 lines
693 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include <linux/cpufreq.h>
|
|
#include <linux/fs.h>
|
|
#include <linux/init.h>
|
|
#include <linux/proc_fs.h>
|
|
#include <linux/seq_file.h>
|
|
|
|
__weak void arch_freq_prepare_all(void)
|
|
{
|
|
}
|
|
|
|
extern const struct seq_operations cpuinfo_op;
|
|
static int cpuinfo_open(struct inode *inode, struct file *file)
|
|
{
|
|
arch_freq_prepare_all();
|
|
return seq_open(file, &cpuinfo_op);
|
|
}
|
|
|
|
static const struct proc_ops cpuinfo_proc_ops = {
|
|
.proc_open = cpuinfo_open,
|
|
.proc_read = seq_read,
|
|
.proc_lseek = seq_lseek,
|
|
.proc_release = seq_release,
|
|
};
|
|
|
|
static int __init proc_cpuinfo_init(void)
|
|
{
|
|
proc_create("cpuinfo", 0, NULL, &cpuinfo_proc_ops);
|
|
return 0;
|
|
}
|
|
fs_initcall(proc_cpuinfo_init);
|