Skip to content

Commit

Permalink
time: Cleanup global variables and move them to the top
Browse files Browse the repository at this point in the history
Move global xtime_lock and timekeeping_suspended values up
to the top of timekeeping.c

CC: Thomas Gleixner <tglx@linutronix.de>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
  • Loading branch information
John Stultz committed Jan 27, 2012
1 parent 01f71b4 commit 8fcce54
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions kernel/time/timekeeping.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ struct timekeeper {

static struct timekeeper timekeeper;

/*
* This read-write spinlock protects us from races in SMP while
* playing with xtime.
*/
__cacheline_aligned_in_smp DEFINE_SEQLOCK(xtime_lock);


/* flag for if timekeeping is suspended */
int __read_mostly timekeeping_suspended;



/**
* timekeeper_setup_internals - Set up internals to use clocksource clock.
*
Expand Down Expand Up @@ -157,18 +169,6 @@ static inline s64 timekeeping_get_ns_raw(void)
return clocksource_cyc2ns(cycle_delta, clock->mult, clock->shift);
}

/*
* This read-write spinlock protects us from races in SMP while
* playing with xtime.
*/
__cacheline_aligned_in_smp DEFINE_SEQLOCK(xtime_lock);




/* flag for if timekeeping is suspended */
int __read_mostly timekeeping_suspended;

/* must hold xtime_lock */
void timekeeping_leap_insert(int leapsecond)
{
Expand Down

0 comments on commit 8fcce54

Please sign in to comment.