search for: set_time_scale

Displaying 2 results from an estimated 2 matches for "set_time_scale".

2007 Oct 11
5
cpufreq: weird bug in set_time_scale
On my test machine, in set_time_scale(), the following code: ts->mul_frac = div_frac(MILLISECS(1000), tps32); crashes with a division by zero error if tps32 == 1000000000d. Unfortunately, tps32 is often that value. Does anyone know why this happens? I''ve resolved it temporarily by checking for tps32 == 1000000000 and...
2007 May 15
3
[PATCH 1/12] Add suspend/resume to devices owned by Xen
...@ -312,17 +322,33 @@ static u64 read_pit_count(void) return pit_counter64 + (u16)(pit_stamp - pit_read_counter()); } -static void init_pit(void) -{ - read_platform_count = read_pit_count; - +static int init_pit(void) +{ pit_overflow(); platform_timer_stamp = pit_counter64; set_time_scale(&platform_timer_scale, CLOCK_TICK_RATE); printk("Platform timer is %s PIT\n", freq_string(CLOCK_TICK_RATE)); using_pit = 1; -} + return 1; +} + +static void resume_pit(void) +{ + unsigned long flags; + + spin_lock_irqsave(&platform_timer_lock, flags); + pla...