diff options
Diffstat (limited to 'arch/x86/kernel/cpu/mcheck/mce.c')
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 147333627416..cd1313b47506 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
@@ -156,15 +156,15 @@ static void print_mce(struct mce *m) | |||
156 | "and contact your hardware vendor\n"); | 156 | "and contact your hardware vendor\n"); |
157 | } | 157 | } |
158 | 158 | ||
159 | static void mce_panic(char *msg, struct mce *backup, unsigned long start) | 159 | static void mce_panic(char *msg, struct mce *backup, u64 start) |
160 | { | 160 | { |
161 | int i; | 161 | int i; |
162 | 162 | ||
163 | oops_begin(); | 163 | oops_begin(); |
164 | for (i = 0; i < MCE_LOG_LEN; i++) { | 164 | for (i = 0; i < MCE_LOG_LEN; i++) { |
165 | unsigned long tsc = mcelog.entry[i].tsc; | 165 | u64 tsc = mcelog.entry[i].tsc; |
166 | 166 | ||
167 | if (time_before(tsc, start)) | 167 | if ((s64)(tsc - start) < 0) |
168 | continue; | 168 | continue; |
169 | print_mce(&mcelog.entry[i]); | 169 | print_mce(&mcelog.entry[i]); |
170 | if (backup && mcelog.entry[i].tsc == backup->tsc) | 170 | if (backup && mcelog.entry[i].tsc == backup->tsc) |
@@ -970,13 +970,13 @@ void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu); | |||
970 | static ssize_t show_ ## name(struct sys_device *s, \ | 970 | static ssize_t show_ ## name(struct sys_device *s, \ |
971 | struct sysdev_attribute *attr, \ | 971 | struct sysdev_attribute *attr, \ |
972 | char *buf) { \ | 972 | char *buf) { \ |
973 | return sprintf(buf, "%lx\n", (unsigned long)var); \ | 973 | return sprintf(buf, "%Lx\n", (u64)var); \ |
974 | } \ | 974 | } \ |
975 | static ssize_t set_ ## name(struct sys_device *s, \ | 975 | static ssize_t set_ ## name(struct sys_device *s, \ |
976 | struct sysdev_attribute *attr, \ | 976 | struct sysdev_attribute *attr, \ |
977 | const char *buf, size_t siz) { \ | 977 | const char *buf, size_t siz) { \ |
978 | char *end; \ | 978 | char *end; \ |
979 | unsigned long new = simple_strtoul(buf, &end, 0); \ | 979 | u64 new = simple_strtoull(buf, &end, 0); \ |
980 | \ | 980 | \ |
981 | if (end == buf) \ | 981 | if (end == buf) \ |
982 | return -EINVAL; \ | 982 | return -EINVAL; \ |