From owner-cvs-src@FreeBSD.ORG Tue Sep 19 19:48:23 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A6FA516A407; Tue, 19 Sep 2006 19:48:23 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5A5343D5E; Tue, 19 Sep 2006 19:48:20 +0000 (GMT) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id 5F0B55DF7; Tue, 19 Sep 2006 23:48:19 +0400 (MSD) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id 56A635DF0; Tue, 19 Sep 2006 23:48:19 +0400 (MSD) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id k8JJmJNA023437; Tue, 19 Sep 2006 23:48:19 +0400 (MSD) (envelope-from ru) Date: Tue, 19 Sep 2006 23:48:19 +0400 From: Ruslan Ermilov To: Maksim Yevmenkin , Marius Strobl Message-ID: <20060919194819.GA23360@rambler-co.ru> References: <200609191303.k8JD3AHl050783@repoman.freebsd.org> <20060919190645.GA23068@rambler-co.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/kbdmux kbdmux.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2006 19:48:23 -0000 --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 19, 2006 at 12:36:38PM -0700, Maksim Yevmenkin wrote: > nope, same crash. the only thing that seems to help is to reverting > back to (int *) cast just like other keyboard drivers do. then it > works. >=20 > i'm in the process of getting amd64 snapshot iso to try it on a couple > of boxes. if it will work then i'm going to back (int *) -> (intptr_t > *) changes introduced in rev 1.8. >=20 Why? amd64 and i386 are unaffected (both of my i386 and amd64 work with the committed revision), and on sparc64 we need to find a proper fix. It cannot work properly with (intptr_t *) removed as demonstrated by the test program I sent to you. Here it's again for reference: : $ cat Makefile : PROG=3D bubu : NO_MAN=3D : SRCS=3D main.c ioctl.c : WARNS?=3D3 :=20 : .include : $ cat main.c : #include :=20 : int ioctl(int, u_long, ...); :=20 : int : main(void) : { :=20 : ioctl(1, 2, 3); : return (0); : } : $ cat ioctl.c : #include : #include :=20 : void ioctl(int, u_long, caddr_t); :=20 : /* : * This emulates what kernel's ioctl() does with IOC_VOID : * type ioctls. : */ : void : ioctl(int fd, u_long req, caddr_t argp) : { : caddr_t data =3D (void *)&argp; :=20 : printf("fd=3D%d req=3D%lu ", fd, req); : printf("(int)(*(intptr_t *)data)=3D%d ", (int)(*(intptr_t *)data)= ); : printf("*(int *)data=3D%d\n", *(int *)data); : } On sparc64, it prints: fd=3D1 req=3D2 (int)(*(intptr_t *)data)=3D3 *(int *)data=3D0 On i386 and amd64, it prints: fd=3D1 req=3D2 (int)(*(intptr_t *)data)=3D3 *(int *)data=3D3 Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --GvXjxJ+pjyke8COw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFEEmDqRfpzJluFF4RAisVAKCYk1wSzIxOGxIvAeekm6xaaLn+eQCcDuXE 9dPELCSpIH8lahnhin0VCR0= =W9Zl -----END PGP SIGNATURE----- --GvXjxJ+pjyke8COw--