Subject: Re: timecounter patch for sgimips
To: None <rumble@ephemeral.org>
From: Garrett D'Amore <garrett_damore@tadpole.com>
List: port-sgimips
Date: 09/20/2006 09:24:50
Stephen M. Rumble wrote:
> Quoting Garrett D'Amore <garrett_damore@tadpole.com>:
>
>> Attached find a patch to convert sgimips to timecounter. The IP12
>> (mips1) does not get an accurate microtime, but it never had one
>> before.
Sorry I didn't respond to this earlier.
>
> Does GENERIC_IP12 compile at all? Won't microtime() be missing from
> those kernels since the mips3 clock code is conditional on MIPS3 being
> defined? Will they even link anymore? And, what does compiling in
> timecounters mean when there is no hardware timecounter support at
> all? I'm not familiar with the code, but I'm concerned about things
> being broken.
Yes. microtime is provided by kern_todr. IP12 microtime used a dumb
incrementer. It gets a better solution (resolution of a clocktick, plus
a dumb incrementer); nothing is broken. But it isn't any "better",
either. (Well that's not true, in this case, because at least you get a
1/Hz resolution timecounter by default.)
>
> Due to SGI playing games with the memory layout of nearly every new
> system, it is highly unlikely, if not impossible, for us to have
> kernels with both MIPS1 and MIPS3 defined. If there are any problems
> with MIPS1, I think it would be safe, albeit ugly, to conditionalise
> timecounters on MIPS3.
I wasn't aware of this. The code in there now allows for both.
>
> The real solution, I imagine, is to port i386's i8254 timecounter
> support, as that is what IP12 uses.
Well, if there is an i8254 in there, then yes, writing a tc framework
for it would be very, very good. I don't have hardware to test
against. Do you? (I might be willing to do the work if you will test.)
>
> Also, I don't see 'clkread' being removed from the platform struct.
Oops. It probably should have.
>
> Everything else looks okay to me, but I haven't any hardware at hand
> to test with. I imagine somebody here would be willing to boot a test
> kernel, though, should you make a GENERIC_IP2x available.
I can make test kernels for GENERIC_IP32, GENERIC_IP2x, and GENERIC_IP12
available, if people want them to test with.
>
> Thanks for doing this,
> Steve
No problems.
Btw, the sgimips tc stuff was committed a while ago (sorry I missed this
message!), but I'm more than happy to revisit things should people feel
the need.
-- Garrett
--
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134 Fax: 951 325-2191