diff options
author | Borislav Petkov <bp@suse.de> | 2014-03-09 13:05:23 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2014-03-13 18:34:45 -0400 |
commit | 22085a66c2fab6cf9b9393c056a3600a6b4735de (patch) | |
tree | 3175ffd60c8d06bc2c719ee8a27442bb5a6aed7f /arch/x86/include/asm/msr.h | |
parent | 2a0788dc9bc46789ec98aea0f30c6fb420196b12 (diff) |
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 { \ | |||
214 | 214 | ||
215 | struct msr *msrs_alloc(void); | 215 | struct msr *msrs_alloc(void); |
216 | void msrs_free(struct msr *msrs); | 216 | void msrs_free(struct msr *msrs); |
217 | int msr_set_bit(u32 msr, u8 bit); | ||
218 | int msr_clear_bit(u32 msr, u8 bit); | ||
217 | 219 | ||
218 | #ifdef CONFIG_SMP | 220 | #ifdef CONFIG_SMP |
219 | int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); | 221 | int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); |