aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-26 17:17:50 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-26 17:17:50 -0500
commit6f8c480f998a619082f18407f8d7f4c29e94dc6e (patch)
tree5047fe0d685fe9eab64c506fa1001e7df5e65faa /include
parent038c068f63a950c3a6ccfa814831ccac0ad48fb1 (diff)
parentbd5ab26a7d0cc834d846fe5dd7291f0aed3be72b (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
* master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq: [CPUFREQ] constify some data tables. [CPUFREQ] constify cpufreq_driver where possible. {rd,wr}msr_on_cpu SMP=n optimization [CPUFREQ] cpufreq_ondemand.c: don't use _WORK_NAR rdmsr_on_cpu, wrmsr_on_cpu [CPUFREQ] Revert default on deprecated config X86_SPEEDSTEP_CENTRINO_ACPI
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/msr.h14
-rw-r--r--include/asm-x86_64/msr.h13
-rw-r--r--include/linux/cpufreq.h4
3 files changed, 29 insertions, 2 deletions
diff --git a/include/asm-i386/msr.h b/include/asm-i386/msr.h
index 6db40d0583f1..ec3b6803fd36 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)
83 : "c" (counter)) 83 : "c" (counter))
84#endif /* !CONFIG_PARAVIRT */ 84#endif /* !CONFIG_PARAVIRT */
85 85
86#ifdef CONFIG_SMP
87void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
88void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h);
89#else /* CONFIG_SMP */
90static inline void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h)
91{
92 rdmsr(msr_no, *l, *h);
93}
94static inline void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
95{
96 wrmsr(msr_no, l, h);
97}
98#endif /* CONFIG_SMP */
99
86/* symbolic names for some interesting MSRs */ 100/* symbolic names for some interesting MSRs */
87/* Intel defined MSRs. */ 101/* Intel defined MSRs. */
88#define MSR_IA32_P5_MC_ADDR 0 102#define MSR_IA32_P5_MC_ADDR 0
diff --git a/include/asm-x86_64/msr.h b/include/asm-x86_64/msr.h
index 3227bc93d69b..902f9a58617e 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)
160#define MSR_IA32_UCODE_WRITE 0x79 160#define MSR_IA32_UCODE_WRITE 0x79
161#define MSR_IA32_UCODE_REV 0x8b 161#define MSR_IA32_UCODE_REV 0x8b
162 162
163#ifdef CONFIG_SMP
164void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
165void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h);
166#else /* CONFIG_SMP */
167static inline void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h)
168{
169 rdmsr(msr_no, *l, *h);
170}
171static inline void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
172{
173 wrmsr(msr_no, l, h);
174}
175#endif /* CONFIG_SMP */
163 176
164#endif 177#endif
165 178
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 0899e2cdcdd1..3a25235d79da 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -225,8 +225,8 @@ struct cpufreq_driver {
225#define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed 225#define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed
226 * mismatches */ 226 * mismatches */
227 227
228int cpufreq_register_driver(struct cpufreq_driver *driver_data); 228int cpufreq_register_driver(const struct cpufreq_driver *driver_data);
229int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); 229int cpufreq_unregister_driver(const struct cpufreq_driver *driver_data);
230 230
231 231
232void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state); 232void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state);