2 small patches for pciaccess build of nv driver

Alan Coopersmith Alan.Coopersmith at Sun.COM
Fri May 9 15:31:47 PDT 2008


Attached are two small changes I made today getting nv to run in my
Xorg master server with libpciaccess on Solaris that helped me, but
I wasn't sure if I fixed them in the best way, so haven't pushed to
the git master.

The first just fixes the READ_LONG macro to work with Sun compilers,
which apparently don't allow ({}) nesting that gcc does.

The second catches when pci_device_map_range fails and prints the
error - it should probably do more in this case.   I added this
tracing down a segfault later in this function - it turned out to
be a bug in the Solaris code in libpciaccess that made map_range
fail - the nv driver should probably stop here when it fails instead
of going on to segfault later when it tries to read from the memory
that wasn't mapped, but I wasn't sure how best to handle that short
of just calling FatalError() - at least this way there will be a
hint in the log just before the stack trace.

-- 
	-Alan Coopersmith-           alan.coopersmith at sun.com
	 Sun Microsystems, Inc. - X Window System Engineering

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Fix-pciaccess-READ_LONG-to-work-with-Sun-compilers.txt
URL: <http://lists.x.org/archives/xorg/attachments/20080509/6fae868b/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0002-Print-error-message-when-pci_device_map_range-fails.txt
URL: <http://lists.x.org/archives/xorg/attachments/20080509/6fae868b/attachment-0001.txt>


More information about the xorg mailing list