rpms/libpciaccess/devel libpciaccess-kludge-wc-mmap.patch, NONE, 1.1 libpciaccess-fd-cache.patch, 1.1, 1.2 libpciaccess.spec, 1.11, 1.12 sources, 1.7, 1.8
Adam Jackson
ajax at fedoraproject.org
Thu Aug 28 17:59:29 UTC 2008
Author: ajax
Update of /cvs/pkgs/rpms/libpciaccess/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26760
Modified Files:
libpciaccess-fd-cache.patch libpciaccess.spec sources
Added Files:
libpciaccess-kludge-wc-mmap.patch
Log Message:
sync with F9
libpciaccess-kludge-wc-mmap.patch:
--- NEW FILE libpciaccess-kludge-wc-mmap.patch ---
>From b30d458202bc0304c705eb081b12ead860584bea Mon Sep 17 00:00:00 2001
From: Keith Packard <keithp at keithp.com>
Date: Wed, 16 Apr 2008 19:10:52 +0000
Subject: Kludge around linux bug and turn off write-through and cache-disable bits
When mmaping the PCI device, the kernel turns on the write-through and
cache-disable bits in the allocated PTEs. This disables write-combining mode
and dramatically reduces write bandwidth to the frame buffer. While that
should be fixed in the kernel, we'll kludge around it here by using mprotect
to rewrite the PTEs and get those bits turned off.
---
diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c
index 873dc02..78584d6 100644
--- a/src/linux_sysfs.c
+++ b/src/linux_sysfs.c
@@ -558,6 +558,9 @@ pci_device_linux_sysfs_map_range(struct pci_device *dev,
strerror(errno), errno);
/* err = errno;*/
}
+ /* KLUDGE ALERT -- rewrite the PTEs to turn off the CD and WT bits */
+ mprotect (map->memory, map->size, PROT_NONE);
+ mprotect (map->memory, map->size, PROT_READ|PROT_WRITE);
}
#endif
--
cgit v0.7.2-37-g538c
libpciaccess-fd-cache.patch:
Index: libpciaccess-fd-cache.patch
===================================================================
RCS file: /cvs/pkgs/rpms/libpciaccess/devel/libpciaccess-fd-cache.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- libpciaccess-fd-cache.patch 23 Jan 2008 18:45:55 -0000 1.1
+++ libpciaccess-fd-cache.patch 28 Aug 2008 17:58:59 -0000 1.2
@@ -1,16 +1,16 @@
-diff -up libpciaccess-20071031/src/linux_sysfs.c.cache libpciaccess-20071031/src/linux_sysfs.c
---- libpciaccess-20071031/src/linux_sysfs.c.cache 2007-10-23 09:19:36.000000000 -0400
-+++ libpciaccess-20071031/src/linux_sysfs.c 2008-01-22 19:23:12.000000000 -0500
-@@ -55,6 +55,8 @@
- #include "pciaccess_private.h"
- #include "linux_devmem.h"
+diff -up libpciaccess-0.10.3/src/linux_sysfs.c.cache libpciaccess-0.10.3/src/linux_sysfs.c
+--- libpciaccess-0.10.3/src/linux_sysfs.c.cache 2008-06-10 15:21:36.000000000 -0400
++++ libpciaccess-0.10.3/src/linux_sysfs.c 2008-08-28 13:56:28.000000000 -0400
+@@ -57,6 +57,8 @@
+
+ static void pci_device_linux_sysfs_enable(struct pci_device *dev);
+static void pci_device_linux_sysfs_destroy( void );
+
static int pci_device_linux_sysfs_read_rom( struct pci_device * dev,
void * buffer );
-@@ -74,7 +76,7 @@
+@@ -76,7 +78,7 @@ static int pci_device_linux_sysfs_write(
pciaddr_t * bytes_wrtten );
static const struct pci_system_methods linux_sysfs_methods = {
@@ -19,7 +19,7 @@
.destroy_device = NULL,
.read_rom = pci_device_linux_sysfs_read_rom,
.probe = pci_device_linux_sysfs_probe,
-@@ -362,6 +364,53 @@
+@@ -368,6 +370,53 @@ pci_device_linux_sysfs_read_rom( struct
return err;
}
@@ -73,7 +73,7 @@
static int
pci_device_linux_sysfs_read( struct pci_device * dev, void * data,
-@@ -378,23 +427,9 @@
+@@ -384,23 +433,9 @@ pci_device_linux_sysfs_read( struct pci_
*bytes_read = 0;
}
@@ -91,7 +91,7 @@
-
- fd = open( name, O_RDONLY );
- if ( fd == -1 ) {
-+ fd = open_config_fd( dev, O_RDONLY );
++ fd = open_config_fd( dev, O_RDWR );
+ if ( fd == -1 )
return errno;
- }
@@ -99,7 +99,7 @@
while ( temp_size > 0 ) {
const ssize_t bytes = pread64( fd, data_bytes, temp_size, offset );
-@@ -416,7 +451,6 @@
+@@ -422,7 +457,6 @@ pci_device_linux_sysfs_read( struct pci_
*bytes_read = size - temp_size;
}
@@ -107,7 +107,7 @@
return err;
}
-@@ -436,23 +470,9 @@
+@@ -442,23 +476,9 @@ pci_device_linux_sysfs_write( struct pci
*bytes_written = 0;
}
@@ -125,7 +125,7 @@
-
- fd = open( name, O_WRONLY );
- if ( fd == -1 ) {
-+ fd = open_config_fd( dev, O_WRONLY );
++ fd = open_config_fd( dev, O_RDWR );
+ if ( fd == -1 )
return errno;
- }
@@ -133,7 +133,7 @@
while ( temp_size > 0 ) {
const ssize_t bytes = pwrite64( fd, data_bytes, temp_size, offset );
-@@ -474,7 +494,6 @@
+@@ -480,7 +500,6 @@ pci_device_linux_sysfs_write( struct pci
*bytes_written = size - temp_size;
}
Index: libpciaccess.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libpciaccess/devel/libpciaccess.spec,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- libpciaccess.spec 6 Mar 2008 20:40:43 -0000 1.11
+++ libpciaccess.spec 28 Aug 2008 17:58:59 -0000 1.12
@@ -2,8 +2,8 @@
%define gitrev e392082abb5696c8837224da86cc0af4f21d7010
Name: libpciaccess
-Version: 0.10
-Release: 1%{?dist}
+Version: 0.10.3
+Release: 3%{?dist}
Summary: PCI access library
Group: System Environment/Libraries
@@ -18,6 +18,7 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: libpciaccess-fd-cache.patch
+Patch1: libpciaccess-kludge-wc-mmap.patch
BuildRequires: autoconf automake libtool pkgconfig
Requires: hwdata
@@ -38,6 +39,7 @@
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .cache
+%patch1 -p1 -b .wc
%build
#autoreconf -v --install
@@ -59,7 +61,7 @@
%defattr(-,root,root,-)
%doc COPYING AUTHORS ChangeLog
%{_libdir}/libpciaccess.so.0
-%{_libdir}/libpciaccess.so.0.10.0
+%{_libdir}/libpciaccess.so.0.10.*
%files devel
%defattr(-,root,root,-)
@@ -68,6 +70,22 @@
%{_libdir}/pkgconfig/pciaccess.pc
%changelog
+* Thu Aug 28 2008 Adam Jackson <ajax at redhat.com> 0.10.3-3
+- Rediff for --fuzz=0
+
+* Wed Jul 02 2008 Adam Jackson <ajax at redhat.com> 0.10.3-2
+- Fix file access mode in config fd cache. (#452910)
+
+* Tue Jul 01 2008 Adam Jackson <ajax at redhat.com> 0.10.3-1
+- libpciaccess 0.10.3
+
+* Tue May 20 2008 Adam Jackson <ajax at redhat.com> 0.10-3
+- libpciaccess-no-pci-fix.patch: Fix init when /sys/bus/pci is empty or
+ nonexistent.
+
+* Mon Apr 21 2008 Dave Airlie <airlied at redhat.com> 0.10-2
+- fix major problem with libpciaccess and write combining.
+
* Thu Mar 06 2008 Adam Jackson <ajax at redhat.com> 0.10-1
- libpciaccess 0.10
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/libpciaccess/devel/sources,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- sources 6 Mar 2008 20:40:43 -0000 1.7
+++ sources 28 Aug 2008 17:58:59 -0000 1.8
@@ -1 +1 @@
-fadacd7f13c3c2f83e14f670925487a1 libpciaccess-0.10.tar.bz2
+6d5468debf76fac84576ca26c9535821 libpciaccess-0.10.3.tar.bz2
More information about the fedora-extras-commits
mailing list