diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 15:07:28 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 15:07:28 -0400 |
| commit | 36f021b579d195cdc5fa6f3e2bab198b4bf70643 (patch) | |
| tree | 96d3c97f5e5214d2aa7151c12a22a7eb345dbaa1 /include | |
| parent | 215d06780d13fd7de629b02b61b7b7bf88ce5039 (diff) | |
| parent | 1d72acf91abb327e25137ad2e371c1a788b34e45 (diff) | |
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: (32 commits)
Use menuconfig objects - hwmon
hwmon/smsc47b397: Use dynamic sysfs callbacks
hwmon/smsc47b397: Convert to a platform driver
hwmon/w83781d: Deprecate W83627HF support
hwmon/w83781d: Use dynamic sysfs callbacks
hwmon/w83781d: Be less i2c_client-centric
hwmon/w83781d: Clean up conversion macros
hwmon/w83781d: No longer use i2c-isa
hwmon/ams: Do not print error on systems without apple motion sensor
hwmon/ams: Fix I2C read retry logic
hwmon: New AD7416, AD7417 and AD7418 driver
hwmon/coretemp: Add documentation
hwmon: New coretemp driver
i386: Use functions from library in msr driver
i386: Add safe variants of rdmsr_on_cpu and wrmsr_on_cpu
hwmon/lm75: Use dynamic sysfs callbacks
hwmon/lm78: Use dynamic sysfs callbacks
hwmon/lm78: Be less i2c_client-centric
hwmon/lm78: No longer use i2c-isa
hwmon: New max6650 driver
...
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-i386/msr.h | 12 | ||||
| -rw-r--r-- | include/asm-x86_64/msr.h | 11 |
2 files changed, 22 insertions, 1 deletions
diff --git a/include/asm-i386/msr.h b/include/asm-i386/msr.h index 9559894c7658..26861df52cc4 100644 --- a/include/asm-i386/msr.h +++ b/include/asm-i386/msr.h | |||
| @@ -77,7 +77,7 @@ static inline unsigned long long native_read_pmc(void) | |||
| 77 | #ifdef CONFIG_PARAVIRT | 77 | #ifdef CONFIG_PARAVIRT |
| 78 | #include <asm/paravirt.h> | 78 | #include <asm/paravirt.h> |
| 79 | #else | 79 | #else |
| 80 | 80 | #include <linux/errno.h> | |
| 81 | /* | 81 | /* |
| 82 | * Access to machine-specific registers (available on 586 and better only) | 82 | * Access to machine-specific registers (available on 586 and better only) |
| 83 | * Note: the rd* operations modify the parameters directly (without using | 83 | * Note: the rd* operations modify the parameters directly (without using |
| @@ -148,6 +148,8 @@ static inline void wrmsrl (unsigned long msr, unsigned long long val) | |||
| 148 | #ifdef CONFIG_SMP | 148 | #ifdef CONFIG_SMP |
| 149 | void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); | 149 | void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); |
| 150 | void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); | 150 | void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); |
| 151 | int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); | ||
| 152 | int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); | ||
| 151 | #else /* CONFIG_SMP */ | 153 | #else /* CONFIG_SMP */ |
| 152 | static inline void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) | 154 | static inline void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) |
| 153 | { | 155 | { |
| @@ -157,6 +159,14 @@ static inline void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) | |||
| 157 | { | 159 | { |
| 158 | wrmsr(msr_no, l, h); | 160 | wrmsr(msr_no, l, h); |
| 159 | } | 161 | } |
| 162 | static inline int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) | ||
| 163 | { | ||
| 164 | return rdmsr_safe(msr_no, l, h); | ||
| 165 | } | ||
| 166 | static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) | ||
| 167 | { | ||
| 168 | return wrmsr_safe(msr_no, l, h); | ||
| 169 | } | ||
| 160 | #endif /* CONFIG_SMP */ | 170 | #endif /* CONFIG_SMP */ |
| 161 | #endif | 171 | #endif |
| 162 | #endif | 172 | #endif |
diff --git a/include/asm-x86_64/msr.h b/include/asm-x86_64/msr.h index a524f0325673..d5c55b80da54 100644 --- a/include/asm-x86_64/msr.h +++ b/include/asm-x86_64/msr.h | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | #include <asm/msr-index.h> | 4 | #include <asm/msr-index.h> |
| 5 | 5 | ||
| 6 | #ifndef __ASSEMBLY__ | 6 | #ifndef __ASSEMBLY__ |
| 7 | #include <linux/errno.h> | ||
| 7 | /* | 8 | /* |
| 8 | * Access to machine-specific registers (available on 586 and better only) | 9 | * Access to machine-specific registers (available on 586 and better only) |
| 9 | * Note: the rd* operations modify the parameters directly (without using | 10 | * Note: the rd* operations modify the parameters directly (without using |
| @@ -162,6 +163,8 @@ static inline unsigned int cpuid_edx(unsigned int op) | |||
| 162 | #ifdef CONFIG_SMP | 163 | #ifdef CONFIG_SMP |
| 163 | void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); | 164 | void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); |
| 164 | void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); | 165 | void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); |
| 166 | int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); | ||
| 167 | int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); | ||
| 165 | #else /* CONFIG_SMP */ | 168 | #else /* CONFIG_SMP */ |
| 166 | static inline void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) | 169 | static inline void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) |
| 167 | { | 170 | { |
| @@ -171,6 +174,14 @@ static inline void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) | |||
| 171 | { | 174 | { |
| 172 | wrmsr(msr_no, l, h); | 175 | wrmsr(msr_no, l, h); |
| 173 | } | 176 | } |
| 177 | static inline int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) | ||
| 178 | { | ||
| 179 | return rdmsr_safe(msr_no, l, h); | ||
| 180 | } | ||
| 181 | static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) | ||
| 182 | { | ||
| 183 | return wrmsr_safe(msr_no, l, h); | ||
| 184 | } | ||
| 174 | #endif /* CONFIG_SMP */ | 185 | #endif /* CONFIG_SMP */ |
| 175 | #endif /* __ASSEMBLY__ */ | 186 | #endif /* __ASSEMBLY__ */ |
| 176 | #endif /* X86_64_MSR_H */ | 187 | #endif /* X86_64_MSR_H */ |
