Date: Fri, 26 Mar 2010 13:49:25 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Alexander Leidinger <netchild@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205683 - head/sys/compat/linprocfs Message-ID: <20100326114925.GS2415@deviant.kiev.zoral.com.ua> In-Reply-To: <201003261143.o2QBhFhK034688@svn.freebsd.org> References: <201003261143.o2QBhFhK034688@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--R+WA+n3pAWWgNWUs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 26, 2010 at 11:43:15AM +0000, Alexander Leidinger wrote: > Author: netchild > Date: Fri Mar 26 11:43:15 2010 > New Revision: 205683 > URL: http://svn.freebsd.org/changeset/base/205683 >=20 > Log: > Fix some bogus values in linprocfs. > =20 > Submitted by: Petr Salinger <Petr.Salinger@seznam.cz> > Verified on: GNU/kFreeBSD debian 8.0-1-686 (by submitter) > PR: 144584 >=20 > Modified: > head/sys/compat/linprocfs/linprocfs.c >=20 > Modified: head/sys/compat/linprocfs/linprocfs.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/compat/linprocfs/linprocfs.c Fri Mar 26 11:33:12 2010 (r2056= 82) > +++ head/sys/compat/linprocfs/linprocfs.c Fri Mar 26 11:43:15 2010 (r2056= 83) > @@ -110,13 +110,36 @@ __FBSDID("$FreeBSD$"); > /* > * Various conversion macros > */ > + > +/* The LINUX_USER_HZ is assumed 100 for now */ > + > +#if defined(__i386__) && defined(__GNUCLIKE_ASM) > +/* we need intermediate result as 64 bit, otherwise it overflows too ear= ly */ > +#define DO64_MULDIV(v,m,d) \ > +({ \ > + unsigned long rv0; \ > + unsigned long rv1; \ > + __asm__ __volatile__( \ > + "mull %1\n\t" \ > + "divl %2\n\t" \ > + :"=3Da" (rv0), "=3Dd" (rv1) \ > + :"r" (d), "0" (v), "1" (m) \ > + :"cc" ); \ > + rv0; \ > +}) Why it is impossible to express the calculation in C ? --R+WA+n3pAWWgNWUs Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkusn0QACgkQC3+MBN1Mb4ho4wCg1UBNY2v9VC6QDpzHGFv7RHqH RYoAoNU3Z4R5BNy8HQjeuTjWtm8E1ibC =JYT5 -----END PGP SIGNATURE----- --R+WA+n3pAWWgNWUs--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100326114925.GS2415>