cregit-Linux how code gets into the kernel

Release 4.14 arch/ia64/sn/kernel/sn2/sn_proc_fs.c

/*
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Copyright (C) 2000-2005 Silicon Graphics, Inc. All rights reserved.
 */

#ifdef CONFIG_PROC_FS
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/uaccess.h>
#include <asm/sn/sn_sal.h>


static int partition_id_show(struct seq_file *s, void *p) { seq_printf(s, "%d\n", sn_partition_id); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Jesse Barnes1659.26%133.33%
Mark Goodwin1037.04%133.33%
Russ Anderson13.70%133.33%
Total27100.00%3100.00%


static int partition_id_open(struct inode *inode, struct file *file) { return single_open(file, partition_id_show, NULL); }

Contributors

PersonTokensPropCommitsCommitProp
Mark Goodwin1557.69%133.33%
Jesse Barnes1142.31%266.67%
Total26100.00%3100.00%


static int system_serial_number_show(struct seq_file *s, void *p) { seq_printf(s, "%s\n", sn_system_serial_number()); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Jesse Barnes1864.29%150.00%
Mark Goodwin1035.71%150.00%
Total28100.00%2100.00%


static int system_serial_number_open(struct inode *inode, struct file *file) { return single_open(file, system_serial_number_show, NULL); }

Contributors

PersonTokensPropCommitsCommitProp
Mark Goodwin2076.92%150.00%
Jesse Barnes623.08%150.00%
Total26100.00%2100.00%


static int licenseID_show(struct seq_file *s, void *p) { seq_printf(s, "0x%llx\n", sn_partition_serial_number_val()); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Jesse Barnes1553.57%133.33%
Mark Goodwin1242.86%133.33%
Matthew Wilcox13.57%133.33%
Total28100.00%3100.00%


static int licenseID_open(struct inode *inode, struct file *file) { return single_open(file, licenseID_show, NULL); }

Contributors

PersonTokensPropCommitsCommitProp
Mark Goodwin1661.54%150.00%
Jesse Barnes1038.46%150.00%
Total26100.00%2100.00%


static int coherence_id_show(struct seq_file *s, void *p) { seq_printf(s, "%d\n", partition_coherence_id()); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Dean Roe1760.71%133.33%
Mark Goodwin1035.71%133.33%
Jack Steiner13.57%133.33%
Total28100.00%3100.00%


static int coherence_id_open(struct inode *inode, struct file *file) { return single_open(file, coherence_id_show, NULL); }

Contributors

PersonTokensPropCommitsCommitProp
Mark Goodwin2596.15%150.00%
Dean Roe13.85%150.00%
Total26100.00%2100.00%

/* /proc/sgi_sn/sn_topology uses seq_file, see sn_hwperf.c */ extern int sn_topology_open(struct inode *, struct file *); extern int sn_topology_release(struct inode *, struct file *); static const struct file_operations proc_partition_id_fops = { .open = partition_id_open, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; static const struct file_operations proc_system_sn_fops = { .open = system_serial_number_open, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; static const struct file_operations proc_license_id_fops = { .open = licenseID_open, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; static const struct file_operations proc_coherence_id_fops = { .open = coherence_id_open, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; static const struct file_operations proc_sn_topo_fops = { .open = sn_topology_open, .read = seq_read, .llseek = seq_lseek, .release = sn_topology_release, };
void register_sn_procfs(void) { static struct proc_dir_entry *sgi_proc_dir = NULL; BUG_ON(sgi_proc_dir != NULL); if (!(sgi_proc_dir = proc_mkdir("sgi_sn", NULL))) return; proc_create("partition_id", 0444, sgi_proc_dir, &proc_partition_id_fops); proc_create("system_serial_number", 0444, sgi_proc_dir, &proc_system_sn_fops); proc_create("licenseID", 0444, sgi_proc_dir, &proc_license_id_fops); proc_create("coherence_id", 0444, sgi_proc_dir, &proc_coherence_id_fops); proc_create("sn_topology", 0444, sgi_proc_dir, &proc_sn_topo_fops); }

Contributors

PersonTokensPropCommitsCommitProp
Mark Goodwin4445.36%228.57%
Alexey Dobriyan2525.77%114.29%
Denis V. Lunev1515.46%114.29%
Jesse Barnes88.25%228.57%
Andrew Morton55.15%114.29%
Total97100.00%7100.00%

#endif /* CONFIG_PROC_FS */

Overall Contributors

PersonTokensPropCommitsCommitProp
Mark Goodwin19539.16%214.29%
Alexey Dobriyan15230.52%17.14%
Jesse Barnes9619.28%321.43%
Dean Roe255.02%17.14%
Denis V. Lunev153.01%17.14%
Andrew Morton81.61%17.14%
Jes Sorensen20.40%17.14%
Russ Anderson20.40%17.14%
Matthew Wilcox10.20%17.14%
Jack Steiner10.20%17.14%
Linus Torvalds10.20%17.14%
Total498100.00%14100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.