Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
f133ecc
Documentation
arch
alpha
arm
avr32
blackfin
cris
frv
h8300
ia64
m32r
m68k
microblaze
mips
mn10300
parisc
powerpc
s390
score
sh
sparc
tile
configs
include
kernel
Makefile
asm-offsets.c
backtrace.c
compat.c
compat_signal.c
early_printk.c
entry.S
futex_64.S
hardwall.c
head_32.S
head_64.S
hvglue.lds
init_task.c
intvec_32.S
intvec_64.S
irq.c
machine_kexec.c
messaging.c
module.c
pci-dma.c
pci.c
proc.c
process.c
ptrace.c
reboot.c
regs_32.S
regs_64.S
relocate_kernel.S
setup.c
signal.c
single_step.c
smp.c
smpboot.c
stack.c
sys.c
sysfs.c
tile-desc_32.c
tile-desc_64.c
time.c
tlb.c
traps.c
vmlinux.lds.S
kvm
lib
mm
Kbuild
Kconfig
Kconfig.debug
Makefile
um
unicore32
x86
xtensa
.gitignore
Kconfig
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
REPORTING-BUGS
Breadcrumbs
linux
/
arch
/
tile
/
kernel
/
proc.c
Blame
Blame
Latest commit
History
History
163 lines (141 loc) · 3.55 KB
Breadcrumbs
linux
/
arch
/
tile
/
kernel
/
proc.c
Top
File metadata and controls
Code
Blame
163 lines (141 loc) · 3.55 KB
Raw
/* * Copyright 2010 Tilera Corporation. All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, version 2. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or * NON INFRINGEMENT. See the GNU General Public License for * more details. */ #include <linux/smp.h> #include <linux/seq_file.h> #include <linux/threads.h> #include <linux/cpumask.h> #include <linux/timex.h> #include <linux/delay.h> #include <linux/fs.h> #include <linux/proc_fs.h> #include <linux/sysctl.h> #include <linux/hardirq.h> #include <linux/mman.h> #include <asm/pgtable.h> #include <asm/processor.h> #include <asm/sections.h> #include <asm/homecache.h> #include <asm/hardwall.h> #include <arch/chip.h> /* * Support /proc/cpuinfo */ #define cpu_to_ptr(n) ((void *)((long)(n)+1)) #define ptr_to_cpu(p) ((long)(p) - 1) static int show_cpuinfo(struct seq_file *m, void *v) { int n = ptr_to_cpu(v); if (n == 0) { char buf[NR_CPUS*5]; cpulist_scnprintf(buf, sizeof(buf), cpu_online_mask); seq_printf(m, "cpu count\t: %d\n", num_online_cpus()); seq_printf(m, "cpu list\t: %s\n", buf); seq_printf(m, "model name\t: %s\n", chip_model); seq_printf(m, "flags\t\t:\n"); /* nothing for now */ seq_printf(m, "cpu MHz\t\t: %llu.%06llu\n", get_clock_rate() / 1000000, (get_clock_rate() % 1000000)); seq_printf(m, "bogomips\t: %lu.%02lu\n\n", loops_per_jiffy/(500000/HZ), (loops_per_jiffy/(5000/HZ)) % 100); } #ifdef CONFIG_SMP if (!cpu_online(n)) return 0; #endif seq_printf(m, "processor\t: %d\n", n); /* Print only num_online_cpus() blank lines total. */ if (cpumask_next(n, cpu_online_mask) < nr_cpu_ids) seq_printf(m, "\n"); return 0; } static void *c_start(struct seq_file *m, loff_t *pos) { return *pos < nr_cpu_ids ? cpu_to_ptr(*pos) : NULL; } static void *c_next(struct seq_file *m, void *v, loff_t *pos) { ++*pos; return c_start(m, pos); } static void c_stop(struct seq_file *m, void *v) { } const struct seq_operations cpuinfo_op = { .start = c_start, .next = c_next, .stop = c_stop, .show = show_cpuinfo, }; /* * Support /proc/tile directory */ static int __init proc_tile_init(void) { struct proc_dir_entry *root = proc_mkdir("tile", NULL); if (root == NULL) return 0; proc_tile_hardwall_init(root); return 0; } arch_initcall(proc_tile_init); /* * Support /proc/sys/tile directory */ #ifndef __tilegx__ /* FIXME: GX: no support for unaligned access yet */ static ctl_table unaligned_subtable[] = { { .procname = "enabled", .data = &unaligned_fixup, .maxlen = sizeof(int), .mode = 0644, .proc_handler = &proc_dointvec }, { .procname = "printk", .data = &unaligned_printk, .maxlen = sizeof(int), .mode = 0644, .proc_handler = &proc_dointvec }, { .procname = "count", .data = &unaligned_fixup_count, .maxlen = sizeof(int), .mode = 0644, .proc_handler = &proc_dointvec }, {} }; static ctl_table unaligned_table[] = { { .procname = "unaligned_fixup", .mode = 0555, .child = unaligned_subtable }, {} }; #endif static struct ctl_path tile_path[] = { { .procname = "tile" }, { } }; static int __init proc_sys_tile_init(void) { #ifndef __tilegx__ /* FIXME: GX: no support for unaligned access yet */ register_sysctl_paths(tile_path, unaligned_table); #endif return 0; } arch_initcall(proc_sys_tile_init);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
You can’t perform that action at this time.