x86: cpu_debug add write support for MSRs
authorJaswinder Singh Rajput <jaswinderrajput@gmail.com>
Wed, 11 Mar 2009 21:07:00 +0000 (02:37 +0530)
committerIngo Molnar <mingo@elte.hu>
Fri, 13 Mar 2009 02:02:45 +0000 (03:02 +0100)
commit91219bcbdcccc1686b0ecce09e28825c93619c07
tree524b5f18804d4697ef95a7a766aed85fbfce0dba
parent02dde8b45c5460794b9052d7c12939fe3eb63c2c
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>
arch/x86/include/asm/cpu_debug.h
arch/x86/kernel/cpu/cpu_debug.c