[RFC] Option to disable mapping genrtc calls to ppc_md calls

Mark A. Greer mgreer at mvista.com
Wed Jan 19 05:58:25 EST 2005


Tom Rini wrote:

>On Tue, Jan 18, 2005 at 11:25:33AM -0500, Dan Malek wrote:
>  
>
>>On Jan 18, 2005, at 11:15 AM, Tom Rini wrote:
>>
>>    
>>
>>>On Mon, Jan 17, 2005 at 02:10:00PM -0700, Mark A. Greer wrote:
>>>      
>>>
>>>>There are 2 reasons to not use the ppc_md.get_rtc_time() et. al. 
>>>>interfaces:
>>>>1) They are called before the i2c driver is initialized and even 
>>>>loaded
>>>>if its a module.
>>>>        
>>>>
>>There are three reasons.  You don't want to use an I2c rtc clock at
>>all in these functions because they get can get called from the
>>clock interrupt to update the time in the rtc.  If it does happen to 
>>work,
>>it creates long latencies in the timer interrupt.  If the i2c requires 
>>an
>>interrupt, they system will crash or hang.
>>    
>>
>
>I think one of us wasn't clear.  I'm not arguing for nuking
>ppc_md.{get,set}_rtc_time(), I'm arguing for nuking
>get_rtc_time()/set_rtc_time() inlines from <asm-ppc/rtc.h> (which are
>used by drivers/char/genrtc.c) in favor of todc_time et al providing the
>functions for genrtc.  So all of the other places we use
>ppc_md.{get,set}_rtc_time() are unchanged.
>  
>

Ahh.  Okay, that's good but it should be done in drivers/rtc or 
something like and not just another arch specific solution.  I want to 
stress again that rtc chips typically have no care in the world what 
processor happens to be stuck on the board that they are also stuck on.  
There is no reason our software should either.

Mark




More information about the Linuxppc-dev mailing list