[packages/xorg-driver-video-nvidia-legacy-304xx] - removed obsoleted kernel patches - removed debian hackery, not needed enymore - rel 2
baggins
baggins at pld-linux.org
Sun Jan 5 18:22:28 CET 2014
commit f30032ce42b7c6e74ee27b3c9b9f405688af4554
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Jan 5 18:22:01 2014 +0100
- removed obsoleted kernel patches
- removed debian hackery, not needed enymore
- rel 2
conftest.h | 470 ------------------
conftest.sh | 7 -
kbuild.patch | 11 -
linux-3.10-i2c.patch | 39 --
linux-3.10-procfs.patch | 752 -----------------------------
linux-3.11.patch | 18 -
patches.h | 5 -
xorg-driver-video-nvidia-legacy-304xx.spec | 15 +-
8 files changed, 1 insertion(+), 1316 deletions(-)
---
diff --git a/xorg-driver-video-nvidia-legacy-304xx.spec b/xorg-driver-video-nvidia-legacy-304xx.spec
index b1eec36..0417ab4 100644
--- a/xorg-driver-video-nvidia-legacy-304xx.spec
+++ b/xorg-driver-video-nvidia-legacy-304xx.spec
@@ -46,7 +46,7 @@ exit 1
%define kpkg %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%kernel_pkg ; done)
%define bkpkg %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%build_kernel_pkg ; done)
-%define rel 1
+%define rel 2
%define mname nvidia-legacy-304xx
%define pname xorg-driver-video-%{mname}
Summary: Linux Drivers for nVidia GeForce/Quadro Chips
@@ -72,10 +72,6 @@ Source7: conftest.h
Source8: conftest.sh
Patch0: X11-driver-nvidia-GL.patch
Patch1: X11-driver-nvidia-desktop.patch
-Patch2: linux-3.10-i2c.patch
-Patch3: linux-3.10-procfs.patch
-Patch4: linux-3.11.patch
-Patch5: kbuild.patch
URL: http://www.nvidia.com/object/unix.html
BuildRequires: rpmbuild(macros) >= 1.678
%{?with_dist_kernel:%{expand:%kbrs}}
@@ -277,15 +273,6 @@ rm -rf NVIDIA-Linux-x86*-%{version}*
%endif
%patch0 -p1
%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-
-install %{SOURCE6} kernel/
-install %{SOURCE7} kernel/
-install -m 755 %{SOURCE8} kernel/
-echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
%build
%{?with_kernel:%{expand:%bkpkg}}
diff --git a/conftest.h b/conftest.h
deleted file mode 100644
index 8013014..0000000
--- a/conftest.h
+++ /dev/null
@@ -1,470 +0,0 @@
-/* synchronized with conftest.sh from 325.15, 319.32, 313.30, 310.51, 304.108, 295.75, 173.14.37, 96.43.23, 71.86.15 */
-
-#ifndef LINUX_VERSION_CODE
-#include <linux/version.h>
-#endif
-
-#if !defined(IS_ENABLED) && LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)
-#define __ARG_PLACEHOLDER_1 0,
-#define config_enabled(cfg) _config_enabled(cfg)
-#define _config_enabled(value) __config_enabled(__ARG_PLACEHOLDER_##value)
-#define __config_enabled(arg1_or_junk) ___config_enabled(arg1_or_junk 1, 0)
-#define ___config_enabled(__ignored, val, ...) val
-#define IS_ENABLED(option) (config_enabled(option) || config_enabled(option##_MODULE))
-#endif
-
-/* Implement conftest.sh function nvidiafb_sanity_check */
-#if IS_ENABLED(CONFIG_FB_NVIDIA)
-#warning "The nvidia module is incompatible with nvidiafb!"
-#endif
-
-/* Implement conftest.sh function xen_sanity_check */
-#if IS_ENABLED(CONFIG_XEN) && ! IS_ENABLED(CONFIG_PARAVIRT)
-#warning "Xen kernels are not supported!"
-#endif
-
-/* Implement conftest.sh function preempt_rt_sanity_check */
-#if IS_ENABLED(CONFIG_PREEMPT_RT) || IS_ENABLED(CONFIG_PREEMPT_RT_FULL)
-#warning "PREEMPT_RT kernels are not supported!"
-#endif
-
-/* Implement conftest.sh function remap_page_range */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)
- #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- #define NV_REMAP_PAGE_RANGE_PRESENT
- #define NV_REMAP_PAGE_RANGE_ARGUMENT_COUNT 4
- #else
- #define NV_REMAP_PAGE_RANGE_PRESENT
- #define NV_REMAP_PAGE_RANGE_ARGUMENT_COUNT 5
- #endif
-#else
- #undef NV_REMAP_PAGE_RANGE_PRESENT
-#endif
-
-/* Implement conftest.sh function set_memory_uc */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) && IS_ENABLED(CONFIG_X86)
- #define NV_SET_MEMORY_UC_PRESENT
-#else
- #undef NV_SET_MEMORY_UC_PRESENT
-#endif
-
-/* Implement conftest.sh function set_memory_array_uc */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) && IS_ENABLED(CONFIG_X86)
- #define NV_SET_MEMORY_ARRAY_UC_PRESENT
-#else
- #undef NV_SET_MEMORY_ARRAY_UC_PRESENT
-#endif
-
-/* Implement conftest.sh function set_pages_uc */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) && IS_ENABLED(CONFIG_X86)
- #define NV_SET_PAGES_UC_PRESENT
-#else
- #undef NV_SET_PAGES_UC_PRESENT
-#endif
-
-/* Implement conftest.sh function outer_flush_all */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34) && IS_ENABLED(CONFIG_ARM)
- #define NV_OUTER_FLUSH_ALL_PRESENT
-#else
- #undef NV_OUTER_FLUSH_ALL_PRESENT
-#endif
-
-/* Implement conftest.sh function change_page_attr */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) && \
- LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,25)
- #define NV_CHANGE_PAGE_ATTR_PRESENT
-#else
- #undef NV_CHANGE_PAGE_ATTR_PRESENT
-#endif
-
-/* Implement conftest.sh function pci_get_class */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
- #define NV_PCI_GET_CLASS_PRESENT
-#else
- #undef NV_PCI_GET_CLASS_PRESENT
-#endif
-
-/* Implement conftest.sh function pci_get_domain_bus_and_slot */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
- #define NV_PCI_GET_DOMAIN_BUS_AND_SLOT_PRESENT
-#else
- #undef NV_PCI_GET_DOMAIN_BUS_AND_SLOT_PRESENT
-#endif
-
-/* Implement conftest.sh function remap_pfn_range */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
- #define NV_REMAP_PFN_RANGE_PRESENT
-#else
- #undef NV_REMAP_PFN_RANGE_PRESENT
-#endif
-
-/* Implement conftest.sh function agp_backend_acquire */
-/* Only kernels sometime before 2.4.0 don't have this function, and who */
-/* cares anymore */
-#define NV_AGP_BACKEND_ACQUIRE_PRESENT
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
- #define NV_AGP_BACKEND_ACQUIRE_ARGUMENT_COUNT 1
-#else
- #define NV_AGP_BACKEND_ACQUIRE_ARGUMENT_COUNT 0
-#endif
-
-/* Implement conftest.sh function vmap */
-/* I can not find any released kernel that uses the 2 argument variant */
-/* of vmap */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,22)
- #define NV_VMAP_PRESENT
- #define NV_VMAP_ARGUMENT_COUNT 4
-#else
- #undef NV_VMAP_PRESENT
-#endif
-
-/* Implement conftest.sh function i2c_adapter */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- #define NV_I2C_ADAPTER_HAS_INC_USE
- #define NV_I2C_ADAPTER_HAS_DEC_USE
- #define NV_I2C_ADAPTER_HAS_CLIENT_REGISTER
-#else
- #undef NV_I2C_ADAPTER_HAS_INC_USE
- #undef NV_I2C_ADAPTER_HAS_DEC_USE
- #undef NV_I2C_ADAPTER_HAS_CLIENT_REGISTER
-#endif
-
-/* Implement conftest.sh function pm_message_t */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
- #define NV_PM_MESSAGE_T_PRESENT
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
- #define NV_PM_MESSAGE_T_HAS_EVENT
- #else
- #undef NV_PM_MESSAGE_T_HAS_EVENT
- #endif
-#else
- #undef NV_PM_MESSAGE_T_PRESENT
- #undef NV_PM_MESSAGE_T_HAS_EVENT
-#endif
-
-/* Implement conftest.sh function pci_choose_state */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
- #define NV_PCI_CHOOSE_STATE_PRESENT
-#else
- #undef NV_PCI_CHOOSE_STATE_PRESENT
-#endif
-
-/* Implement conftest.sh function vm_insert_page */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
- #define NV_VM_INSERT_PAGE_PRESENT
-#else
- #undef NV_VM_INSERT_PAGE_PRESENT
-#endif
-
-/* Implement conftest.sh function irq_handler_t */
-/* I can not find any released kernel that uses the 3 argument variant */
-/* of irq_handler_t */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
- #define NV_IRQ_HANDLER_T_PRESENT
- #define NV_IRQ_HANDLER_T_ARGUMENT_COUNT 2
-#else
- #undef NV_IRQ_HANDLER_T_PRESENT
-#endif
-
-/* Implement conftest.sh function acpi_device_ops */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10) && \
- LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21)
- #define NV_ACPI_DEVICE_OPS_HAS_MATCH
-#else
- #undef NV_ACPI_DEVICE_OPS_HAS_MATCH
-#endif
-
-/* Implement conftest.sh function acpi_device_id */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
- #define NV_ACPI_DEVICE_ID_HAS_DRIVER_DATA
-#else
- #undef NV_ACPI_DEVICE_ID_HAS_DRIVER_DATA
-#endif
-
-/* Implement conftest.sh function acquire_console_sem */
-// 2.6.38 renamed {acquire,release}_console_sem() to console_{,un}lock()
-// but NVIDIA neither checks for these new names nor uses them
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,10) && \
- LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
- #define NV_ACQUIRE_CONSOLE_SEM_PRESENT
-#else
- #undef NV_ACQUIRE_CONSOLE_SEM_PRESENT
-#endif
-
-/* Implement conftest.sh function kmem_cache_create */
-/* Only kernels sometime before 2.4.0 don't have this function, and who */
-/* cares anymore */
-#define NV_KMEM_CACHE_CREATE_PRESENT
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
- #define NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT 5
-#else
- #define NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT 6
-#endif
-
-/* Implement conftest.sh function smp_call_function */
-/* Only kernels sometime before 2.4.0 don't have this function, and who */
-/* cares anymore */
-#define NV_SMP_CALL_FUNCTION_PRESENT
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
- #define NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT 3
-#else
- #define NV_SMP_CALL_FUNCTION_ARGUMENT_COUNT 4
-#endif
-
-/* Implement conftest.sh function on_each_cpu */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
- #define NV_ON_EACH_CPU_PRESENT
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
- #define NV_ON_EACH_CPU_ARGUMENT_COUNT 3
- #else
- #define NV_ON_EACH_CPU_ARGUMENT_COUNT 4
- #endif
-#else
- #undef NV_ON_EACH_CPU_PRESENT
-#endif
-
-/* Implement conftest.sh function vmm_support */
-/* nv-xen.h does not exist */
-#undef HAVE_NV_XEN
-
-/* Implement conftest.sh function nvmap_support */
-/* nv-android.h does not exist */
-#undef HAVE_NV_ANDROID
-
-/* Implement conftest.sh function acpi_evaluate_integer */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,19)
- #define NV_ACPI_EVALUATE_INTEGER_PRESENT
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
- typedef unsigned long long nv_acpi_integer_t;
- #else
- typedef unsigned long nv_acpi_integer_t;
- #endif
-#else
- #undef NV_ACPI_EVALUATE_INTEGER_PRESENT
- typedef unsigned long nv_acpi_integer_t;
-#endif
-
-/* Implement conftest.sh function acpi_walk_namespace */
-/* Only kernels sometime before 2.4.0 don't have this function, and who */
-/* cares anymore */
-#define NV_ACPI_WALK_NAMESPACE_PRESENT
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
- #define NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT 7
-#else
- #define NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT 6
-#endif
-
-/* Implement conftest.sh function acpi_os_wait_events_complete */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,7)
- #define NV_ACPI_OS_WAIT_EVENTS_COMPLETE_PRESENT
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
- #define NV_ACPI_OS_WAIT_EVENTS_COMPLETE_ARGUMENT_COUNT 0
- #else
- #define NV_ACPI_OS_WAIT_EVENTS_COMPLETE_ARGUMENT_COUNT 1
- #endif
-#else
- #undef NV_ACPI_OS_WAIT_EVENTS_COMPLETE_PRESENT
-#endif
-
-/* Implement conftest.sh function ioremap_cache */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) && IS_ENABLED(CONFIG_X86)
- #define NV_IOREMAP_CACHE_PRESENT
-#else
- #undef NV_IOREMAP_CACHE_PRESENT
-#endif
-
-/* Implement conftest.sh function ioremap_wc */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
- #define NV_IOREMAP_WC_PRESENT
-#else
- #undef NV_IOREMAP_WC_PRESENT
-#endif
-
-/* Implement conftest.sh function proc_dir_entry */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
- #define NV_PROC_DIR_ENTRY_HAS_OWNER
-#else
- #undef NV_PROC_DIR_ENTRY_HAS_OWNER
-#endif
-
-/* Implement conftest.sh function INIT_WORK */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,41)
- #define NV_INIT_WORK_PRESENT
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
- #define NV_INIT_WORK_ARGUMENT_COUNT 2
- #else
- #define NV_INIT_WORK_ARGUMENT_COUNT 3
- #endif
-#else
- #undef NV_INIT_WORK_PRESENT
-#endif
-
-/* Implement conftest.sh function pci_dma_mapping_error */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,5)
- #define NV_PCI_DMA_MAPPING_ERROR_PRESENT
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
- #define NV_PCI_DMA_MAPPING_ERROR_ARGUMENT_COUNT 2
- #else
- #define NV_PCI_DMA_MAPPING_ERROR_ARGUMENT_COUNT 1
- #endif
-#else
- #undef NV_PCI_DMA_MAPPING_ERROR_PRESENT
-#endif
-
-/* Implement conftest.sh function agp_memory */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
- #define NV_AGP_MEMORY_HAS_PAGES
-#else
- #undef NV_AGP_MEMORY_HAS_PAGES
-#endif
-
-/* Implement conftest.sh function scatterlist */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
- #define NV_SCATTERLIST_HAS_PAGE
-#else
- #undef NV_SCATTERLIST_HAS_PAGE
-#endif
-
-/* Implement conftest.sh function pci_domain_nr */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,71)
- #define NV_PCI_DOMAIN_NR_PRESENT
-#else
- #undef NV_PCI_DOMAIN_NR_PRESENT
-#endif
-
-/* Implement conftest.sh function file_operations */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
- #define NV_FILE_OPERATIONS_HAS_IOCTL
-#else
- #undef NV_FILE_OPERATIONS_HAS_IOCTL
-#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
- #define NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL
- #define NV_FILE_OPERATIONS_HAS_COMPAT_IOCTL
-#else
- #undef NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL
- #undef NV_FILE_OPERATIONS_HAS_COMPAT_IOCTL
-#endif
-
-/* Implement conftest.sh function efi_enabled */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,1)
- #define NV_EFI_ENABLED_PRESENT
-#else
- #undef NV_EFI_ENABLED_PRESENT
-#endif
-
-/* Implement conftest.sh function dom0_kernel_present */
-#if 0
- #define NV_DOM0_KERNEL_PRESENT
-#else
- #undef NV_DOM0_KERNEL_PRESENT
-#endif
-
-/* Implement conftest.sh function drm_available */
-#if 0
- #define NV_DRM_AVAILABLE
-#else
- #undef NV_DRM_AVAILABLE
-#endif
-
-/* Implement conftest.sh function proc_create_data */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
- #define NV_PROC_CREATE_DATA_PRESENT
-#else
- #undef NV_PROC_CREATE_DATA_PRESENT
-#endif
-
-/* Implement conftest.sh function pde_data */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
- #define NV_PDE_DATA_PRESENT
-#else
- #undef NV_PDE_DATA_PRESENT
-#endif
-
-/* Implement conftest.sh function proc_remove */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
- #define NV_PROC_REMOVE_PRESENT
-#else
- #undef NV_PROC_REMOVE_PRESENT
-#endif
-
-/* Implement conftest.sh function sg_init_table */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
- #define NV_SG_INIT_TABLE_PRESENT
-#else
- #undef NV_SG_INIT_TABLE_PRESENT
-#endif
-
-/* Check for linux/semaphore.h */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
- #define NV_LINUX_SEMAPHORE_H_PRESENT
-#else
- #undef NV_LINUX_SEMAPHORE_H_PRESENT
-#endif
-
-/* Check for linux/cred.h */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
- #define NV_LINUX_CRED_H_PRESENT
-#else
- #undef NV_LINUX_CRED_H_PRESENT
-#endif
-
-/* Check for drm/drmP.h */
-#if 1
- #define NV_DRM_DRMP_H_PRESENT
-#else
- #undef NV_DRM_DRMP_H_PRESENT
-#endif
-
-/* Check for generated/autoconf.h */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
- #define NV_GENERATED_AUTOCONF_H_PRESENT
-#else
- #undef NV_GENERATED_AUTOCONF_H_PRESENT
-#endif
-
-/* Check for generated/compile.h */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
- #define NV_GENERATED_COMPILE_H_PRESENT
-#else
- #undef NV_GENERATED_COMPILE_H_PRESENT
-#endif
-
-/* Check for generated/utsrelease.h */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
- #define NV_GENERATED_UTSRELEASE_H_PRESENT
-#else
- #undef NV_GENERATED_UTSRELEASE_H_PRESENT
-#endif
-
-/* Check for asm/system.h */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
- #define NV_ASM_SYSTEM_H_PRESENT
-#else
- #undef NV_ASM_SYSTEM_H_PRESENT
-#endif
-
-/* Check for linux/efi.h */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,33)
- #define NV_LINUX_EFI_H_PRESENT
-#else
- #undef NV_LINUX_EFI_H_PRESENT
-#endif
-
-/* Check for linux/kconfig.h */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)
- #define NV_LINUX_KCONFIG_H_PRESENT
-#else
- #undef NV_LINUX_KCONFIG_H_PRESENT
-#endif
-
-/* Check for linux/screen_info.h */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
- #define NV_LINUX_SCREEN_INFO_H_PRESENT
-#else
- #undef NV_LINUX_SCREEN_INFO_H_PRESENT
-#endif
-
-/* Check for linux/nvmap.h */
-// does not (yet) exist in kernel source
- #undef NV_LINUX_NVMAP_H_PRESENT
diff --git a/conftest.sh b/conftest.sh
deleted file mode 100755
index 661cb4d..0000000
--- a/conftest.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-# This is a replacement for nvidia's conftest.sh
-#
-# We have a new conftest.h that works with kbuild that we don't want
-# overwritten or generated or anything else, so we want any call to
-# conftest.sh to do absolutely nothing.
-exit 0
diff --git a/kbuild.patch b/kbuild.patch
deleted file mode 100644
index b2f0d7a..0000000
--- a/kbuild.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- NVIDIA-Linux-x86_64-304.88-no-compat32/kernel/Makefile.kbuild~ 2013-10-29 08:01:58.000000000 +0100
-+++ NVIDIA-Linux-x86_64-304.88-no-compat32/kernel/Makefile.kbuild 2013-10-29 08:05:38.340350890 +0100
-@@ -286,8 +286,6 @@
- @$(RM) -f $(RESMAN_GLUE_OBJS) $(KERNEL_GLUE_OBJS)
- @$(RM) -f build-in.o nv-linux.o *.d .*.{cmd,flags}
- @$(RM) -f $(MODULE_NAME).{o,ko,mod.{o,c}} $(VERSION_HEADER) *~
-- @$(RM) -f patches.h
-- @$(RM) -f conftest*.c conftest.h
- @$(RM) -rf Modules.symvers .tmp_versions
-
- #
diff --git a/linux-3.10-i2c.patch b/linux-3.10-i2c.patch
deleted file mode 100644
index 8ff38d9..0000000
--- a/linux-3.10-i2c.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Author: Andreas Beckmann <anbe at debian.org>
-Bug-Debian: http://bugs.debian.org/717361
-Description: adjust for kernel 3.10 i2c interface changes
- backported from 304.108
-
-diff --git a/kernel/nv-i2c.c b/kernel/nv-i2c.c
-index a702506..2aa0b77 100644
---- a/kernel/nv-i2c.c
-+++ b/kernel/nv-i2c.c
-@@ -311,8 +311,6 @@ void* NV_API_CALL nv_i2c_add_adapter(nv_state_t *nv, NvU32 port)
- BOOL NV_API_CALL nv_i2c_del_adapter(nv_state_t *nv, void *data)
- {
- struct i2c_adapter *pI2cAdapter = (struct i2c_adapter *)data;
-- int osstatus = 0;
-- BOOL wasReleased = FALSE;
-
- #if defined(KERNEL_2_4)
- if (!NV_WEAK_SYMBOL_PRESENT(i2c_add_adapter))
-@@ -323,16 +321,11 @@ BOOL NV_API_CALL nv_i2c_del_adapter(nv_state_t *nv, void *data)
-
- if (!pI2cAdapter) return FALSE;
-
-- // attempt release with the OS
-- osstatus = i2c_del_adapter(pI2cAdapter);
--
-- if (!osstatus)
-- {
-- os_free_mem(pI2cAdapter);
-- wasReleased = TRUE;
-- }
-+ // release with the OS
-+ i2c_del_adapter(pI2cAdapter);
-+ os_free_mem(pI2cAdapter);
-
-- return wasReleased;
-+ return TRUE;
- }
-
- #else // (defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE))
diff --git a/linux-3.10-procfs.patch b/linux-3.10-procfs.patch
deleted file mode 100644
index 1c56bcf..0000000
--- a/linux-3.10-procfs.patch
+++ /dev/null
@@ -1,752 +0,0 @@
-Author: Andreas Beckmann <anbe at debian.org>
-Bug-Debian: http://bugs.debian.org/717361
-Description: adjust for kernel 3.10 procfs interface changes
- backported from 304.108
-
-diff --git a/kernel/nv-procfs.c b/kernel/nv-procfs.c
-index 3e05ef5..7a9fb70 100644
---- a/kernel/nv-procfs.c
-+++ b/kernel/nv-procfs.c
-@@ -51,69 +51,106 @@ static char nv_registry_keys[NV_MAX_REGISTRY_KEYS_LENGTH];
- #define NV_SET_PROC_ENTRY_OWNER(entry)
- #endif
-
--#define NV_CREATE_PROC_ENTRY(name,mode,parent) \
-- ({ \
-- struct proc_dir_entry *__entry; \
-- __entry = create_proc_entry(name, mode, parent); \
-- if (__entry != NULL) \
-- NV_SET_PROC_ENTRY_OWNER(__entry); \
-- __entry; \
-+#if defined(NV_PROC_CREATE_DATA_PRESENT)
-+# define NV_CREATE_PROC_ENTRY(name,mode,parent,fops,__data) \
-+ proc_create_data(name, __mode, parent, fops, __data)
-+#else
-+# define NV_CREATE_PROC_ENTRY(name,mode,parent,fops,__data) \
-+ ({ \
-+ struct proc_dir_entry *__entry; \
-+ __entry = create_proc_entry(name, mode, parent); \
-+ if (__entry != NULL) \
-+ { \
-+ NV_SET_PROC_ENTRY_OWNER(__entry); \
-+ __entry->proc_fops = fops; \
-+ __entry->data = (__data); \
-+ } \
-+ __entry; \
-+ })
-+#endif
-+
-+#define NV_CREATE_PROC_FILE(filename,parent,__name,__data) \
-+ ({ \
-+ struct proc_dir_entry *__entry; \
-+ int __mode = (S_IFREG | S_IRUGO); \
-+ const struct file_operations *fops = &nv_procfs_##__name##_fops; \
-+ if (fops->write != 0) \
-+ __mode |= S_IWUSR; \
-+ __entry = NV_CREATE_PROC_ENTRY(filename, __mode, parent, fops, \
-+ __data); \
-+ __entry; \
- })
-
--#define NV_CREATE_PROC_FILE(name,parent,__read_proc, \
-- __write_proc,__fops,__data) \
-+/*
-+ * proc_mkdir_mode exists in Linux 2.6.9, but isn't exported until Linux 3.0.
-+ * Use the older interface instead unless the newer interface is necessary.
-+ */
-+#if defined(NV_PROC_REMOVE_PRESENT)
-+# define NV_PROC_MKDIR_MODE(name, mode, parent) \
-+ proc_mkdir_mode(name, mode, parent)
-+#else
-+# define NV_PROC_MKDIR_MODE(name, mode, parent) \
- ({ \
- struct proc_dir_entry *__entry; \
-- int __mode = (S_IFREG | S_IRUGO); \
-- if ((NvUPtr)(__write_proc) != 0) \
-- __mode |= S_IWUSR; \
-- __entry = NV_CREATE_PROC_ENTRY(name, __mode, parent); \
-+ __entry = create_proc_entry(name, mode, parent); \
- if (__entry != NULL) \
-- { \
-- if ((NvUPtr)(__read_proc) != 0) \
-- __entry->read_proc = (__read_proc); \
-- if ((NvUPtr)(__write_proc) != 0) \
-- { \
-- __entry->write_proc = (__write_proc); \
-- __entry->proc_fops = (__fops); \
-- } \
-- __entry->data = (__data); \
-- } \
-+ NV_SET_PROC_ENTRY_OWNER(__entry); \
- __entry; \
- })
-+#endif
-
- #define NV_CREATE_PROC_DIR(name,parent) \
- ({ \
- struct proc_dir_entry *__entry; \
- int __mode = (S_IFDIR | S_IRUGO | S_IXUGO); \
-- __entry = NV_CREATE_PROC_ENTRY(name, __mode, parent); \
-+ __entry = NV_PROC_MKDIR_MODE(name, __mode, parent); \
- __entry; \
- })
-
-+#if defined(NV_PDE_DATA_PRESENT)
-+# define NV_PDE_DATA(inode) PDE_DATA(inode)
-+#else
-+# define NV_PDE_DATA(inode) PDE(inode)->data
-+#endif
-+
-+#define NV_DEFINE_PROCFS_SINGLE_FILE(__name) \
-+ static int nv_procfs_open_##__name( \
-+ struct inode *inode, \
-+ struct file *filep \
-+ ) \
-+ { \
-+ return single_open(filep, nv_procfs_read_##__name, \
-+ NV_PDE_DATA(inode)); \
-+ } \
-+ \
-+ static const struct file_operations nv_procfs_##__name##_fops = { \
-+ .owner = THIS_MODULE, \
-+ .open = nv_procfs_open_##__name, \
-+ .read = seq_read, \
-+ .llseek = seq_lseek, \
-+ .release = single_release, \
-+ };
-+
-+static int nv_procfs_read_registry(struct seq_file *s, void *v);
-+
- #define NV_PROC_WRITE_BUFFER_SIZE (64 * RM_PAGE_SIZE)
-
- static int
- nv_procfs_read_gpu_info(
-- char *page,
-- char **start,
-- off_t off,
-- int count,
-- int *eof,
-- void *data
-+ struct seq_file *s,
-+ void *v
- )
- {
-- nv_state_t *nv = data;
-+ nv_state_t *nv = s->private;
- nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
- struct pci_dev *dev = nvl->dev;
- char *type, *fmt, tmpstr[NV_DEVICE_NAME_LENGTH];
-- int len = 0, status;
-+ int status;
- NvU8 *uuid;
- NvU32 vbios_rev1, vbios_rev2, vbios_rev3, vbios_rev4, vbios_rev5;
- NvU32 fpga_rev1, fpga_rev2, fpga_rev3;
- nv_stack_t *sp = NULL;
-
-- *eof = 1;
--
- NV_KMEM_CACHE_ALLOC_STACK(sp);
- if (sp == NULL)
- {
-@@ -139,26 +176,26 @@ nv_procfs_read_gpu_info(
- }
- }
-
-- len += sprintf(page+len, "Model: \t\t %s\n", tmpstr);
-- len += sprintf(page+len, "IRQ: \t\t %d\n", nv->interrupt_line);
-+ seq_printf(s, "Model: \t\t %s\n", tmpstr);
-+ seq_printf(s, "IRQ: \t\t %d\n", nv->interrupt_line);
-
- if (NV_IS_GVI_DEVICE(nv))
- {
- status = rm_gvi_get_firmware_version(sp, nv, &fpga_rev1, &fpga_rev2,
- &fpga_rev3);
- if (status != RM_OK)
-- len += sprintf(page+len, "Firmware: \t ????.??.??\n");
-+ seq_printf(s, "Firmware: \t ????.??.??\n");
- else
- {
- fmt = "Firmware: \t %x.%x.%x\n";
-- len += sprintf(page+len, fmt, fpga_rev1, fpga_rev2, fpga_rev3);
-+ seq_printf(s, fmt, fpga_rev1, fpga_rev2, fpga_rev3);
- }
- }
- else
- {
- if (rm_get_gpu_uuid(sp, nv, &uuid, NULL) == RM_OK)
- {
-- len += sprintf(page+len, "GPU UUID: \t %s\n", (char *)uuid);
-+ seq_printf(s, "GPU UUID: \t %s\n", (char *)uuid);
- os_free_mem(uuid);
- }
-
-@@ -166,65 +203,62 @@ nv_procfs_read_gpu_info(
- &vbios_rev3, &vbios_rev4,
- &vbios_rev5) != RM_OK)
- {
-- len += sprintf(page+len, "Video BIOS: \t ??.??.??.??.??\n");
-+ seq_printf(s, "Video BIOS: \t ??.??.??.??.??\n");
- }
- else
- {
- fmt = "Video BIOS: \t %02x.%02x.%02x.%02x.%02x\n";
-- len += sprintf(page+len, fmt, vbios_rev1, vbios_rev2, vbios_rev3,
-- vbios_rev4, vbios_rev5);
-+ seq_printf(s, fmt, vbios_rev1, vbios_rev2, vbios_rev3, vbios_rev4,
-+ vbios_rev5);
- }
- }
-
- if (nv_find_pci_capability(dev, PCI_CAP_ID_AGP))
- type = "AGP";
- else if (nv_find_pci_capability(dev, PCI_CAP_ID_EXP))
-- type = "PCI-E";
-+ type = "PCIe";
- else
- type = "PCI";
-- len += sprintf(page+len, "Bus Type: \t %s\n", type);
-+ seq_printf(s, "Bus Type: \t %s\n", type);
-
-- len += sprintf(page+len, "DMA Size: \t %d bits\n",
-+ seq_printf(s, "DMA Size: \t %d bits\n",
- nv_count_bits(dev->dma_mask));
-- len += sprintf(page+len, "DMA Mask: \t 0x%llx\n", dev->dma_mask);
-- len += sprintf(page+len, "Bus Location: \t %04x:%02x.%02x.%x\n",
-- nv->domain, nv->bus, nv->slot, PCI_FUNC(dev->devfn));
-+ seq_printf(s, "DMA Mask: \t 0x%llx\n", dev->dma_mask);
-+ seq_printf(s, "Bus Location: \t %04x:%02x.%02x.%x\n",
-+ nv->domain, nv->bus, nv->slot, PCI_FUNC(dev->devfn));
- #if defined(DEBUG)
- do
- {
- int j;
- for (j = 0; j < NV_GPU_NUM_BARS; j++)
- {
-- len += sprintf(page+len, "BAR%u: \t\t 0x%llx (%lluMB)\n",
-- j, nv->bars[j].address, (nv->bars[j].size >> 20));
-+ seq_printf(s, "BAR%u: \t\t 0x%llx (%lluMB)\n",
-+ j, nv->bars[j].address, (nv->bars[j].size >> 20));
- }
- } while (0);
- #endif
-
- NV_KMEM_CACHE_FREE_STACK(sp);
-
-- return len;
-+ return 0;
- }
-
-+NV_DEFINE_PROCFS_SINGLE_FILE(gpu_info);
-+
- static int
- nv_procfs_read_version(
-- char *page,
-- char **start,
-- off_t off,
-- int count,
-- int *eof,
-- void *data
-+ struct seq_file *s,
-+ void *v
- )
- {
-- int len = 0;
-- *eof = 1;
-+ seq_printf(s, "NVRM version: %s\n", pNVRM_ID);
-+ seq_printf(s, "GCC version: %s\n", NV_COMPILER);
-
-- len += sprintf(page+len, "NVRM version: %s\n", pNVRM_ID);
-- len += sprintf(page+len, "GCC version: %s\n", NV_COMPILER);
--
-- return len;
-+ return 0;
- }
-
-+NV_DEFINE_PROCFS_SINGLE_FILE(version);
-+
- static struct pci_dev *nv_get_agp_device_by_class(unsigned int class)
- {
- struct pci_dev *dev, *fdev;
-@@ -256,23 +290,16 @@ static struct pci_dev *nv_get_agp_device_by_class(unsigned int class)
-
- static int
- nv_procfs_read_agp_info(
-- char *page,
-- char **start,
-- off_t off,
-- int count,
-- int *eof,
-- void *data
-+ struct seq_file *s,
-+ void *v
- )
- {
-- nv_state_t *nv = data;
-+ nv_state_t *nv = s->private;
- nv_linux_state_t *nvl = NULL;
- struct pci_dev *dev;
- char *fw, *sba;
- u8 cap_ptr;
- u32 status, command, agp_rate;
-- int len = 0;
--
-- *eof = 1;
-
- if (nv != NULL)
- {
-@@ -285,13 +312,12 @@ nv_procfs_read_agp_info(
- if (!dev)
- return 0;
-
-- len += sprintf(page+len, "Host Bridge: \t ");
-+ seq_printf(s, "Host Bridge: \t ");
-
- #if defined(CONFIG_PCI_NAMES)
-- len += sprintf(page+len, "%s\n", NV_PCI_DEVICE_NAME(dev));
-+ seq_printf(s, "%s\n", NV_PCI_DEVICE_NAME(dev));
- #else
-- len += sprintf(page+len, "PCI device %04x:%04x\n",
-- dev->vendor, dev->device);
-+ seq_printf(s, "PCI device %04x:%04x\n", dev->vendor, dev->device);
- #endif
- }
-
-@@ -303,48 +329,43 @@ nv_procfs_read_agp_info(
- fw = (status & 0x00000010) ? "Supported" : "Not Supported";
- sba = (status & 0x00000200) ? "Supported" : "Not Supported";
-
-- len += sprintf(page+len, "Fast Writes: \t %s\n", fw);
-- len += sprintf(page+len, "SBA: \t\t %s\n", sba);
-+ seq_printf(s, "Fast Writes: \t %s\n", fw);
-+ seq_printf(s, "SBA: \t\t %s\n", sba);
-
- agp_rate = status & 0x7;
- if (status & 0x8)
- agp_rate <<= 2;
-
-- len += sprintf(page+len, "AGP Rates: \t %s%s%s%s\n",
-- (agp_rate & 0x00000008) ? "8x " : "",
-- (agp_rate & 0x00000004) ? "4x " : "",
-- (agp_rate & 0x00000002) ? "2x " : "",
-- (agp_rate & 0x00000001) ? "1x " : "");
-+ seq_printf(s, "AGP Rates: \t %s%s%s%s\n",
-+ (agp_rate & 0x00000008) ? "8x " : "",
-+ (agp_rate & 0x00000004) ? "4x " : "",
-+ (agp_rate & 0x00000002) ? "2x " : "",
-+ (agp_rate & 0x00000001) ? "1x " : "");
-
-- len += sprintf(page+len, "Registers: \t 0x%08x:0x%08x\n", status, command);
-+ seq_printf(s, "Registers: \t 0x%08x:0x%08x\n", status, command);
-
- if (nvl == NULL)
- NV_PCI_DEV_PUT(dev);
-
-- return len;
-+ return 0;
- }
-
-+NV_DEFINE_PROCFS_SINGLE_FILE(agp_info);
-+
- static int
- nv_procfs_read_agp_status(
-- char *page,
-- char **start,
-- off_t off,
-- int count,
-- int *eof,
-- void *data
-+ struct seq_file *s,
-+ void *v
- )
- {
-- nv_state_t *nv = data;
-+ nv_state_t *nv = s->private;
- struct pci_dev *dev;
- char *fw, *sba, *drv;
-- int len = 0;
- u8 cap_ptr;
- u32 scratch;
- u32 status, command, agp_rate;
- nv_stack_t *sp = NULL;
-
-- *eof = 1;
--
- dev = nv_get_agp_device_by_class(PCI_CLASS_BRIDGE_HOST);
- if (!dev)
- return 0;
-@@ -366,22 +387,22 @@ nv_procfs_read_agp_status(
-
- if (NV_AGP_ENABLED(nv) && (command & 0x100))
- {
-- len += sprintf(page+len, "Status: \t Enabled\n");
-+ seq_printf(s, "Status: \t Enabled\n");
-
- drv = NV_OSAGP_ENABLED(nv) ? "AGPGART" : "NVIDIA";
-- len += sprintf(page+len, "Driver: \t %s\n", drv);
-+ seq_printf(s, "Driver: \t %s\n", drv);
-
- agp_rate = command & 0x7;
- if (status & 0x8)
- agp_rate <<= 2;
-
-- len += sprintf(page+len, "AGP Rate: \t %dx\n", agp_rate);
-+ seq_printf(s, "AGP Rate: \t %dx\n", agp_rate);
-
- fw = (command & 0x00000010) ? "Enabled" : "Disabled";
-- len += sprintf(page+len, "Fast Writes: \t %s\n", fw);
-+ seq_printf(s, "Fast Writes: \t %s\n", fw);
-
- sba = (command & 0x00000200) ? "Enabled" : "Disabled";
-- len += sprintf(page+len, "SBA: \t\t %s\n", sba);
-+ seq_printf(s, "SBA: \t\t %s\n", sba);
- }
- else
- {
-@@ -394,7 +415,7 @@ nv_procfs_read_agp_status(
- return 0;
- }
-
-- len += sprintf(page+len, "Status: \t Disabled\n\n");
-+ seq_printf(s, "Status: \t Disabled\n\n");
-
- /*
- * If we find AGP is disabled, but the RM registry indicates it
-@@ -409,7 +430,7 @@ nv_procfs_read_agp_status(
-
- if (agp_config != NVOS_AGP_CONFIG_DISABLE_AGP && NV_AGP_FAILED(nv))
- {
-- len += sprintf(page+len,
-+ seq_printf(s,
- "AGP initialization failed, please check the ouput \n"
- "of the 'dmesg' command and/or your system log file \n"
- "for additional information on this problem. \n");
-@@ -419,9 +440,11 @@ nv_procfs_read_agp_status(
- }
-
- NV_PCI_DEV_PUT(dev);
-- return len;
-+ return 0;
- }
-
-+NV_DEFINE_PROCFS_SINGLE_FILE(agp_status);
-+
- static int
- nv_procfs_open_registry(
- struct inode *inode,
-@@ -431,9 +454,6 @@ nv_procfs_open_registry(
- nv_file_private_t *nvfp = NULL;
- nv_stack_t *sp = NULL;
-
-- if (0 == (file->f_mode & FMODE_WRITE))
-- return 0;
--
- nvfp = nv_alloc_file_private();
- if (nvfp == NULL)
- {
-@@ -441,6 +461,11 @@ nv_procfs_open_registry(
- return -ENOMEM;
- }
-
-+ nvfp->proc_data = NV_PDE_DATA(inode);
-+
-+ if (0 == (file->f_mode & FMODE_WRITE))
-+ goto done;
-+
- NV_KMEM_CACHE_ALLOC_STACK(sp);
- if (sp == NULL)
- {
-@@ -449,19 +474,19 @@ nv_procfs_open_registry(
- return -ENOMEM;
- }
-
-- NV_SET_FILE_PRIVATE(file, nvfp);
--
- if (RM_OK != os_alloc_mem((void **)&nvfp->data, NV_PROC_WRITE_BUFFER_SIZE))
- {
- nv_free_file_private(nvfp);
- NV_KMEM_CACHE_FREE_STACK(sp);
-- NV_SET_FILE_PRIVATE(file, NULL);
- return -ENOMEM;
- }
-
- os_mem_set((void *)nvfp->data, 0, NV_PROC_WRITE_BUFFER_SIZE);
- nvfp->fops_sp[NV_FOPS_STACK_INDEX_PROCFS] = sp;
-
-+done:
-+ single_open(file, nv_procfs_read_registry, nvfp);
-+
- return 0;
- }
-
-@@ -471,6 +496,7 @@ nv_procfs_close_registry(
- struct file *file
- )
- {
-+ struct seq_file *s = file->private_data;
- nv_file_private_t *nvfp;
- nv_state_t *nv;
- nv_linux_state_t *nvl = NULL;
-@@ -481,9 +507,8 @@ nv_procfs_close_registry(
- RM_STATUS rm_status;
- int rc = 0;
-
-- nvfp = NV_GET_FILE_PRIVATE(file);
-- if (nvfp == NULL)
-- return 0;
-+ nvfp = s->private;
-+ single_release(inode, file);
-
- sp = nvfp->fops_sp[NV_FOPS_STACK_INDEX_PROCFS];
-
-@@ -538,56 +563,42 @@ done:
- os_free_mem(nvfp->data);
-
- nv_free_file_private(nvfp);
-- NV_SET_FILE_PRIVATE(file, NULL);
-
-- NV_KMEM_CACHE_FREE_STACK(sp);
-+ if (sp != NULL)
-+ NV_KMEM_CACHE_FREE_STACK(sp);
-
- return rc;
- }
-
--static struct file_operations nv_procfs_registry_fops = {
-- .open = nv_procfs_open_registry,
-- .release = nv_procfs_close_registry,
--};
--
- static int
- nv_procfs_read_params(
-- char *page,
-- char **start,
-- off_t off,
-- int count,
-- int *eof,
-- void *data
-+ struct seq_file *s,
-+ void *v
- )
- {
- unsigned int i;
-- int len = 0;
- nv_parm_t *entry;
-
-- *eof = 1;
--
- for (i = 0; (entry = &nv_parms[i])->name != NULL; i++)
-- len += sprintf(page+len, "%s: %u\n", entry->name, *entry->data);
-+ seq_printf(s, "%s: %u\n", entry->name, *entry->data);
-
-- len += sprintf(page+len, "RegistryDwords: \"%s\"\n",
-+ seq_printf(s, "RegistryDwords: \"%s\"\n",
- (NVreg_RegistryDwords != NULL) ? NVreg_RegistryDwords : "");
-- len += sprintf(page+len, "RmMsg: \"%s\"\n",
-- (NVreg_RmMsg != NULL) ? NVreg_RmMsg : "");
-+ seq_printf(s, "RmMsg: \"%s\"\n", (NVreg_RmMsg != NULL) ? NVreg_RmMsg : "");
-
-- return len;
-+ return 0;
- }
-
-+NV_DEFINE_PROCFS_SINGLE_FILE(params);
-+
- static int
- nv_procfs_read_registry(
-- char *page,
-- char **start,
-- off_t off,
-- int count,
-- int *eof,
-- void *data
-+ struct seq_file *s,
-+ void *v
- )
- {
-- nv_state_t *nv = data;
-+ nv_file_private_t *nvfp = s->private;
-+ nv_state_t *nv = nvfp->proc_data;
- nv_linux_state_t *nvl = NULL;
- char *registry_keys;
-
-@@ -596,20 +607,20 @@ nv_procfs_read_registry(
- registry_keys = ((nvl != NULL) ?
- nvl->registry_keys : nv_registry_keys);
-
-- *eof = 1;
-- return sprintf(page, "Binary: \"%s\"\n", registry_keys);
-+ return seq_printf(s, "Binary: \"%s\"\n", registry_keys);
- }
-
--static int
-+static ssize_t
- nv_procfs_write_registry(
- struct file *file,
-- const char *buffer,
-- unsigned long count,
-- void *data
-+ const char *buffer,
-+ size_t count,
-+ loff_t *pos
- )
- {
- int status = 0;
-- nv_file_private_t *nvfp = NV_GET_FILE_PRIVATE(file);
-+ struct seq_file *s = file->private_data;
-+ nv_file_private_t *nvfp = s->private;
- char *proc_buffer;
- unsigned long bytes_left;
-
-@@ -637,30 +648,37 @@ nv_procfs_write_registry(
- }
- else
- {
-- nvfp->proc_data = data;
- nvfp->off += count;
- }
-
-+ *pos = nvfp->off;
-+
- done:
- up(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
-
- return ((status < 0) ? status : (int)count);
- }
-
-+static struct file_operations nv_procfs_registry_fops = {
-+ .owner = THIS_MODULE,
-+ .open = nv_procfs_open_registry,
-+ .read = seq_read,
-+ .write = nv_procfs_write_registry,
-+ .llseek = seq_lseek,
-+ .release = nv_procfs_close_registry,
-+};
-+
- static int
- nv_procfs_read_text_file(
-- char *page,
-- char **start,
-- off_t off,
-- int count,
-- int *eof,
-- void *data
-+ struct seq_file *s,
-+ void *v
- )
- {
-- *eof = 1;
-- return sprintf(page, "%s", (char *)data);
-+ return seq_puts(s, s->private);
- }
-
-+NV_DEFINE_PROCFS_SINGLE_FILE(text_file);
-+
- static void
- nv_procfs_add_text_file(
- struct proc_dir_entry *parent,
-@@ -668,12 +686,14 @@ nv_procfs_add_text_file(
- const char *text
- )
- {
-- NV_CREATE_PROC_FILE(filename, parent,
-- nv_procfs_read_text_file, NULL, NULL, (void *)text);
-+ NV_CREATE_PROC_FILE(filename, parent, text_file, (void *)text);
- }
-
- static void nv_procfs_unregister_all(struct proc_dir_entry *entry)
- {
-+#if defined(NV_PROC_REMOVE_PRESENT)
-+ proc_remove(entry);
-+#else
- while (entry)
- {
- struct proc_dir_entry *next = entry->next;
-@@ -684,6 +704,7 @@ static void nv_procfs_unregister_all(struct proc_dir_entry *entry)
- break;
- entry = next;
- }
-+#endif
- }
- #endif
-
-@@ -713,26 +734,11 @@ int nv_register_procfs(void)
- if (!proc_nvidia)
- goto failed;
-
-- entry = NV_CREATE_PROC_FILE("params", proc_nvidia,
-- nv_procfs_read_params, NULL, NULL, NULL);
-+ entry = NV_CREATE_PROC_FILE("params", proc_nvidia, params, NULL);
- if (!entry)
- goto failed;
-
-- /*
-- * entry->proc_fops originally points to a constant
-- * structure, so to add more methods for the
-- * binary registry write path, we need to replace the
-- * said entry->proc_fops with a new fops structure.
-- * However, in preparation for this, we need to preserve
-- * the procfs read() and write() operations.
-- */
-- nv_procfs_registry_fops.read = entry->proc_fops->read;
-- nv_procfs_registry_fops.write = entry->proc_fops->write;
--
-- entry = NV_CREATE_PROC_FILE("registry", proc_nvidia,
-- nv_procfs_read_registry,
-- nv_procfs_write_registry,
-- &nv_procfs_registry_fops, NULL);
-+ entry = NV_CREATE_PROC_FILE("registry", proc_nvidia, registry, NULL);
- if (!entry)
- goto failed;
-
-@@ -753,8 +759,7 @@ int nv_register_procfs(void)
-
- nv_procfs_add_text_file(proc_nvidia_patches, "README", __README_patches);
-
-- entry = NV_CREATE_PROC_FILE("version", proc_nvidia,
-- nv_procfs_read_version, NULL, NULL, NULL);
-+ entry = NV_CREATE_PROC_FILE("version", proc_nvidia, version, NULL);
- if (!entry)
- goto failed;
-
-@@ -771,15 +776,12 @@ int nv_register_procfs(void)
- if (!proc_nvidia_gpu)
- goto failed;
-
-- entry = NV_CREATE_PROC_FILE("information", proc_nvidia_gpu,
-- nv_procfs_read_gpu_info, NULL, NULL, nv);
-+ entry = NV_CREATE_PROC_FILE("information", proc_nvidia_gpu, gpu_info,
-+ nv);
- if (!entry)
- goto failed;
-
-- entry = NV_CREATE_PROC_FILE("registry", proc_nvidia_gpu,
-- nv_procfs_read_registry,
-- nv_procfs_write_registry,
-- &nv_procfs_registry_fops, nv);
-+ entry = NV_CREATE_PROC_FILE("registry", proc_nvidia_gpu, registry, nv);
- if (!entry)
- goto failed;
-
-@@ -789,18 +791,17 @@ int nv_register_procfs(void)
- if (!proc_nvidia_agp)
- goto failed;
-
-- entry = NV_CREATE_PROC_FILE("status", proc_nvidia_agp,
-- nv_procfs_read_agp_status, NULL, NULL, nv);
-+ entry = NV_CREATE_PROC_FILE("status", proc_nvidia_agp, agp_status,
-+ nv);
- if (!entry)
- goto failed;
-
- entry = NV_CREATE_PROC_FILE("host-bridge", proc_nvidia_agp,
-- nv_procfs_read_agp_info, NULL, NULL, NULL);
-+ agp_info, NULL);
- if (!entry)
- goto failed;
-
-- entry = NV_CREATE_PROC_FILE("gpu", proc_nvidia_agp,
-- nv_procfs_read_agp_info, NULL, NULL, nv);
-+ entry = NV_CREATE_PROC_FILE("gpu", proc_nvidia_agp, agp_info, nv);
- if (!entry)
- goto failed;
- }
diff --git a/linux-3.11.patch b/linux-3.11.patch
deleted file mode 100644
index 0f02fa8..0000000
--- a/linux-3.11.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Description: fix module build for kernel 3.11
-Author: Milos_SD
-Origin: other, https://devtalk.nvidia.com/default/topic/549532/linux/linux-3-10-solved-3-11-solved-incompatibility-in-function-lsquo-nv_i2c_del_adapter-rsquo-error/2/
-
---- a/kernel/nv-linux.h
-+++ b/kernel/nv-linux.h
-@@ -957,7 +957,11 @@ static inline int nv_execute_on_all_cpus
- #endif
-
- #if !defined(NV_VMWARE)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
-+#define NV_NUM_PHYSPAGES get_num_physpages()
-+#else
- #define NV_NUM_PHYSPAGES num_physpages
-+#endif
- #define NV_GET_CURRENT_PROCESS() current->tgid
- #define NV_IN_ATOMIC() in_atomic()
- #define NV_LOCAL_BH_DISABLE() local_bh_disable()
diff --git a/patches.h b/patches.h
deleted file mode 100644
index 892d369..0000000
--- a/patches.h
+++ /dev/null
@@ -1,5 +0,0 @@
-static struct {
- const char *short_description;
- const char *description;
-} __nv_patches[] = {
-{ NULL, NULL } };
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-nvidia-legacy-304xx.git/commitdiff/f30032ce42b7c6e74ee27b3c9b9f405688af4554
More information about the pld-cvs-commit
mailing list