Sekhar,

I made some searches on the internet. The schedule_clock() must return a 
monotonous clock. One way to do this is to use cnt32_to_63() to convert the 
32bit clock count value to a 64bit value. I have tried this and it seems to 
work. I am just curious as to how this is working on other davinci platforms? 
So any response from you will be helpful.

unsigned long long notrace sched_clock(void)
 {
-       const cycle_t cyc = clocksource_davinci.read(&clocksource_davinci);
+       const cycle_t cyc = 
cnt32_to_63(clocksource_davinci.read(&clocksource_davinci)); 

Murali Karicheri
Software Design Engineer
email: [email protected]
Phone: (301) 407 9583


>> -----Original Message-----
>> From: Karicheri, Muralidharan
>> Sent: Thursday, December 15, 2011 4:20 PM
>> To: Nori, Sekhar
>> Cc: '[email protected]'; Chemparathy, Cyril
>> Subject: Log time stamp wraps around to 25
>> 
>> Sekhar,
>> 
>> On our new SoC that is a using davinci architecture in kernel, we are seeing
>> an issue in which the time stamp displayed by printk wraps around at about 
>> 25-
>> 26 seconds. We are using a timer clock frequency of 163.84MHz and uses 
>> timer64
>> for implementing clock event and clock source.
>> The cat /proc/interrupts shows that the event interrupts are happening at HZ
>> rate. Clock source max of 0xffffffff translates to about 25 secs.
>> So when prink calls the arch specific sched_clock(), the time stamp wraps
>> around at the max. If the weak sched_clock is used instead, then time stamp 
>> is
>> working fine (but lower resolution). There seems to be something missing that
>> mess up the time stamp. Have you seen this kind of behavior before and if so,
>> what could be the potential cause for this. We are using v3.1 from upstream
>> kernel repo.
>> 
>> You help will be highly appreciated.
>> 
>> Thanks.
>> 
>> Murali Karicheri
>> Software Design Engineer
>> email: [email protected]
>> Phone: (301) 407 9583
>> 

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to