Commit 9bba8dd6 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] uninline get_jiffies_64() for 32-bit architectures

uninline get_jiffies_64() for 32-bit architectures
parent 498b9cb8
......@@ -15,24 +15,14 @@
extern u64 jiffies_64;
extern unsigned long volatile jiffies;
#if (BITS_PER_LONG < 64)
u64 get_jiffies_64(void);
#else
static inline u64 get_jiffies_64(void)
{
#if BITS_PER_LONG < 64
extern seqlock_t xtime_lock;
unsigned long seq;
u64 tmp;
do {
seq = read_seqbegin(&xtime_lock);
tmp = jiffies_64;
} while (read_seqretry(&xtime_lock, seq));
return tmp;
#else
return (u64)jiffies;
#endif
}
#endif
/*
* These inlines deal with timer wrapping correctly. You are
......
......@@ -490,6 +490,9 @@ EXPORT_SYMBOL(xtime);
EXPORT_SYMBOL(xtime_lock);
EXPORT_SYMBOL(do_gettimeofday);
EXPORT_SYMBOL(do_settimeofday);
#if (BITS_PER_LONG < 64)
EXPORT_SYMBOL(get_jiffies_64);
#endif
#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
EXPORT_SYMBOL(__might_sleep);
#endif
......
......@@ -27,7 +27,6 @@
#include <linux/timex.h>
#include <linux/errno.h>
#include <linux/smp_lock.h>
#include <asm/uaccess.h>
/*
......@@ -416,3 +415,17 @@ struct timespec current_kernel_time(void)
return now;
}
#if (BITS_PER_LONG < 64)
u64 get_jiffies_64(void)
{
unsigned long seq;
u64 ret;
do {
seq = read_seqbegin(&xtime_lock);
ret = jiffies_64;
} while (read_seqretry(&xtime_lock, seq));
return ret;
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment