Author: leigh123linux
Update of /cvs/nonfree/rpms/nvidia-304xx-kmod/F-18
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv23374
Modified Files:
nvidia-304xx-kmod.spec nvidia_304.88_linux_3.11.patch
Log Message:
* Wed Nov 06 2013 Leigh Scott <leigh123linux(a)googlemail.com> - 304.88-4
- use nvidia fix for get_num_physpages
Index: nvidia-304xx-kmod.spec
===================================================================
RCS file: /cvs/nonfree/rpms/nvidia-304xx-kmod/F-18/nvidia-304xx-kmod.spec,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- nvidia-304xx-kmod.spec 4 Nov 2013 23:21:23 -0000 1.22
+++ nvidia-304xx-kmod.spec 6 Nov 2013 11:05:39 -0000 1.23
@@ -3,12 +3,12 @@
# "buildforkernels newest" macro for just that build; immediately after
# queuing that build enable the macro again for subsequent builds; that way
# a new akmod package will only get build when a new one is actually needed
-%global buildforkernels newest
+%global buildforkernels current
Name: nvidia-304xx-kmod
Version: 304.88
# Taken over by kmodtool
-Release: 3%{?dist}.4
+Release: 4%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -80,6 +80,9 @@
%changelog
+* Wed Nov 06 2013 Leigh Scott <leigh123linux(a)googlemail.com> - 304.88-4
+- use nvidia fix for get_num_physpages
+
* Mon Nov 04 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 304.88-3.4
- Rebuilt for kernel
nvidia_304.88_linux_3.11.patch:
b/kernel/nv-i2c.c | 14 -
b/kernel/nv-procfs.c | 411 ++++++++++++++++++-------------------
b/kernel/patch-get_num_physpages.h | 10
kernel/Makefile.kbuild | 1
kernel/conftest.sh | 24 ++
kernel/nv-linux.h | 4
kernel/nv-vm.c | 5
7 files changed, 259 insertions(+), 210 deletions(-)
Index: nvidia_304.88_linux_3.11.patch
===================================================================
RCS file: /cvs/nonfree/rpms/nvidia-304xx-kmod/F-18/nvidia_304.88_linux_3.11.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- nvidia_304.88_linux_3.11.patch 10 Oct 2013 19:05:46 -0000 1.1
+++ nvidia_304.88_linux_3.11.patch 6 Nov 2013 11:05:39 -0000 1.2
@@ -651,13 +651,70 @@
+ remove_proc_subtree("nvidia", proc_nvidia);
#endif
}
+--- /dev/null
++++ b/kernel/patch-get_num_physpages.h
+@@ -0,0 +1,10 @@
++#define NV_PATCH_get_num_physpages_DESCRIPTION \
++"This patch adds support for kernels such as Linux 3.11, which use the "\
++"get_num_physpages() function instead of the num_physpages variable to "\
++"report the number of physical pages. In order to avoid compatibility "\
++"problems that would otherwise result from differences between what "\
++"the removed num_physpages variable reported versus what is reported "\
++"by get_num_physpages(), the driver will fall back to a different memory "\
++"allocation strategy on systems where num_phsypages is not available, when "\
++"the amount of system memory matches or exceeds the upper bound of a given "\
++"GPU's physical address space.\n"
+
+--- a/kernel/Makefile.kbuild
++++ b/kernel/Makefile.kbuild
+@@ -175,6 +175,7 @@ COMPILE_TESTS = \
+ file_operations \
+ sg_init_table \
+ pci_get_domain_bus_and_slot \
++ get_num_physpages \
+ efi_enabled
+
+ #
+--- a/kernel/conftest.sh
++++ b/kernel/conftest.sh
+@@ -1504,6 +1504,30 @@ compile_test() {
+ fi
+ ;;
+
++ get_num_physpages)
++ #
++ # Determine if the get_num_physpages() function is
++ # present.
++ #
++ echo "$CONFTEST_PREAMBLE
++ #include <linux/mm.h>
++ void conftest_get_num_physpages(void) {
++ get_num_physpages(NULL);
++ }" > conftest$$.c
++
++ $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
++ rm -f conftest$$.c
++
++ if [ -f conftest$$.o ]; then
++ echo "#undef NV_GET_NUM_PHYSPAGES_PRESENT" >>
conftest.h
++ rm -f conftest$$.o
++ return
++ else
++ echo "#define NV_GET_NUM_PHYSPAGES_PRESENT" >>
conftest.h
++ return
++ fi
++ ;;
++
+ esac
+ }
+
--- a/kernel/nv-linux.h
+++ b/kernel/nv-linux.h
-@@ -1027,7 +1027,11 @@ static inline int nv_execute_on_all_cpus
+@@ -1027,7 +1027,11 @@ static inline int nv_execute_on_all_cpus(void (*func)(void *info),
void *info)
#endif
#if !defined(NV_VMWARE)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
++#if defined(NV_GET_NUM_PHYSPAGES_PRESENT)
+#define NV_NUM_PHYSPAGES get_num_physpages()
+#else
#define NV_NUM_PHYSPAGES num_physpages
@@ -665,3 +722,20 @@
#define NV_GET_CURRENT_PROCESS() current->tgid
#define NV_IN_ATOMIC() in_atomic()
#define NV_LOCAL_BH_DISABLE() local_bh_disable()
+
+--- a/kernel/nv-vm.c
++++ b/kernel/nv-vm.c
+@@ -479,8 +479,13 @@ static unsigned int nv_compute_gfp_mask(
+ system_memory_size = (os_get_system_memory_size() * RM_PAGE_SIZE);
+ if (system_memory_size != 0)
+ {
++#if !defined(NV_GET_NUM_PHYSPAGES_PRESENT)
+ if (dev->dma_mask < (system_memory_size - 1))
+ gfp_mask = NV_GFP_DMA32;
++#else
++ if (dev->dma_mask <= (system_memory_size - 1))
++ gfp_mask = NV_GFP_DMA32;
++#endif
+ }
+ else if (dev->dma_mask < 0xffffffffffULL)
+ {
Show replies by date