diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-i386/msr.h | 14 | ||||
-rw-r--r-- | include/asm-x86_64/msr.h | 13 | ||||
-rw-r--r-- | include/linux/cpufreq.h | 4 |
3 files changed, 29 insertions, 2 deletions
diff --git a/include/asm-i386/msr.h b/include/asm-i386/msr.h index 6db40d0583f..ec3b6803fd3 100644 --- a/include/asm-i386/msr.h +++ b/include/asm-i386/msr.h @@ -83,6 +83,20 @@ static inline void wrmsrl (unsigned long msr, unsigned long long val) : "c" (counter)) #endif /* !CONFIG_PARAVIRT */ +#ifdef CONFIG_SMP +void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); +void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); +#else /* CONFIG_SMP */ +static inline void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) +{ + rdmsr(msr_no, *l, *h); +} +static inline void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) +{ + wrmsr(msr_no, l, h); +} +#endif /* CONFIG_SMP */ + /* symbolic names for some interesting MSRs */ /* Intel defined MSRs. */ #define MSR_IA32_P5_MC_ADDR 0 diff --git a/include/asm-x86_64/msr.h b/include/asm-x86_64/msr.h index 3227bc93d69..902f9a58617 100644 --- a/include/asm-x86_64/msr.h +++ b/include/asm-x86_64/msr.h @@ -160,6 +160,19 @@ static inline unsigned int cpuid_edx(unsigned int op) #define MSR_IA32_UCODE_WRITE 0x79 #define MSR_IA32_UCODE_REV 0x8b +#ifdef CONFIG_SMP +void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); +void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); +#else /* CONFIG_SMP */ +static inline void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) +{ + rdmsr(msr_no, *l, *h); +} +static inline void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) +{ + wrmsr(msr_no, l, h); +} +#endif /* CONFIG_SMP */ #endif diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 0899e2cdcdd..3a25235d79d 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -225,8 +225,8 @@ struct cpufreq_driver { #define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed * mismatches */ -int cpufreq_register_driver(struct cpufreq_driver *driver_data); -int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); +int cpufreq_register_driver(const struct cpufreq_driver *driver_data); +int cpufreq_unregister_driver(const struct cpufreq_driver *driver_data); void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state); |