#include <linux/clocksource.h>
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/init.h>
#include "timekeeping.h"
#include "tick-internal.h"
static u64 jiffies_read(struct clocksource *cs)
{ … }
static struct clocksource clocksource_jiffies = …;
__cacheline_aligned_in_smp DEFINE_RAW_SPINLOCK(…);
__cacheline_aligned_in_smp seqcount_raw_spinlock_t jiffies_seq = …;
#if (BITS_PER_LONG < 64)
u64 get_jiffies_64(void)
{
unsigned int seq;
u64 ret;
do {
seq = read_seqcount_begin(&jiffies_seq);
ret = jiffies_64;
} while (read_seqcount_retry(&jiffies_seq, seq));
return ret;
}
EXPORT_SYMBOL(get_jiffies_64);
#endif
EXPORT_SYMBOL(…);
static int __init init_jiffies_clocksource(void)
{ … }
core_initcall(init_jiffies_clocksource);
struct clocksource * __init __weak clocksource_default_clock(void)
{ … }
static struct clocksource refined_jiffies;
int register_refined_jiffies(long cycles_per_second)
{ … }