Commit 67fbc534 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Be verbose about the ia32 time source

From: john stultz <johnstul@us.ibm.com>

The patch arranges for each timesource type to have a name, and uses that to
tell the user which timesource is in use at bootup time.
parent 9c8c9492
...@@ -342,6 +342,8 @@ void __init hpet_time_init(void) ...@@ -342,6 +342,8 @@ void __init hpet_time_init(void)
} }
cur_timer = select_timer(); cur_timer = select_timer();
printk(KERN_INFO "Using %s for high-res timesource\n",cur_timer->name);
time_init_hook(); time_init_hook();
} }
#endif #endif
...@@ -364,5 +366,7 @@ void __init time_init(void) ...@@ -364,5 +366,7 @@ void __init time_init(void)
wall_to_monotonic.tv_nsec = -xtime.tv_nsec; wall_to_monotonic.tv_nsec = -xtime.tv_nsec;
cur_timer = select_timer(); cur_timer = select_timer();
printk(KERN_INFO "Using %s for high-res timesource\n",cur_timer->name);
time_init_hook(); time_init_hook();
} }
...@@ -253,6 +253,7 @@ static void delay_cyclone(unsigned long loops) ...@@ -253,6 +253,7 @@ static void delay_cyclone(unsigned long loops)
/* cyclone timer_opts struct */ /* cyclone timer_opts struct */
struct timer_opts timer_cyclone = { struct timer_opts timer_cyclone = {
.name = "cyclone",
.init = init_cyclone, .init = init_cyclone,
.mark_offset = mark_offset_cyclone, .mark_offset = mark_offset_cyclone,
.get_offset = get_offset_cyclone, .get_offset = get_offset_cyclone,
......
...@@ -178,6 +178,7 @@ static int __init init_hpet(char* override) ...@@ -178,6 +178,7 @@ static int __init init_hpet(char* override)
/* tsc timer_opts struct */ /* tsc timer_opts struct */
struct timer_opts timer_hpet = { struct timer_opts timer_hpet = {
.name = "hpet",
.init = init_hpet, .init = init_hpet,
.mark_offset = mark_offset_hpet, .mark_offset = mark_offset_hpet,
.get_offset = get_offset_hpet, .get_offset = get_offset_hpet,
......
...@@ -36,6 +36,7 @@ static void delay_none(unsigned long loops) ...@@ -36,6 +36,7 @@ static void delay_none(unsigned long loops)
/* tsc timer_opts struct */ /* tsc timer_opts struct */
struct timer_opts timer_none = { struct timer_opts timer_none = {
.name = "none",
.init = init_none, .init = init_none,
.mark_offset = mark_offset_none, .mark_offset = mark_offset_none,
.get_offset = get_offset_none, .get_offset = get_offset_none,
......
...@@ -149,6 +149,7 @@ static unsigned long get_offset_pit(void) ...@@ -149,6 +149,7 @@ static unsigned long get_offset_pit(void)
/* tsc timer_opts struct */ /* tsc timer_opts struct */
struct timer_opts timer_pit = { struct timer_opts timer_pit = {
.name = "pit",
.init = init_pit, .init = init_pit,
.mark_offset = mark_offset_pit, .mark_offset = mark_offset_pit,
.get_offset = get_offset_pit, .get_offset = get_offset_pit,
......
...@@ -472,6 +472,7 @@ __setup("notsc", tsc_setup); ...@@ -472,6 +472,7 @@ __setup("notsc", tsc_setup);
/* tsc timer_opts struct */ /* tsc timer_opts struct */
struct timer_opts timer_tsc = { struct timer_opts timer_tsc = {
.name = "tsc",
.init = init_tsc, .init = init_tsc,
.mark_offset = mark_offset_tsc, .mark_offset = mark_offset_tsc,
.get_offset = get_offset_tsc, .get_offset = get_offset_tsc,
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
* last timer intruupt. * last timer intruupt.
*/ */
struct timer_opts{ struct timer_opts{
char* name;
int (*init)(char *override); int (*init)(char *override);
void (*mark_offset)(void); void (*mark_offset)(void);
unsigned long (*get_offset)(void); unsigned long (*get_offset)(void);
......
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