~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/ia64/sn/kernel/sn2/sn_proc_fs.c

Version: ~ [ linux-5.11 ] ~ [ linux-5.10.17 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.99 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.176 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.221 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.257 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.257 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * This file is subject to the terms and conditions of the GNU General Public
  3  * License.  See the file "COPYING" in the main directory of this archive
  4  * for more details.
  5  *
  6  * Copyright (C) 2000-2005 Silicon Graphics, Inc. All rights reserved.
  7  */
  8 
  9 #ifdef CONFIG_PROC_FS
 10 #include <linux/proc_fs.h>
 11 #include <linux/seq_file.h>
 12 #include <linux/uaccess.h>
 13 #include <asm/sn/sn_sal.h>
 14 
 15 static int partition_id_show(struct seq_file *s, void *p)
 16 {
 17         seq_printf(s, "%d\n", sn_partition_id);
 18         return 0;
 19 }
 20 
 21 static int system_serial_number_show(struct seq_file *s, void *p)
 22 {
 23         seq_printf(s, "%s\n", sn_system_serial_number());
 24         return 0;
 25 }
 26 
 27 static int licenseID_show(struct seq_file *s, void *p)
 28 {
 29         seq_printf(s, "0x%llx\n", sn_partition_serial_number_val());
 30         return 0;
 31 }
 32 
 33 static int coherence_id_show(struct seq_file *s, void *p)
 34 {
 35         seq_printf(s, "%d\n", partition_coherence_id());
 36 
 37         return 0;
 38 }
 39 
 40 /* /proc/sgi_sn/sn_topology uses seq_file, see sn_hwperf.c */
 41 extern int sn_topology_open(struct inode *, struct file *);
 42 extern int sn_topology_release(struct inode *, struct file *);
 43 
 44 static const struct file_operations proc_sn_topo_fops = {
 45         .open           = sn_topology_open,
 46         .read           = seq_read,
 47         .llseek         = seq_lseek,
 48         .release        = sn_topology_release,
 49 };
 50 
 51 void register_sn_procfs(void)
 52 {
 53         static struct proc_dir_entry *sgi_proc_dir = NULL;
 54 
 55         BUG_ON(sgi_proc_dir != NULL);
 56         if (!(sgi_proc_dir = proc_mkdir("sgi_sn", NULL)))
 57                 return;
 58 
 59         proc_create_single("partition_id", 0444, sgi_proc_dir,
 60                         partition_id_show);
 61         proc_create_single("system_serial_number", 0444, sgi_proc_dir,
 62                         system_serial_number_show);
 63         proc_create_single("licenseID", 0444, sgi_proc_dir, licenseID_show);
 64         proc_create_single("coherence_id", 0444, sgi_proc_dir,
 65                         coherence_id_show);
 66         proc_create("sn_topology", 0444, sgi_proc_dir, &proc_sn_topo_fops);
 67 }
 68 
 69 #endif /* CONFIG_PROC_FS */
 70 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp