diff options
author | Jaswinder Singh Rajput <jaswinderrajput@gmail.com> | 2009-03-12 02:37:00 +0530 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-13 03:02:45 +0100 |
commit | 91219bcbdcccc1686b0ecce09e28825c93619c07 (patch) | |
tree | 524b5f18804d4697ef95a7a766aed85fbfce0dba /arch/x86/include | |
parent | 02dde8b45c5460794b9052d7c12939fe3eb63c2c (diff) | |
download | blackbird-op-linux-91219bcbdcccc1686b0ecce09e28825c93619c07.tar.gz blackbird-op-linux-91219bcbdcccc1686b0ecce09e28825c93619c07.zip |
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')
-rwxr-xr-x | arch/x86/include/asm/cpu_debug.h | 16 |
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 d24d64fcee04..56f1635e4617 100755 --- a/arch/x86/include/asm/cpu_debug.h +++ b/arch/x86/include/asm/cpu_debug.h @@ -171,16 +171,22 @@ struct cpu_private { struct cpu_debug_base { char *name; /* Register name */ unsigned flag; /* Register flag */ + unsigned write; /* Register write flag */ }; -struct cpu_cpuX_base { - struct dentry *dentry; /* Register dentry */ - int init; /* Register index file */ -}; - +/* + * Currently it looks similar to cpu_debug_base but once we add more files + * cpu_file_base will go in different direction + */ struct cpu_file_base { char *name; /* Register file name */ unsigned flag; /* Register file flag */ + unsigned write; /* Register write flag */ +}; + +struct cpu_cpuX_base { + struct dentry *dentry; /* Register dentry */ + int init; /* Register index file */ }; struct cpu_debug_range { |