From owner-freebsd-current@FreeBSD.ORG Mon Sep 9 22:49:34 2013 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 45C5791D; Mon, 9 Sep 2013 22:49:34 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 061C02971; Mon, 9 Sep 2013 22:49:33 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1VJAGs-000Nvv-Uj; Mon, 09 Sep 2013 22:49:27 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r89MnNJL002218; Mon, 9 Sep 2013 16:49:23 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19FLDb8X/Nv6wyRFcrUD3X/ Subject: Re: CURRENT r255426: x11/nvidia-driver: nvidia_subr.c:835:46: error: too few arguments to function call, expected 10, have 9 (VM_PROT_READ | VM_PROT_WRITE), 0); From: Ian Lepore To: "O. Hartmann" In-Reply-To: <20130910004240.70bc281f@thor.walstatt.dyndns.org> References: <20130909223748.61dd8859@thor.walstatt.dyndns.org> <20130910000237.6b5604da@nonamehost.local> <20130909231713.34ebfbdd@thor.walstatt.dyndns.org> <20130910002405.4aa701d0@nonamehost.local> <20130910004240.70bc281f@thor.walstatt.dyndns.org> Content-Type: text/plain; charset="koi8-r" Date: Mon, 09 Sep 2013 16:49:23 -0600 Message-ID: <1378766963.1111.579.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by damnhippie.dyndns.org id r89MnNJL002218 Cc: Ivan Klymenko , FreeBSD CURRENT , FreeBSD Ports X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2013 22:49:34 -0000 On Tue, 2013-09-10 at 00:42 +0200, O. Hartmann wrote: > On Tue, 10 Sep 2013 00:24:05 +0300 > Ivan Klymenko wrote: >=20 > > =F7 Mon, 9 Sep 2013 23:17:13 +0200 > > "O. Hartmann" =D0=C9=DB=C5=D4: > >=20 > > > On Tue, 10 Sep 2013 00:02:37 +0300 > > > Ivan Klymenko wrote: > > >=20 > > > > =F7 Mon, 9 Sep 2013 22:37:48 +0200 > > > > "O. Hartmann" =D0=C9=DB=C5=D4: > > > > > /usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.2.1= 8/out/freebsd.amd64/release/bin/src/vboxdrv/r0drv/freebsd/alloc-r0drv-fre= ebsd.c:83:76: > > > > > error: too few arguments to function call, expected 10, have 9 > > > > > cbAllocated, TRUE, VM_PROT_ALL, VM_PROT_ALL, 0); ^ > > > > > @/vm/vm_map.h:368:1: note: 'vm_map_find' declared here int > > > > > vm_map_find(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, > > > > > vm_size_t, > > > >=20 > > > > Try the following changes: > > > > int rc =3D vm_map_find(kernel_map, pVmObject, 0, &Addr, > > > > --- cbAllocated, TRUE, VM_PROT_ALL, > > > > VM_PROT_ALL, 0); +++ cbAllocated, 0, > > > > VMFS_OPTIMAL_SPACE, VM_PROT_ALL, VM_PROT_ALL, 0); > > > >=20 > > > > for Nvidia driver need to make similar changes... > > > The man page of vm_map_find() says the last parameter is of int, > > > named int cow. On the hurry, I didn't find any explanation of that > > > parameter. Setting it to "0" (zero) also in the nvidia_subr.c makes > > > the driver compile again. > > >=20 > > > But simply filling in a int zero is a bit strange without knowing > > > what to do, isn't it? > > >=20 > > > Thanks anyway, > > >=20 > > > Oliver > >=20 > > This commit you to find an appropriate example ... > > http://docs.freebsd.org/cgi/getmsg.cgi?fetch=3D291456+0+current/svn-s= rc-head > > And in this case, the driver Nvidia really need to specify 0 in place > > of the sixth argument ... > > but I'm not sure at 100% :) >=20 > I have a patch attached for the x11/nvidia-driver Makefile. It doesn't > work and I loose hairs due to not knowing why. >=20 > When issuing the following command sequence on the console: >=20 > cd /usr/ports/x11/nvidia-driver > make clean extract > sed -i -e '/(VM_PROT_READ | VM_PROT_WRITE), 0);$/s/0);$/0, 0);/g' \ > work/NVIDIA-FreeBSD-x86_64-325.15/src/nvidia_subr.c >=20 >=20 > and check then line 835 (the corrupt one) in file=20 > work/NVIDIA-FreeBSD-x86_64-325.15/src/nvidia_subr.c, >=20 > I see this BEFORE: >=20 > status =3D vm_map_find(kernel_map, at->object, (i * PAGE_SIZE), > &virtual_address, size, VMFS_ANY_SPACE, > (VM_PROT_READ | VM_PROT_WRITE), > =3D=3D=3D(835)>> (VM_PROT_READ | VM_PROT_WRITE), 0); >=20 >=20 > and I see this AFTER the sed'ed replacement: >=20 > status =3D vm_map_find(kernel_map, at->object, (i * PAGE_SIZE), > &virtual_address, size, VMFS_ANY_SPACE, > (VM_PROT_READ | VM_PROT_WRITE), > =3D=3D=3D(835)>> (VM_PROT_READ | VM_PROT_WRITE), 0, 0); >=20 > BUT: Using the patch (see attached, please apply to > x11/nvidia-driver/Makefile) gives me an error in x11/nvidia-driver: >=20 > make clean patch >=20 > =3D=3D=3D> Cleaning for nvidia-driver-325.15 > =3D=3D=3D> License NVIDIA accepted by the user > =3D=3D=3D> Found saved configuration for nvidia-driver-325.08_1 > =3D=3D=3D> nvidia-driver-325.15 depends on file: /usr/local/sbin/pkg = - found > =3D=3D=3D> Fetching all distfiles required by nvidia-driver-325.15 for > building > =3D=3D=3D> Extracting for nvidia-driver-325.15 > =3D> SHA256 Checksum OK for NVIDIA-FreeBSD-x86_64-325.15.tar.gz. > =3D=3D=3D> Patching for nvidia-driver-325.15 > sed: 1: "/(VM_PROT_READ | VM_PRO ...": invalid command code 0 > *** Error code 1 >=20 > The Shell/make should be able to substitute within a single-quotet > command to sed, but the error message reports differently. >=20 > Do not be confused about the driver revision I use. I tried the > official one (319.XX) as well and it is not working the very same way > and the patch won't either. >=20 > Oliver I don't know about the sed error, but I think the change you're trying to make is wrong. The new '0' parameter to vm_map_find() isn't added at the end, it goes after the size parameter. -- Ian