aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/cpu_debug.h
diff options
context:
space:
mode:
authorJaswinder Singh Rajput <jaswinderrajput@gmail.com>2009-03-11 17:07:00 -0400
committerIngo Molnar <mingo@elte.hu>2009-03-12 22:02:45 -0400
commit91219bcbdcccc1686b0ecce09e28825c93619c07 (patch)
tree524b5f18804d4697ef95a7a766aed85fbfce0dba /arch/x86/include/asm/cpu_debug.h
parent02dde8b45c5460794b9052d7c12939fe3eb63c2c (diff)
x86: cpu_debug add write support for MSRs
Supported write flag for registers. currently write is enabled only for PMC MSR. [root@ht]# cat /sys/kernel/debug/x86/cpu/cpu1/pmc/0x300/value 0x0 [root@ht]# echo 1234 > /sys/kernel/debug/x86/cpu/cpu1/pmc/0x300/value [root@ht]# cat /sys/kernel/debug/x86/cpu/cpu1/pmc/0x300/value 0x4d2 [root@ht]# echo 0x1234 > /sys/kernel/debug/x86/cpu/cpu1/pmc/0x300/value [root@ht]# cat /sys/kernel/debug/x86/cpu/cpu1/pmc/0x300/value 0x1234 Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/cpu_debug.h')
-rwxr-xr-xarch/x86/include/asm/cpu_debug.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/arch/x86/include/asm/cpu_debug.h b/arch/x86/include/asm/cpu_debug.h
index d24d64fcee0..56f1635e461 100755
--- a/arch/x86/include/asm/cpu_debug.h
+++ b/arch/x86/include/asm/cpu_debug.h
@@ -171,16 +171,22 @@ struct cpu_private {
171struct cpu_debug_base { 171struct cpu_debug_base {
172 char *name; /* Register name */ 172 char *name; /* Register name */
173 unsigned flag; /* Register flag */ 173 unsigned flag; /* Register flag */
174 unsigned write; /* Register write flag */
174}; 175};
175 176
176struct cpu_cpuX_base { 177/*
177 struct dentry *dentry; /* Register dentry */ 178 * Currently it looks similar to cpu_debug_base but once we add more files
178 int init; /* Register index file */ 179 * cpu_file_base will go in different direction
179}; 180 */
180
181struct cpu_file_base { 181struct cpu_file_base {
182 char *name; /* Register file name */ 182 char *name; /* Register file name */
183 unsigned flag; /* Register file flag */ 183 unsigned flag; /* Register file flag */
184 unsigned write; /* Register write flag */
185};
186
187struct cpu_cpuX_base {
188 struct dentry *dentry; /* Register dentry */
189 int init; /* Register index file */
184}; 190};
185 191
186struct cpu_debug_range { 192struct cpu_debug_range {