diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-27 20:21:49 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-27 20:21:49 -0400 |
commit | ce6bceabae166c2100133d6306cf3a8b494f3540 (patch) | |
tree | a31b13c91ef4ca260b1517d2720976baa5241e4f /arch/x86/include | |
parent | 5171f4fa744de840c2c20f5b65bd3ee1cd85d0e8 (diff) | |
parent | 9e3410b764b79670a59d6c1ccdcad483b92c058c (diff) |
Merge branch 'powercap'
* powercap:
PowerCap: Convert class code to use dev_groups
PowerCap: Introduce Intel RAPL power capping driver
bitops: Introduce BIT_ULL
x86 / msr: add 64bit _on_cpu access functions
PowerCap: Add to drivers Kconfig and Makefile
PowerCap: Add class driver
PowerCap: Documentation
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/msr.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index cb7502852acb..e139b13f2a33 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h | |||
@@ -218,10 +218,14 @@ void msrs_free(struct msr *msrs); | |||
218 | #ifdef CONFIG_SMP | 218 | #ifdef CONFIG_SMP |
219 | int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); | 219 | int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); |
220 | int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); | 220 | int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); |
221 | int rdmsrl_on_cpu(unsigned int cpu, u32 msr_no, u64 *q); | ||
222 | int wrmsrl_on_cpu(unsigned int cpu, u32 msr_no, u64 q); | ||
221 | void rdmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr *msrs); | 223 | void rdmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr *msrs); |
222 | void wrmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr *msrs); | 224 | void wrmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr *msrs); |
223 | int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); | 225 | int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); |
224 | int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); | 226 | int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); |
227 | int rdmsrl_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 *q); | ||
228 | int wrmsrl_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 q); | ||
225 | int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]); | 229 | int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]); |
226 | int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]); | 230 | int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]); |
227 | #else /* CONFIG_SMP */ | 231 | #else /* CONFIG_SMP */ |
@@ -235,6 +239,16 @@ static inline int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) | |||
235 | wrmsr(msr_no, l, h); | 239 | wrmsr(msr_no, l, h); |
236 | return 0; | 240 | return 0; |
237 | } | 241 | } |
242 | static inline int rdmsrl_on_cpu(unsigned int cpu, u32 msr_no, u64 *q) | ||
243 | { | ||
244 | rdmsrl(msr_no, *q); | ||
245 | return 0; | ||
246 | } | ||
247 | static inline int wrmsrl_on_cpu(unsigned int cpu, u32 msr_no, u64 q) | ||
248 | { | ||
249 | wrmsrl(msr_no, q); | ||
250 | return 0; | ||
251 | } | ||
238 | static inline void rdmsr_on_cpus(const struct cpumask *m, u32 msr_no, | 252 | static inline void rdmsr_on_cpus(const struct cpumask *m, u32 msr_no, |
239 | struct msr *msrs) | 253 | struct msr *msrs) |
240 | { | 254 | { |
@@ -254,6 +268,14 @@ static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) | |||
254 | { | 268 | { |
255 | return wrmsr_safe(msr_no, l, h); | 269 | return wrmsr_safe(msr_no, l, h); |
256 | } | 270 | } |
271 | static inline int rdmsrl_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 *q) | ||
272 | { | ||
273 | return rdmsrl_safe(msr_no, q); | ||
274 | } | ||
275 | static inline int wrmsrl_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 q) | ||
276 | { | ||
277 | return wrmsrl_safe(msr_no, q); | ||
278 | } | ||
257 | static inline int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]) | 279 | static inline int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]) |
258 | { | 280 | { |
259 | return rdmsr_safe_regs(regs); | 281 | return rdmsr_safe_regs(regs); |