linux-mips
[Top] [All Lists]

Re: time.c CP0_COMPARE

To: Jun Sun <jsun@mvista.com>
Subject: Re: time.c CP0_COMPARE
From: Ralf Baechle <ralf@linux-mips.org>
Date: Mon, 2 Sep 2002 18:30:53 +0200
Cc: Matthew Dharm <mdharm@momenco.com>, Linux-MIPS <linux-mips@linux-mips.org>
In-reply-to: <3D6E5C58.405@mvista.com>; from jsun@mvista.com on Thu, Aug 29, 2002 at 10:39:36AM -0700
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <NEBBLJGMNKKEEMNLHGAIEEKHCIAA.mdharm@momenco.com> <20020829142133.A3905@bacchus.dhis.org> <3D6E5C58.405@mvista.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.2.5.1i
On Thu, Aug 29, 2002 at 10:39:36AM -0700, Jun Sun wrote:

> Ralf Baechle wrote:

> >  c0_compare = c0_count + mips_counter_frequency / HZ.
> > 
> > That's what the individual boards are currently doing themselves though that
> > should be done in generic code.
> > 
>
> Good idea.
> 
> The attached patch attempts to set the first interrupt. It should be benign 
> even if a system is not using CPU counter as timer interrupt.
> 
> I also updated the time.README, including a new section about implementation 
> on a SMP machine.

Applied though I think that this should also be done via start_secondary
that is we'll need some per_cpu_time_init analog to per_cpu_trap_init.
Also of course your change makes some cleanup possible as the initialization
no happens twice for a bunch of platforms.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>