Skip to content

Commit

Permalink
time: Make do_timer() and xtime_lock local to kernel/time/
Browse files Browse the repository at this point in the history
All callers of do_timer() are converted to xtime_update(). The only
users of xtime_lock are in kernel/time/. Make both local to
kernel/time/ and remove them from the global header files.

[ tglx: Reuse tick-internal.h instead of creating another local header
  	file. Massaged changelog ]

Signed-off-by: Torben Hohn <torbenh@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: johnstul@us.ibm.com
Cc: yong.zhang0@gmail.com
Cc: hch@infradead.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Torben Hohn authored and Thomas Gleixner committed Jan 31, 2011
1 parent d12b0e2 commit e2830b5
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 8 deletions.
1 change: 0 additions & 1 deletion include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -2049,7 +2049,6 @@ extern void release_uids(struct user_namespace *ns);

#include <asm/current.h>

extern void do_timer(unsigned long ticks);
extern void xtime_update(unsigned long ticks);

extern int wake_up_state(struct task_struct *tsk, unsigned int state);
Expand Down
2 changes: 0 additions & 2 deletions include/linux/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ static inline struct timespec timespec_sub(struct timespec lhs,
#define timespec_valid(ts) \
(((ts)->tv_sec >= 0) && (((unsigned long) (ts)->tv_nsec) < NSEC_PER_SEC))

extern seqlock_t xtime_lock;

extern void read_persistent_clock(struct timespec *ts);
extern void read_boot_clock(struct timespec *ts);
extern int update_persistent_clock(struct timespec now);
Expand Down
1 change: 0 additions & 1 deletion kernel/time/clockevents.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <linux/notifier.h>
#include <linux/smp.h>
#include <linux/sysdev.h>
#include <linux/tick.h>

#include "tick-internal.h"

Expand Down
2 changes: 2 additions & 0 deletions kernel/time/jiffies.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <linux/module.h>
#include <linux/init.h>

#include "tick-internal.h"

/* The Jiffies based clocksource is the lowest common
* denominator clock source which should function on
* all systems. It has the same coarse resolution as
Expand Down
2 changes: 2 additions & 0 deletions kernel/time/ntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include <linux/mm.h>
#include <linux/module.h>

#include "tick-internal.h"

/*
* NTP timekeeping variables:
*/
Expand Down
1 change: 0 additions & 1 deletion kernel/time/tick-broadcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <linux/percpu.h>
#include <linux/profile.h>
#include <linux/sched.h>
#include <linux/tick.h>

#include "tick-internal.h"

Expand Down
1 change: 0 additions & 1 deletion kernel/time/tick-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <linux/percpu.h>
#include <linux/profile.h>
#include <linux/sched.h>
#include <linux/tick.h>

#include <asm/irq_regs.h>

Expand Down
5 changes: 5 additions & 0 deletions kernel/time/tick-internal.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*
* tick internal variable and functions used by low/high res code
*/
#include <linux/hrtimer.h>
#include <linux/tick.h>

#define TICK_DO_TIMER_NONE -1
#define TICK_DO_TIMER_BOOT -2
Expand Down Expand Up @@ -132,3 +134,6 @@ static inline int tick_device_is_functional(struct clock_event_device *dev)
{
return !(dev->features & CLOCK_EVT_FEAT_DUMMY);
}

extern void do_timer(unsigned long ticks);
extern seqlock_t xtime_lock;
1 change: 0 additions & 1 deletion kernel/time/tick-oneshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <linux/percpu.h>
#include <linux/profile.h>
#include <linux/sched.h>
#include <linux/tick.h>

#include "tick-internal.h"

Expand Down
1 change: 0 additions & 1 deletion kernel/time/tick-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <linux/percpu.h>
#include <linux/profile.h>
#include <linux/sched.h>
#include <linux/tick.h>
#include <linux/module.h>

#include <asm/irq_regs.h>
Expand Down

0 comments on commit e2830b5

Please sign in to comment.