diff options
author | Borislav Petkov <bp@suse.de> | 2014-03-09 18:05:23 +0100 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2014-03-13 15:34:45 -0700 |
commit | 22085a66c2fab6cf9b9393c056a3600a6b4735de (patch) | |
tree | 3175ffd60c8d06bc2c719ee8a27442bb5a6aed7f /arch/x86/include/asm/msr.h | |
parent | 2a0788dc9bc46789ec98aea0f30c6fb420196b12 (diff) | |
download | linux-stable-22085a66c2fab6cf9b9393c056a3600a6b4735de.tar.gz linux-stable-22085a66c2fab6cf9b9393c056a3600a6b4735de.tar.bz2 linux-stable-22085a66c2fab6cf9b9393c056a3600a6b4735de.zip |
x86: Add another set of MSR accessor functions
We very often need to set or clear a bit in an MSR as a result of doing
some sort of a hardware configuration. Add generic versions of that
repeated functionality in order to save us a bunch of duplicated code in
the early CPU vendor detection/config code.
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/1394384725-10796-2-git-send-email-bp@alien8.de
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/include/asm/msr.h')
-rw-r--r-- | arch/x86/include/asm/msr.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index e139b13f2a33..de36f22eb0b9 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h @@ -214,6 +214,8 @@ do { \ struct msr *msrs_alloc(void); void msrs_free(struct msr *msrs); +int msr_set_bit(u32 msr, u8 bit); +int msr_clear_bit(u32 msr, u8 bit); #ifdef CONFIG_SMP int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); |