* Re: [MIPS] Use generic NTP code for all MIPS platforms
[not found] <S20023068AbXHMO0W/20070813142622Z+9352@ftp.linux-mips.org>
@ 2007-08-13 15:32 ` Atsushi Nemoto
2007-08-13 15:56 ` Franck Bui-Huu
2007-08-14 10:29 ` Ralf Baechle
0 siblings, 2 replies; 7+ messages in thread
From: Atsushi Nemoto @ 2007-08-13 15:32 UTC (permalink / raw)
To: linux-mips
On Mon, 13 Aug 2007 15:26:17 +0100, linux-mips@linux-mips.org wrote:
> Author: Ralf Baechle <ralf@linux-mips.org> Mon Aug 13 15:26:12 2007 +0100
> Commit: 4c1ebc8bc02fa6f30ccddacca7552dc2c8686792
> Gitweb: http://www.linux-mips.org/g/linux/4c1ebc8b
> Branch: master
>
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
With this, we now have this in Kconfig:
config GENERIC_CMOS_UPDATE
bool
default y
I think there are no point using GENERIC_CMOS_UPDATE for users of the
new-style RTC_CLASS drivers or platforms with no RTC.
There are some possible ways:
A) Make default of GENERIC_CMOS_UPDATE to "n" and select it explicitly
on platforms which need it.
B) Make default of GENERIC_CMOS_UPDATE depends on CONFIG_RTC_CLASS.
C) set no_sync_cmos_clock to 0 on time_init() if rtc_mips_set_mmss was
NULL and rtc_mips_set_time and was null_rtc_set_time.
And combinations ot variations of those...
Which are preferred? Any comments?
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [MIPS] Use generic NTP code for all MIPS platforms
2007-08-13 15:32 ` [MIPS] Use generic NTP code for all MIPS platforms Atsushi Nemoto
@ 2007-08-13 15:56 ` Franck Bui-Huu
2007-08-13 17:02 ` Atsushi Nemoto
2007-08-14 10:29 ` Ralf Baechle
1 sibling, 1 reply; 7+ messages in thread
From: Franck Bui-Huu @ 2007-08-13 15:56 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: linux-mips
Hi,
Atsushi Nemoto wrote:
> With this, we now have this in Kconfig:
>
> config GENERIC_CMOS_UPDATE
> bool
> default y
>
> I think there are no point using GENERIC_CMOS_UPDATE for users of the
> new-style RTC_CLASS drivers or platforms with no RTC.
>
But how the new-style RTC drivers get updated ?
Franck
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [MIPS] Use generic NTP code for all MIPS platforms
2007-08-13 15:56 ` Franck Bui-Huu
@ 2007-08-13 17:02 ` Atsushi Nemoto
2007-08-13 18:51 ` Franck Bui-Huu
0 siblings, 1 reply; 7+ messages in thread
From: Atsushi Nemoto @ 2007-08-13 17:02 UTC (permalink / raw)
To: vagabon.xyz; +Cc: linux-mips
On Mon, 13 Aug 2007 17:56:38 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> > I think there are no point using GENERIC_CMOS_UPDATE for users of the
> > new-style RTC_CLASS drivers or platforms with no RTC.
>
> But how the new-style RTC drivers get updated ?
IIUC for now there are no kernel-mode NTP syncronization for new style
RTC drivers. (Please correct me if I was wrong)
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [MIPS] Use generic NTP code for all MIPS platforms
2007-08-13 17:02 ` Atsushi Nemoto
@ 2007-08-13 18:51 ` Franck Bui-Huu
2007-08-14 14:12 ` Atsushi Nemoto
0 siblings, 1 reply; 7+ messages in thread
From: Franck Bui-Huu @ 2007-08-13 18:51 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: linux-mips
Atsushi Nemoto wrote:
> On Mon, 13 Aug 2007 17:56:38 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
>>> I think there are no point using GENERIC_CMOS_UPDATE for users of the
>>> new-style RTC_CLASS drivers or platforms with no RTC.
>> But how the new-style RTC drivers get updated ?
>
> IIUC for now there are no kernel-mode NTP syncronization for new style
> RTC drivers. (Please correct me if I was wrong)
>
Well a more general question could be how is the RTC class layer
supposed to interact with the kernel ?
Should RTC class layer implement a general service to update/read the
RTC, IOW should it implement {read,update}_persistent_clock() ?
Franck
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [MIPS] Use generic NTP code for all MIPS platforms
2007-08-13 15:32 ` [MIPS] Use generic NTP code for all MIPS platforms Atsushi Nemoto
2007-08-13 15:56 ` Franck Bui-Huu
@ 2007-08-14 10:29 ` Ralf Baechle
1 sibling, 0 replies; 7+ messages in thread
From: Ralf Baechle @ 2007-08-14 10:29 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: linux-mips
On Tue, Aug 14, 2007 at 12:32:42AM +0900, Atsushi Nemoto wrote:
> config GENERIC_CMOS_UPDATE
> bool
> default y
>
> I think there are no point using GENERIC_CMOS_UPDATE for users of the
> new-style RTC_CLASS drivers or platforms with no RTC.
Platforms with no RTC are easy to handle, just throw in a dummy
implementation of all the RTC functions. Or if you just don't want
RTC updates, set no_sync_cmos_clock = 1.
Several platforms had their own timer interrupt handlers overriding the
generic interrupt handler and breaking the NTP. In most cases I doubt
this was a design decission so I had to go for a solution that makes
NTP work by default.
> There are some possible ways:
>
> A) Make default of GENERIC_CMOS_UPDATE to "n" and select it explicitly
> on platforms which need it.
>
> B) Make default of GENERIC_CMOS_UPDATE depends on CONFIG_RTC_CLASS.
>
> C) set no_sync_cmos_clock to 0 on time_init() if rtc_mips_set_mmss was
> NULL and rtc_mips_set_time and was null_rtc_set_time.
>
> And combinations ot variations of those...
You may want to look at my time changes. One of the patches turns all
the excessive function pointer business we have in the MIPS time code
upside down in preparation for the dyntick code.
Ralf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [MIPS] Use generic NTP code for all MIPS platforms
2007-08-13 18:51 ` Franck Bui-Huu
@ 2007-08-14 14:12 ` Atsushi Nemoto
2007-08-14 15:26 ` Maciej W. Rozycki
0 siblings, 1 reply; 7+ messages in thread
From: Atsushi Nemoto @ 2007-08-14 14:12 UTC (permalink / raw)
To: vagabon.xyz; +Cc: linux-mips
On Mon, 13 Aug 2007 20:51:39 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> Well a more general question could be how is the RTC class layer
> supposed to interact with the kernel ?
>
> Should RTC class layer implement a general service to update/read the
> RTC, IOW should it implement {read,update}_persistent_clock() ?
Some difficulties are:
* timekeeping subsystem calls {read,update}_persistent_clock() with
irq-disabled. But most RTC class routines might sleep.
* RTC class can have multiple RTCs on the system.
* There are already some conflicting features in RTC class ---
rtc_suspend and rtc_resume try to adjust the wall clock.
* IIRC Some people said "NTP sync can be done all in userland" ;-)
Does anybody know if there was "general consensus" on this topic?
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [MIPS] Use generic NTP code for all MIPS platforms
2007-08-14 14:12 ` Atsushi Nemoto
@ 2007-08-14 15:26 ` Maciej W. Rozycki
0 siblings, 0 replies; 7+ messages in thread
From: Maciej W. Rozycki @ 2007-08-14 15:26 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: vagabon.xyz, linux-mips
On Tue, 14 Aug 2007, Atsushi Nemoto wrote:
> Some difficulties are:
>
> * timekeeping subsystem calls {read,update}_persistent_clock() with
> irq-disabled. But most RTC class routines might sleep.
>
> * RTC class can have multiple RTCs on the system.
>
> * There are already some conflicting features in RTC class ---
> rtc_suspend and rtc_resume try to adjust the wall clock.
>
> * IIRC Some people said "NTP sync can be done all in userland" ;-)
NTP sync in the kernel disturbs the timer interrupt with some setups,
affecting the dispersion and thus the quality of timekeeping horribly.
Maciej
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-08-14 15:26 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <S20023068AbXHMO0W/20070813142622Z+9352@ftp.linux-mips.org>
2007-08-13 15:32 ` [MIPS] Use generic NTP code for all MIPS platforms Atsushi Nemoto
2007-08-13 15:56 ` Franck Bui-Huu
2007-08-13 17:02 ` Atsushi Nemoto
2007-08-13 18:51 ` Franck Bui-Huu
2007-08-14 14:12 ` Atsushi Nemoto
2007-08-14 15:26 ` Maciej W. Rozycki
2007-08-14 10:29 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox