AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:
CFG:
PT:0
S:andy.sharp@lsi.com
RQ:
SSV:mhbs.lsil.com
NSV:
SSH:
R:<Bill.Fisher@lsi.com>,<Brian.Stark@lsi.com>,<Rendell.Fong@lsi.com>,<Larry.Scheer@lsi.com>,<Maxim.Kozlovsky@lsi.com>
MAID:2
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/LSI/INBOX	0	4BC4DDCB.1090707@lsi.com
X-Sylpheed-End-Special-Headers: 1
Date: Tue, 13 Apr 2010 16:20:34 -0700
From: Andrew Sharp <andy.sharp@lsi.com>
To: "Fisher, Bill" <Bill.Fisher@lsi.com>
Cc: "Stark, Brian" <Brian.Stark@lsi.com>, "Fong, Rendell"
 <Rendell.Fong@lsi.com>, "Scheer, Larry" <Larry.Scheer@lsi.com>, "Kozlovsky,
 Maxim" <Maxim.Kozlovsky@lsi.com>
Subject: Re: tuxrx Branch Change List 34077; eee-timer-api.[hc] specifics
Message-ID: <20100413162034.507ee39b@ripper.onstor.net>
In-Reply-To: <4BC4DDCB.1090707@lsi.com>
References: <4BC38206.8030703@lsi.com>
	<20100412180816.62124502@ripper.onstor.net>
	<4BC4D116.2060505@lsi.com>
	<4BC4DDCB.1090707@lsi.com>
Organization: LSI
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Tue, 13 Apr 2010 15:10:35 -0600 William Fisher <bill.fisher@lsi.com>
wrote:

> William Fisher wrote:
> > Andrew Sharp wrote:
> > 
> >>OK.  If it's as close as you say, then priority-wise this can
> >>certainly wait.  The timer-*.[ch] files need reflect all the
> >>updates of the ones in nfx-tree,
> > 
> > 
> > 	I will look at those specific files. We are running the
> > 	one's sin the kernel tree and NOT those under
> > 	nfx-tree/code/neteee2/eee-timer*. Hence I think
> > 	the code under code/netee2 that you copied
> > 	from my kernel tree are long out-of-date.
> > 
> > 	Hence we have all of the latest to the kernel
> > 	which is running with RMC.
> >  >
> >   but this can come after the scoping/architect work and
> > 
> >>getting these two changelists in.
> >>
> > 
> > 	we agree.
> > 
> > 	I will send take 2 out shortly
> > 	on the change list for 34077 and 34432
> > 
> > 
> 
> The major difference in the .c file are:
> 
> Your version
> ============
> > 
> eee_rtcGMT(eeeGMT_t *clock)
> {
> 	struct timespec boot_clock;
> 	struct timespec mono_clock;
> 	unsigned long s;
> 
> #ifdef NFX_DEBUG_TIME_USE
>      NFX_ASSERT(eee_rtcSSCTimeInitted());
> #endif
> 	do {
> 		s = read_seqbegin(&xtime_lock);
> 		getnstimeofday(&boot_clock);
> 		mono_clock = wall_to_monotonic;
> 	} while (read_seqretry(&xtime_lock, s));
> 
> 	set_normalized_timespec(&boot_clock,
> 		boot_clock.tv_sec + mono_clock.tv_sec,
> 		boot_clock.tv_nsec + mono_clock.tv_nsec);
> 
>      eee_tvAdd(&boot_clock, &sscGMTTimeDiff, clock);
>      return;
> }
> 
> the running kernel version:
> 
> void
> eee_rtcGMT(eeeGMT_t *clock)
> {
>      eeeRTC_t now;
>      eeeGMT_t nowTV;
> 
> #ifdef NFX_DEBUG_TIME_USE
>      NFX_ASSERT(eee_rtcSSCTimeInitted());
> #endif
> 
>      eee_rtc(&now);
>      eee_rtcToTV(&now, &nowTV);
>      eee_tvAdd(&nowTV, &sscGMTTimeDiff, clock);
> 
>      return;
> }
> 
> The kernel version has the cruft:
> 
> define LIB_GETBUF(buf)   for string manipulation
> 
> both have the number of days/month array which
> I think could be removed.
> 
> ===================
> 
> With respect to the eee-timer-api.h header file:
> 
> The major differences are centered on in-line
> versus procedures. The kernel version has exports
> for all the various procedures used by the
> modules, which nfx-tree/code/net/neteee2 does not
> which is required along with procedures
> implementing those interfaces.
> 
> Your version removed the #if defined(TX3927)
> surrounding the global variable initialization,
> which still have the same values in both.
> 
> The kernel still uses the variables
> count_per_usec and count_per-sec
> as does your version with the same values.
> 
> ==========================
> 
> Hence the major code difference is the
> eee_rtcGMT() procedure between the two.

eee_rtc() is completely different between the two, and the heart of the
whole system.  that function working right, and being portable for
phase two, is very important.  the do_getimeofday() thing is not
monotonic, and therefore doesn't work.


