Skip to content

Commit

Permalink
x86, mce: initial steps to make 64bit mce code 32bit clean
Browse files Browse the repository at this point in the history
Replace unsigned long with u64s if they need to contain 64bit values.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
  • Loading branch information
Andi Kleen authored and H. Peter Anvin committed May 28, 2009
1 parent 01c6680 commit 3cde5c8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arch/x86/kernel/cpu/mcheck/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,15 @@ static void print_mce(struct mce *m)
"and contact your hardware vendor\n");
}

static void mce_panic(char *msg, struct mce *backup, unsigned long start)
static void mce_panic(char *msg, struct mce *backup, u64 start)
{
int i;

oops_begin();
for (i = 0; i < MCE_LOG_LEN; i++) {
unsigned long tsc = mcelog.entry[i].tsc;
u64 tsc = mcelog.entry[i].tsc;

if (time_before(tsc, start))
if ((s64)(tsc - start) < 0)
continue;
print_mce(&mcelog.entry[i]);
if (backup && mcelog.entry[i].tsc == backup->tsc)
Expand Down Expand Up @@ -970,13 +970,13 @@ void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu);
static ssize_t show_ ## name(struct sys_device *s, \
struct sysdev_attribute *attr, \
char *buf) { \
return sprintf(buf, "%lx\n", (unsigned long)var); \
return sprintf(buf, "%Lx\n", (u64)var); \
} \
static ssize_t set_ ## name(struct sys_device *s, \
struct sysdev_attribute *attr, \
const char *buf, size_t siz) { \
char *end; \
unsigned long new = simple_strtoul(buf, &end, 0); \
u64 new = simple_strtoull(buf, &end, 0); \
\
if (end == buf) \
return -EINVAL; \
Expand Down

0 comments on commit 3cde5c8

Please sign in to comment.