Port-macppc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Patch for sys/arch/powerpc/oea/ofwoea_machdep.c
On 1/29/09, Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost> wrote:
> [cc'ed port-powerpc instead of current-users]
>
> wgalazka.dev%gmail.com@localhost wrote:
> > --- sys/arch/powerpc/oea/org/ofwoea_machdep.c 2008-12-01 04:09:42 +0000
> > +++ sys/arch/powerpc/oea/ofwoea_machdep.c 2008-03-17 08:26:52 +0000
> > @@ -1,4 +1,4 @@
> > -/* $NetBSD: ofwoea_machdep.c,v 1.16 2008/11/30 18:21:35 martin Exp $ */
> > +/* $NetBSD: ofwoea_machdep.c,v 1.16 2009/01/15 18:21:35 martin Exp $ */
> >
> > /*-
> > * Copyright (c) 2007 The NetBSD Foundation, Inc.
> > @@ -280,7 +280,12 @@
> > ns_per_tick = 1000000000 / ticks_per_sec;
> > ticks_per_intr = ticks_per_sec / hz;
> > cpu_timebase = ticks_per_sec;
> > - curcpu()->ci_lasttb = mftbl();
> > +#if defined PPC_OEA601
> > + if ((mfpvr() >> 16) == MPC601)
> > + curcpu()->ci_lasttb = mfrtcl();
> > + else
> > +#endif
> > + curcpu()->ci_lasttb = mftbl();
> > mtspr(SPR_DEC, ticks_per_intr);
> > mtmsr(msr);
> > }
>
> powerpc/oea/pmap.c:mfrtcltbl() uses "mfrtcl() >> 7" for MPC601
> rather than mfrtcl() itself.
>
> Which is better for ci_lasttb?
If you check the coding of delay in sys/arch/powerpc/powerpc/clock.c then
+ curcpu()->ci_lasttb = mfrtcl();
makes more sense
Home |
Main Index |
Thread Index |
Old Index