Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jun 2010 15:41:49 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        svn-src-head@freebsd.org, Alexander Motin <mav@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org
Subject:   Re: svn commit: r208988 - in head/sys: kern sys
Message-ID:  <20100611124149.GD13238@deviant.kiev.zoral.com.ua>
In-Reply-To: <201006110810.40295.jhb@freebsd.org>
References:  <201006101614.o5AGE5Zh099383@svn.freebsd.org> <20100611083137.GA2401@deviant.kiev.zoral.com.ua> <201006110810.40295.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--+KJYzRxRHjYqLGl5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Jun 11, 2010 at 08:10:40AM -0400, John Baldwin wrote:
> On Friday 11 June 2010 4:31:37 am Kostik Belousov wrote:
> > On Thu, Jun 10, 2010 at 04:14:05PM +0000, Alexander Motin wrote:
> > > Author: mav
> > > Date: Thu Jun 10 16:14:05 2010
> > > New Revision: 208988
> > > URL: http://svn.freebsd.org/changeset/base/208988
> > >=20
> > > Log:
> > >   Store interrupt trap frame into struct thread. It allows interrupt=
=20
> handler
> > >   to obtain both trap frame and opaque argument submitted on registrc=
tion.
> > >   After kernel and all drivers get used to it, legacy hack can be rem=
oved.
> > >  =20
> > >   Reviewed by:	jhb@
> > Just curious, why td_frame is not enough for your usage ? I believe td_=
frame
> > is currently set only by traps and syscalls, and copied on forks.
>=20
> td_frame is not set on a nested interrupt.  Thus, if you use td_frame and=
 get=20
> an interrupt while in a syscall, statclock() would account the time as a =
user=20
> tick instead of a system tick.
>=20
> Put another way, td_frame always references the user --> system
> trapframe, but td_intr_frame will reference the most recent trapframe
> on the stack.

I mean, save old td_frame on the interrupt, and assign interrupt trap
frame to td_frame. I.e., do what r208988, but replace td_intr_frame
with td_frame.

--+KJYzRxRHjYqLGl5
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkwSLw0ACgkQC3+MBN1Mb4h/hQCgpq03ZshL4q58ZdboSfkPaGch
qy8An0R+cwZEllslx7aZWH8YYxixfcdq
=9wgW
-----END PGP SIGNATURE-----

--+KJYzRxRHjYqLGl5--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100611124149.GD13238>