rpms/mock-rpmfusion-free/EL-6 .cvsignore, 1.16, 1.17 mock-rpmfusion-free.spec, 1.18, 1.19 sources, 1.17, 1.18
by Nicolas Chauvet
Author: kwizart
Update of /cvs/free/rpms/mock-rpmfusion-free/EL-6
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv9519/EL-6
Modified Files:
.cvsignore mock-rpmfusion-free.spec sources
Log Message:
Update to 19.1
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/mock-rpmfusion-free/EL-6/.cvsignore,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- .cvsignore 2 Apr 2013 07:17:34 -0000 1.16
+++ .cvsignore 28 Jul 2013 16:15:59 -0000 1.17
@@ -1 +1 @@
-mock-rpmfusion-free-19.0.tar.bz2
+mock-rpmfusion-free-19.1.tar.bz2
Index: mock-rpmfusion-free.spec
===================================================================
RCS file: /cvs/free/rpms/mock-rpmfusion-free/EL-6/mock-rpmfusion-free.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- mock-rpmfusion-free.spec 2 Apr 2013 07:17:34 -0000 1.18
+++ mock-rpmfusion-free.spec 28 Jul 2013 16:15:59 -0000 1.19
@@ -1,5 +1,5 @@
Name: mock-rpmfusion-free
-Version: 19.0
+Version: 19.1
Release: 1%{?dist}
Summary: Mock config files for the RPM Fusion Free Repository
@@ -40,6 +40,10 @@
%changelog
+* Sun Jul 28 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 19.1-1
+- Update to 19.1
+- Add kernel-override repository - disabled by default
+
* Tue Apr 2 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 19.0-1
- Add fedora-19
Index: sources
===================================================================
RCS file: /cvs/free/rpms/mock-rpmfusion-free/EL-6/sources,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- sources 2 Apr 2013 07:17:34 -0000 1.17
+++ sources 28 Jul 2013 16:15:59 -0000 1.18
@@ -1 +1 @@
-7b935061091617b4f75268e690e66f1a mock-rpmfusion-free-19.0.tar.bz2
+64391722635228c20c6cc2706ca8ebc1 mock-rpmfusion-free-19.1.tar.bz2
11 years, 3 months
rpms/dolphin-emu/devel dolphin-emu.spec,1.4,1.5
by Jeremy Newton
Author: jem256
Update of /cvs/nonfree/rpms/dolphin-emu/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv6462/devel
Modified Files:
dolphin-emu.spec
Log Message:
Fix for SFML + GCC 4.8
Index: dolphin-emu.spec
===================================================================
RCS file: /cvs/nonfree/rpms/dolphin-emu/devel/dolphin-emu.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dolphin-emu.spec 23 Feb 2013 18:09:42 -0000 1.4
+++ dolphin-emu.spec 27 Jul 2013 14:19:26 -0000 1.5
@@ -1,6 +1,6 @@
Name: dolphin-emu
Version: 3.5
-Release: 2%{?dist}
+Release: 4%{?dist}
Summary: Gamecube / Wii / Triforce Emulator
Url: http://www.dolphin-emulator.com/
@@ -42,7 +42,7 @@
BuildRequires: zlib-devel
BuildRequires: Cg
BuildRequires: scons
-BuildRequires: SFML-devel
+BuildRequires: compat-SFML16-devel
BuildRequires: SOIL-devel
BuildRequires: gettext
BuildRequires: desktop-file-utils
@@ -60,7 +60,12 @@
%setup -q -a 1
%patch0 -p1 -b .clrun
%patch1 -p1 -b .wx28
+
+#Patch for GCC 4.8
+sed -i 's/_rot/__rot/g' Externals/Bochs_disasm/PowerPCDisasm.cpp Externals/wxWidgets3/include/wx/image.h Externals/wxWidgets3/src/generic/graphicc.cpp Externals/wxWidgets3/src/common/cairo.cpp Externals/wxWidgets3/src/common/image.cpp Externals/wxWidgets3/src/gtk/gnome/gprint.cpp Externals/wxWidgets3/src/gtk/dcclient.cpp Externals/wxWidgets3/src/gtk/print.cpp Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_Integer.cpp Source/Core/Core/Src/ARDecrypt.cpp Source/Core/Common/Src/CommonFuncs.h Source/Core/Common/Src/Hash.cpp
+#Various CMAKE fixes
sed -i '/CMAKE_C.*_FLAGS/d' CMakeLists.txt
+sed -i 's/ AND NOT SFML_VERSION_MAJOR//g' CMakeLists.txt
#Remove all Bundled Libraries except Bochs:
cd Externals
@@ -121,6 +126,12 @@
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
+* Sat Jul 27 2013 Jeremy Newton <alexjnewt(a)hotmail.com> - 3.5-4
+- Updated for SFML 2.0 update
+
+* Fri Jul 26 2013 Jeremy Newton <alexjnewt(a)hotmail.com> - 3.5-3
+- GCC 4.8 Fix (Fedora 19 and onwards)
+
* Tue Feb 19 2013 Jeremy Newton <alexjnewt(a)hotmail.com> - 3.5-2
- Fixed date typos in SPEC
11 years, 4 months
rpms/dolphin-emu/F-19 dolphin-emu.spec,1.5,1.6
by Jeremy Newton
Author: jem256
Update of /cvs/nonfree/rpms/dolphin-emu/F-19
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv6317/F-19
Modified Files:
dolphin-emu.spec
Log Message:
Fix for SFML
Index: dolphin-emu.spec
===================================================================
RCS file: /cvs/nonfree/rpms/dolphin-emu/F-19/dolphin-emu.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- dolphin-emu.spec 27 Jul 2013 13:44:14 -0000 1.5
+++ dolphin-emu.spec 27 Jul 2013 14:18:47 -0000 1.6
@@ -1,6 +1,6 @@
Name: dolphin-emu
Version: 3.5
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Gamecube / Wii / Triforce Emulator
Url: http://www.dolphin-emulator.com/
@@ -42,7 +42,7 @@
BuildRequires: zlib-devel
BuildRequires: Cg
BuildRequires: scons
-BuildRequires: SFML-devel
+BuildRequires: compat-SFML16-devel
BuildRequires: SOIL-devel
BuildRequires: gettext
BuildRequires: desktop-file-utils
@@ -126,6 +126,9 @@
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
+* Sat Jul 27 2013 Jeremy Newton <alexjnewt(a)hotmail.com> - 3.5-4
+- Updated for SFML 2.0 update
+
* Fri Jul 26 2013 Jeremy Newton <alexjnewt(a)hotmail.com> - 3.5-3
- GCC 4.8 Fix (Fedora 19 and onwards)
11 years, 4 months
rpms/dolphin-emu/F-19 dolphin-emu.spec,1.4,1.5
by Jeremy Newton
Author: jem256
Update of /cvs/nonfree/rpms/dolphin-emu/F-19
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv29153/F-19
Modified Files:
dolphin-emu.spec
Log Message:
Update for GCC 4.8
Index: dolphin-emu.spec
===================================================================
RCS file: /cvs/nonfree/rpms/dolphin-emu/F-19/dolphin-emu.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dolphin-emu.spec 23 Feb 2013 18:09:42 -0000 1.4
+++ dolphin-emu.spec 27 Jul 2013 13:44:14 -0000 1.5
@@ -1,6 +1,6 @@
Name: dolphin-emu
Version: 3.5
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Gamecube / Wii / Triforce Emulator
Url: http://www.dolphin-emulator.com/
@@ -60,7 +60,12 @@
%setup -q -a 1
%patch0 -p1 -b .clrun
%patch1 -p1 -b .wx28
+
+#Patch for GCC 4.8
+sed -i 's/_rot/__rot/g' Externals/Bochs_disasm/PowerPCDisasm.cpp Externals/wxWidgets3/include/wx/image.h Externals/wxWidgets3/src/generic/graphicc.cpp Externals/wxWidgets3/src/common/cairo.cpp Externals/wxWidgets3/src/common/image.cpp Externals/wxWidgets3/src/gtk/gnome/gprint.cpp Externals/wxWidgets3/src/gtk/dcclient.cpp Externals/wxWidgets3/src/gtk/print.cpp Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_Integer.cpp Source/Core/Core/Src/ARDecrypt.cpp Source/Core/Common/Src/CommonFuncs.h Source/Core/Common/Src/Hash.cpp
+#Various CMAKE fixes
sed -i '/CMAKE_C.*_FLAGS/d' CMakeLists.txt
+sed -i 's/ AND NOT SFML_VERSION_MAJOR//g' CMakeLists.txt
#Remove all Bundled Libraries except Bochs:
cd Externals
@@ -121,6 +126,9 @@
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
+* Fri Jul 26 2013 Jeremy Newton <alexjnewt(a)hotmail.com> - 3.5-3
+- GCC 4.8 Fix (Fedora 19 and onwards)
+
* Tue Feb 19 2013 Jeremy Newton <alexjnewt(a)hotmail.com> - 3.5-2
- Fixed date typos in SPEC
11 years, 4 months
rpms/wl-kmod/F-19 wl-kmod.spec,1.84,1.85
by Nicolas Chauvet
Author: kwizart
Update of /cvs/nonfree/rpms/wl-kmod/F-19
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv22699
Modified Files:
wl-kmod.spec
Log Message:
Rebuilt for wl
Index: wl-kmod.spec
===================================================================
RCS file: /cvs/nonfree/rpms/wl-kmod/F-19/wl-kmod.spec,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- wl-kmod.spec 26 Jul 2013 09:10:34 -0000 1.84
+++ wl-kmod.spec 27 Jul 2013 13:40:21 -0000 1.85
@@ -3,11 +3,11 @@
# "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 newest
Name: wl-kmod
Version: 5.100.82.112
-Release: 11%{?dist}.1
+Release: 11%{?dist}.2
Summary: Kernel module for Broadcom wireless devices
Group: System Environment/Kernel
License: Redistributable, no modification permitted
11 years, 4 months
rpms/nvidia-304xx-kmod/F-19 nvidia_304.88_linux_3.10.patch, NONE, 1.1 nvidia-304xx-kmod.spec, 1.9, 1.10
by Leigh Scott
Author: leigh123linux
Update of /cvs/nonfree/rpms/nvidia-304xx-kmod/F-19
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv23698
Modified Files:
nvidia-304xx-kmod.spec
Added Files:
nvidia_304.88_linux_3.10.patch
Log Message:
* Fri Jul 26 2013 Leigh Scott <leigh123linux(a)googlemail.com> - 304.88-2
- patch for 3.10 kernel
nvidia_304.88_linux_3.10.patch:
nv-i2c.c | 14 --
nv-procfs.c | 411 ++++++++++++++++++++++++++++++------------------------------
2 files changed, 215 insertions(+), 210 deletions(-)
--- NEW FILE nvidia_304.88_linux_3.10.patch ---
diff -urN a/kernel/nv-i2c.c b/kernel/nv-i2c.c
--- a/kernel/nv-i2c.c 2013-03-27 17:26:51.000000000 -0400
+++ b/kernel/nv-i2c.c 2013-07-05 10:04:23.000000000 -0400
@@ -1,3 +1,4 @@
+
/* _NVRM_COPYRIGHT_BEGIN_
*
* Copyright 2005-2011 by NVIDIA Corporation. All rights reserved. All
@@ -311,8 +312,6 @@
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))
@@ -324,15 +323,10 @@
if (!pI2cAdapter) return FALSE;
// attempt release with the OS
- osstatus = i2c_del_adapter(pI2cAdapter);
-
- if (!osstatus)
- {
- os_free_mem(pI2cAdapter);
- wasReleased = TRUE;
- }
+ i2c_del_adapter(pI2cAdapter);
+ os_free_mem(pI2cAdapter);
- return wasReleased;
+ return TRUE;
}
#else // (defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE))
diff -urN a/kernel/nv-procfs.c b/kernel/nv-procfs.c
--- a/kernel/nv-procfs.c 2013-03-27 17:26:51.000000000 -0400
+++ b/kernel/nv-procfs.c 2013-07-05 10:12:52.000000000 -0400
@@ -60,60 +60,41 @@
__entry; \
})
-#define NV_CREATE_PROC_FILE(name,parent,__read_proc, \
- __write_proc,__fops,__data) \
- ({ \
- 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); \
- 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); \
- } \
- __entry; \
- })
+#define NV_PROC_RW (S_IFREG|S_IRUGO|S_IWUSR)
+#define NV_PROC_RO (S_IFREG|S_IRUGO)
#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 = proc_mkdir_mode(name, __mode, parent); \
__entry; \
})
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,9,255)
+static inline void *PDE_DATA(const struct inode *inode) {
+ return PDE(inode)->data;
+}
+#endif
+
#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
+nv_procfs_show_gpu_info(
+ struct seq_file *m,
+ void *v
)
{
- nv_state_t *nv = data;
+ nv_state_t *nv = m->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)
{
@@ -134,31 +115,31 @@
if (rm_get_device_name(sp, nv, dev->device, dev->subsystem_vendor,
dev->subsystem_device, NV_DEVICE_NAME_LENGTH,
tmpstr) != RM_OK)
- {
+ {
strcpy (tmpstr, "Unknown");
}
}
- len += sprintf(page+len, "Model: \t\t %s\n", tmpstr);
- len += sprintf(page+len, "IRQ: \t\t %d\n", nv->interrupt_line);
+ seq_printf(m, "Model: \t\t %s\n", tmpstr);
+ seq_printf(m, "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(m, "Firmware: \t ????.??.??\n");
else
{
fmt = "Firmware: \t %x.%x.%x\n";
- len += sprintf(page+len, fmt, fpga_rev1, fpga_rev2, fpga_rev3);
+ seq_printf(m, 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(m, "GPU UUID: \t %s\n", (char *)uuid);
os_free_mem(uuid);
}
@@ -166,12 +147,12 @@
&vbios_rev3, &vbios_rev4,
&vbios_rev5) != RM_OK)
{
- len += sprintf(page+len, "Video BIOS: \t ??.??.??.??.??\n");
+ seq_printf(m, "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,
+ seq_printf(m, fmt, vbios_rev1, vbios_rev2, vbios_rev3,
vbios_rev4, vbios_rev5);
}
}
@@ -182,12 +163,12 @@
type = "PCI-E";
else
type = "PCI";
- len += sprintf(page+len, "Bus Type: \t %s\n", type);
+ seq_printf(m, "Bus Type: \t %s\n", type);
- len += sprintf(page+len, "DMA Size: \t %d bits\n",
+ seq_printf(m, "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",
+ seq_printf(m, "DMA Mask: \t 0x%llx\n", dev->dma_mask);
+ seq_printf(m, "Bus Location: \t %04x:%02x.%02x.%x\n",
nv->domain, nv->bus, nv->slot, PCI_FUNC(dev->devfn));
#if defined(DEBUG)
do
@@ -195,7 +176,7 @@
int j;
for (j = 0; j < NV_GPU_NUM_BARS; j++)
{
- len += sprintf(page+len, "BAR%u: \t\t 0x%llx (%lluMB)\n",
+ seq_printf(m, "BAR%u: \t\t 0x%llx (%lluMB)\n",
j, nv->bars[j].address, (nv->bars[j].size >> 20));
}
} while (0);
@@ -203,26 +184,120 @@
NV_KMEM_CACHE_FREE_STACK(sp);
- return len;
+ return 0;
}
static int
-nv_procfs_read_version(
- char *page,
- char **start,
- off_t off,
- int count,
- int *eof,
- void *data
+nv_procfs_open_gpu_info(
+ struct inode *inode,
+ struct file *file
)
{
- int len = 0;
- *eof = 1;
+ return single_open(file, nv_procfs_show_gpu_info, PDE_DATA(inode));
+}
- len += sprintf(page+len, "NVRM version: %s\n", pNVRM_ID);
- len += sprintf(page+len, "GCC version: %s\n", NV_COMPILER);
+static const struct file_operations nv_procfs_gpu_info_fops = {
+ .owner = THIS_MODULE,
+ .open = nv_procfs_open_gpu_info,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
- return len;
+static int
+nv_procfs_show_version(
+ struct seq_file *m,
+ void *v
+)
+{
+ seq_printf(m, "NVRM version: %s\n", pNVRM_ID);
+ seq_printf(m, "GCC version: %s\n", NV_COMPILER);
+
+ return 0;
+}
+
+static int
+nv_procfs_open_version(
+ struct inode *inode,
+ struct file *file
+)
+{
+ return single_open(file, nv_procfs_show_version, NULL);
+}
+
+static const struct file_operations nv_procfs_version_fops = {
+ .owner = THIS_MODULE,
+ .open = nv_procfs_open_version,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
+static int
+nv_procfs_show_registry(
+ struct seq_file *m,
+ void *v
+)
+{
+ nv_state_t *nv = m->private;
+ nv_linux_state_t *nvl = NULL;
+ char *registry_keys;
+
+ if (nv != NULL)
+ nvl = NV_GET_NVL_FROM_NV_STATE(nv);
+ registry_keys = ((nvl != NULL) ?
+ nvl->registry_keys : nv_registry_keys);
+
+ seq_printf(m, "Binary: \"%s\"\n", registry_keys);
+
+ return 0;
+}
+
+static ssize_t
+nv_procfs_write_registry(
+ struct file *file,
+ const char __user *buffer,
+ size_t count,
+ loff_t *pos
+)
+{
+ int status = 0;
+ nv_file_private_t *nvfp = NV_GET_FILE_PRIVATE(file);
+ char *proc_buffer;
+ unsigned long bytes_left;
+
+ down(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
+
+ bytes_left = (NV_PROC_WRITE_BUFFER_SIZE - nvfp->off - 1);
+
+ if (count == 0)
+ {
+ status = -EINVAL;
+ goto done;
+ }
+ else if ((bytes_left == 0) || (count > bytes_left))
+ {
+ status = -ENOSPC;
+ goto done;
+ }
+
+ proc_buffer = &((char *)nvfp->data)[nvfp->off];
+
+ if (copy_from_user(proc_buffer, buffer, count))
+ {
+ nv_printf(NV_DBG_ERRORS, "NVRM: failed to copy in proc data!\n");
+ status = -EFAULT;
+ }
+ else
+ {
+ nvfp->proc_data = PDE_DATA(file->f_inode);
+ nvfp->off += count;
+ }
+
+done:
+ up(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
+
+ return ((status < 0) ? status : count);
}
static struct pci_dev *nv_get_agp_device_by_class(unsigned int class)
@@ -432,7 +507,7 @@
nv_stack_t *sp = NULL;
if (0 == (file->f_mode & FMODE_WRITE))
- return 0;
+ return single_open(file, nv_procfs_show_registry, PDE_DATA(inode));
nvfp = nv_alloc_file_private();
if (nvfp == NULL)
@@ -481,6 +556,9 @@
RM_STATUS rm_status;
int rc = 0;
+ if (0 == (file->f_mode & FMODE_WRITE))
+ return single_release(inode, file);
+
nvfp = NV_GET_FILE_PRIVATE(file);
if (nvfp == NULL)
return 0;
@@ -545,122 +623,84 @@
return rc;
}
-static struct file_operations nv_procfs_registry_fops = {
+static const struct file_operations nv_procfs_registry_fops = {
.open = nv_procfs_open_registry,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .write = nv_procfs_write_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
+nv_procfs_show_params(
+ struct seq_file *m,
+ 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(m, "%s: %u\n", entry->name, *entry->data);
- len += sprintf(page+len, "RegistryDwords: \"%s\"\n",
+ seq_printf(m, "RegistryDwords: \"%s\"\n",
(NVreg_RegistryDwords != NULL) ? NVreg_RegistryDwords : "");
- len += sprintf(page+len, "RmMsg: \"%s\"\n",
+seq_printf(m, "RmMsg: \"%s\"\n",
(NVreg_RmMsg != NULL) ? NVreg_RmMsg : "");
- return len;
+ return 0;
}
static int
-nv_procfs_read_registry(
- char *page,
- char **start,
- off_t off,
- int count,
- int *eof,
- void *data
-)
+nv_procfs_open_params(
+ struct inode *inode,
+ struct file *file
+)
{
- nv_state_t *nv = data;
- nv_linux_state_t *nvl = NULL;
- char *registry_keys;
-
- if (nv != NULL)
- nvl = NV_GET_NVL_FROM_NV_STATE(nv);
- registry_keys = ((nvl != NULL) ?
- nvl->registry_keys : nv_registry_keys);
- *eof = 1;
- return sprintf(page, "Binary: \"%s\"\n", registry_keys);
+return single_open(file, nv_procfs_show_params, NULL);
}
+
+
+static const struct file_operations nv_procfs_params_fops = {
+ .owner = THIS_MODULE,
+ .open = nv_procfs_open_params,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
static int
-nv_procfs_write_registry(
- struct file *file,
- const char *buffer,
- unsigned long count,
- void *data
+nv_procfs_show_text_file(
+ struct seq_file *m,
+ void *v
)
{
- int status = 0;
- nv_file_private_t *nvfp = NV_GET_FILE_PRIVATE(file);
- char *proc_buffer;
- unsigned long bytes_left;
+ seq_printf(m, "%s", (char *)m->private);
- down(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
-
- bytes_left = (NV_PROC_WRITE_BUFFER_SIZE - nvfp->off - 1);
-
- if (count == 0)
- {
- status = -EINVAL;
- goto done;
- }
- else if ((bytes_left == 0) || (count > bytes_left))
- {
- status = -ENOSPC;
- goto done;
- }
-
- proc_buffer = &((char *)nvfp->data)[nvfp->off];
-
- if (copy_from_user(proc_buffer, buffer, count))
- {
- nv_printf(NV_DBG_ERRORS, "NVRM: failed to copy in proc data!\n");
- status = -EFAULT;
- }
- else
- {
- nvfp->proc_data = data;
- nvfp->off += count;
- }
-
-done:
- up(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
-
- return ((status < 0) ? status : (int)count);
+ return 0;
}
static int
-nv_procfs_read_text_file(
- char *page,
- char **start,
- off_t off,
- int count,
- int *eof,
- void *data
+nv_procfs_open_text_file(
+ struct inode *inode,
+ struct file *file
)
{
- *eof = 1;
- return sprintf(page, "%s", (char *)data);
+ return single_open(file, nv_procfs_show_text_file, PDE_DATA(inode));
}
+
+static const struct file_operations nv_procfs_text_fops = {
+ .owner = THIS_MODULE,
+ .open = nv_procfs_open_text_file,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
static void
nv_procfs_add_text_file(
struct proc_dir_entry *parent,
@@ -668,22 +708,7 @@
const char *text
)
{
- NV_CREATE_PROC_FILE(filename, parent,
- nv_procfs_read_text_file, NULL, NULL, (void *)text);
-}
-
-static void nv_procfs_unregister_all(struct proc_dir_entry *entry)
-{
- while (entry)
- {
- struct proc_dir_entry *next = entry->next;
- if (entry->subdir)
- nv_procfs_unregister_all(entry->subdir);
- remove_proc_entry(entry->name, entry->parent);
- if (entry == proc_nvidia)
- break;
- entry = next;
- }
+ proc_create_data(filename, NV_PROC_RO, parent, &nv_procfs_text_fops, (void *)text);
}
#endif
@@ -713,26 +738,11 @@
if (!proc_nvidia)
goto failed;
- entry = NV_CREATE_PROC_FILE("params", proc_nvidia,
- nv_procfs_read_params, NULL, NULL, NULL);
+ entry = proc_create("params", NV_PROC_RO, proc_nvidia, &nv_procfs_params_fops);
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 = proc_create("registry", NV_PROC_RW, proc_nvidia, &nv_procfs_registry_fops);
if (!entry)
goto failed;
@@ -753,8 +763,7 @@
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 = proc_create("version", NV_PROC_RO, proc_nvidia, &nv_procfs_version_fops);
if (!entry)
goto failed;
@@ -771,15 +780,11 @@
if (!proc_nvidia_gpu)
goto failed;
- entry = NV_CREATE_PROC_FILE("information", proc_nvidia_gpu,
- nv_procfs_read_gpu_info, NULL, NULL, nv);
+ entry = proc_create_data("information", NV_PROC_RO, proc_nvidia_gpu, &nv_procfs_gpu_info_fops, 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 = proc_create_data("registry", NV_PROC_RW, proc_nvidia_gpu, &nv_procfs_registry_fops, nv);
if (!entry)
goto failed;
@@ -788,28 +793,34 @@
proc_nvidia_agp = NV_CREATE_PROC_DIR("agp", proc_nvidia);
if (!proc_nvidia_agp)
goto failed;
-
- entry = NV_CREATE_PROC_FILE("status", proc_nvidia_agp,
- nv_procfs_read_agp_status, NULL, NULL, nv);
- if (!entry)
- goto failed;
-
- entry = NV_CREATE_PROC_FILE("host-bridge", proc_nvidia_agp,
- nv_procfs_read_agp_info, NULL, NULL, NULL);
- if (!entry)
- goto failed;
-
- entry = NV_CREATE_PROC_FILE("gpu", proc_nvidia_agp,
- nv_procfs_read_agp_info, NULL, NULL, nv);
- if (!entry)
- goto failed;
+//
+// - entry = NV_CREATE_PROC_FILE("params", proc_nvidia,
+//- nv_procfs_read_params, NULL, NULL, NULL);
+//+ entry = proc_create("params", NV_PROC_RO, proc_nvidia, &nv_procfs_params_fops);
+
+ // entry = NV_CREATE_PROC_FILE("status", proc_nvidia_agp,
+ // nv_procfs_read_agp_status, NULL, NULL, nv);
+// entry = proc_create("status", NV_PROC_RO, proc_nvidia, &nv_procfs_params_fops);
+
+ // if (!entry)
+ // goto failed;
+
+ // entry = NV_CREATE_PROC_FILE("host-bridge", proc_nvidia_agp,
+ // nv_procfs_read_agp_info, NULL, NULL, NULL);
+ // if (!entry)
+ // goto failed;
+
+ //entry = NV_CREATE_PROC_FILE("gpu", proc_nvidia_agp,
+ // nv_procfs_read_agp_info, NULL, NULL, nv);
+ //if (!entry)
+ // goto failed;
}
}
#endif
return 0;
#if defined(CONFIG_PROC_FS)
failed:
- nv_procfs_unregister_all(proc_nvidia);
+ remove_proc_subtree("nvidia", proc_nvidia);
return -1;
#endif
}
@@ -817,6 +828,6 @@
void nv_unregister_procfs(void)
{
#if defined(CONFIG_PROC_FS)
- nv_procfs_unregister_all(proc_nvidia);
+ remove_proc_subtree("nvidia", proc_nvidia);
#endif
}
Index: nvidia-304xx-kmod.spec
===================================================================
RCS file: /cvs/nonfree/rpms/nvidia-304xx-kmod/F-19/nvidia-304xx-kmod.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- nvidia-304xx-kmod.spec 26 Jul 2013 09:10:07 -0000 1.9
+++ nvidia-304xx-kmod.spec 26 Jul 2013 23:06:24 -0000 1.10
@@ -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: 1%{?dist}.8
+Release: 2%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -20,6 +20,7 @@
Source11: nvidia-304xx-kmodtool-excludekernel-filterfile
+Patch0: nvidia_304.88_linux_3.10.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -46,7 +47,7 @@
for arch in x86 x64
do
pushd nvidiapkg-${arch}
- echo "NoPatch"
+%patch0 -p1
popd
done
@@ -80,6 +81,9 @@
%changelog
+* Fri Jul 26 2013 Leigh Scott <leigh123linux(a)googlemail.com> - 304.88-2
+- patch for 3.10 kernel
+
* Fri Jul 26 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 304.88-1.8
- Rebuilt for kernel
11 years, 4 months
rpms/nvidia-173xx-kmod/F-19 fix-build-with-linux-3.10.patch, NONE, 1.1 nvidia-173xx-kmod.spec, 1.57, 1.58
by Leigh Scott
Author: leigh123linux
Update of /cvs/nonfree/rpms/nvidia-173xx-kmod/F-19
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv22633
Modified Files:
nvidia-173xx-kmod.spec
Added Files:
fix-build-with-linux-3.10.patch
Log Message:
* Fri Jul 26 2013 Leigh Scott <leigh123linux(a)googlemail.com> - 173.14.37-2
- patch for 3.10 kernel
fix-build-with-linux-3.10.patch:
nv-i2c.c | 13 --
nv-linux.h | 1
nv.c | 376 ++++++++++++++++++++++++++++++++++++++-----------------------
3 files changed, 241 insertions(+), 149 deletions(-)
--- NEW FILE fix-build-with-linux-3.10.patch ---
>From c3248bb6c976c112e9efa9e8f202590b2f9b40a5 Mon Sep 17 00:00:00 2001
From: Alberto Milone <alberto.milone(a)canonical.com>
Date: Tue, 18 Jun 2013 15:16:18 +0200
Subject: [PATCH 1/1] Add support for Linux 3.10
---
nv-i2c.c | 13 +--
nv-linux.h | 1 +
nv.c | 375 ++++++++++++++++++++++++++++++++++++++----------------------
3 files changed, 241 insertions(+), 148 deletions(-)
diff --git a/usr/src/nv/nv-i2c.c b/usr/src/nv/nv-i2c.c
index 143f9e4..aaee787 100644
--- a/usr/src/nv/nv-i2c.c
+++ b/usr/src/nv/nv-i2c.c
@@ -307,8 +307,6 @@ void* NV_API_CALL nv_i2c_add_adapter(nv_state_t *nv, U032 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))
@@ -320,15 +318,10 @@ 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;
- }
+ i2c_del_adapter(pI2cAdapter);
+ os_free_mem(pI2cAdapter);
- return wasReleased;
+ return TRUE;
}
#else // (defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE))
diff --git a/usr/src/nv/nv-linux.h b/usr/src/nv/nv-linux.h
index 963e059..9aac81a 100644
--- a/usr/src/nv/nv-linux.h
+++ b/usr/src/nv/nv-linux.h
@@ -163,6 +163,7 @@
#ifdef CONFIG_PROC_FS
#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
#endif
#ifdef CONFIG_MTRR
diff --git a/usr/src/nv/nv.c b/usr/src/nv/nv.c
index f82e46f..570c266 100644
--- a/usr/src/nv/nv.c
+++ b/usr/src/nv/nv.c
@@ -291,7 +291,6 @@ void NV_API_CALL nv_verify_pci_config(nv_state_t *nv, BOOL check_the_bars)
/* nvos_ functions.. do not take a state device parameter */
static void nvos_proc_create(void);
-static void nvos_proc_remove_all(struct proc_dir_entry *);
static void nvos_proc_remove(void);
static int nvos_count_devices(nv_stack_t *);
@@ -333,12 +332,34 @@ void nv_kern_rc_timer(unsigned long);
static int nv_kern_apm_event(struct pm_dev *, pm_request_t, void *);
#endif
-static int nv_kern_read_cardinfo(char *, char **, off_t off, int, int *, void *);
-static int nv_kern_read_status(char *, char **, off_t off, int, int *, void *);
-static int nv_kern_read_registry(char *, char **, off_t off, int, int *, void *);
-static int nv_kern_read_agpinfo(char *, char **, off_t off, int, int *, void *);
-static int nv_kern_read_version(char *, char **, off_t off, int, int *, void *);
-static int nv_kern_read_text_file(char *, char **, off_t off, int, int *, void *);
+static const struct file_operations nv_procfs_text_fops;
+static const struct file_operations nv_procfs_read_card_info_fops;
+static const struct file_operations nv_procfs_version_fops;
+static const struct file_operations nv_procfs_read_agp_info_fops;
+static const struct file_operations nv_procfs_read_agp_info_gpu_fops;
+static const struct file_operations nv_procfs_read_agp_status_fops;
+static const struct file_operations nv_procfs_registry_fops;
+
+static int nv_procfs_show_text_file(struct seq_file *, void *);
+static int nv_procfs_open_text_file(struct inode *, struct file *);
+static void nvos_proc_add_text_file(struct proc_dir_entry *, const char *, const char *);
+
+static int nv_procfs_show_card_info(struct seq_file *, void *);
+static int nv_procfs_read_card_info(struct inode *, struct file *);
+
+static int nv_procfs_show_version(struct seq_file *, void *);
+static int nv_procfs_open_version(struct inode *, struct file *);
+
+static int nv_procfs_show_agp_info(struct seq_file *, void *);
+static int nv_procfs_read_agp_info(struct inode *, struct file *);
+
+static int nv_procfs_read_agp_info_gpu(struct inode *, struct file *file);
+static int nv_procfs_show_agp_status(struct seq_file *, void *);
+static int nv_procfs_read_agp_status(struct inode *, struct file *);
+
+static int nv_procfs_show_registry(struct seq_file *, void *);
+static int nv_procfs_open_registry(struct inode *, struct file *);
+
int nv_kern_ctl_open(struct inode *, struct file *);
int nv_kern_ctl_close(struct inode *, struct file *);
@@ -604,6 +625,12 @@ static struct pci_dev* nv_get_pci_device(nv_state_t *nv)
return NULL;
}
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,9,255)
+static inline void *PDE_DATA(const struct inode *inode) {
+ return PDE(inode)->data;
+}
+#endif
+
static void nvos_proc_create(void)
{
#ifdef CONFIG_PROC_FS
@@ -623,19 +650,19 @@ static void nvos_proc_create(void)
nv_state_t *nv;
nv_linux_state_t *nvl;
- proc_nvidia = create_proc_entry("driver/nvidia", d_flags, NULL);
+ proc_nvidia = proc_mkdir_mode("driver/nvidia", d_flags, NULL);
if (!proc_nvidia)
goto failed;
- proc_nvidia_cards = create_proc_entry("cards", d_flags, proc_nvidia);
+ proc_nvidia_cards = proc_mkdir_mode("cards", d_flags, proc_nvidia);
if (!proc_nvidia_cards)
goto failed;
- proc_nvidia_warnings = create_proc_entry("warnings", d_flags, proc_nvidia);
+ proc_nvidia_warnings = proc_mkdir_mode("warnings", d_flags, proc_nvidia);
if (!proc_nvidia_warnings)
goto failed;
- proc_nvidia_patches = create_proc_entry("patches", d_flags, proc_nvidia);
+ proc_nvidia_patches = proc_mkdir_mode("patches", d_flags, proc_nvidia);
if (!proc_nvidia_patches)
goto failed;
@@ -660,24 +687,19 @@ static void nvos_proc_create(void)
break;
sprintf(name, "%d", i++);
- entry = create_proc_entry(name, flags, proc_nvidia_cards);
+ entry = proc_create_data(name, flags, proc_nvidia_cards,
+ &nv_procfs_read_card_info_fops, nv);
if (!entry) {
NV_PCI_DEV_PUT(dev);
goto failed;
}
- entry->data = nv;
- entry->read_proc = nv_kern_read_cardinfo;
-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
- entry->owner = THIS_MODULE;
-#endif
-
if (nvos_find_agp_capability(dev)) {
/*
* Create the /proc/driver/nvidia/agp/{status,host-bridge,card}
* entries now that we know there's AGP hardware.
*/
- entry = create_proc_entry("agp", d_flags, proc_nvidia);
+ entry = proc_mkdir_mode("agp", d_flags, proc_nvidia);
if (!entry) {
NV_PCI_DEV_PUT(dev);
goto failed;
@@ -688,72 +710,78 @@ static void nvos_proc_create(void)
#endif
proc_nvidia_agp = entry;
- entry = create_proc_entry("status", flags, proc_nvidia_agp);
+ entry = proc_create_data("status", flags, proc_nvidia_agp,
+ &nv_procfs_read_agp_status_fops, nv);
if (!entry) {
NV_PCI_DEV_PUT(dev);
goto failed;
}
- entry->data = nv;
- entry->read_proc = nv_kern_read_status;
-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
- entry->owner = THIS_MODULE;
-#endif
+ entry = proc_create("host-bridge", flags, proc_nvidia_agp,
+ &nv_procfs_read_agp_info_fops);
- entry = create_proc_entry("host-bridge", flags, proc_nvidia_agp);
if (!entry) {
NV_PCI_DEV_PUT(dev);
goto failed;
}
- entry->data = NULL;
- entry->read_proc = nv_kern_read_agpinfo;
-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
- entry->owner = THIS_MODULE;
-#endif
-
- entry = create_proc_entry("card", flags, proc_nvidia_agp);
+ entry = proc_create_data("card", flags, proc_nvidia_agp,
+ &nv_procfs_read_agp_info_gpu_fops, nv);
if (!entry) {
NV_PCI_DEV_PUT(dev);
goto failed;
}
- entry->data = nv;
- entry->read_proc = nv_kern_read_agpinfo;
-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
- entry->owner = THIS_MODULE;
-#endif
}
NV_PCI_DEV_PUT(dev);
}
- entry = create_proc_entry("version", flags, proc_nvidia);
+ entry = proc_create("version", flags, proc_nvidia, &nv_procfs_version_fops);
if (!entry)
goto failed;
- entry->read_proc = nv_kern_read_version;
-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
- entry->owner = THIS_MODULE;
-#endif
-
- entry = create_proc_entry("registry", flags, proc_nvidia);
+ entry = proc_create("registry", flags, proc_nvidia,
+ &nv_procfs_registry_fops);
if (!entry)
goto failed;
- entry->read_proc = nv_kern_read_registry;
-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
- entry->owner = THIS_MODULE;
-#endif
-
return;
failed:
nv_printf(NV_DBG_ERRORS, "NVRM: failed to create /proc entries!\n");
- nvos_proc_remove_all(proc_nvidia);
+ remove_proc_subtree("nvidia", proc_nvidia);
#endif
}
+static int
+nv_procfs_show_text_file(
+ struct seq_file *m,
+ void *v
+)
+{
+ seq_printf(m, "%s", (char *)m->private);
+
+ return 0;
+}
+
+static int
+nv_procfs_open_text_file(
+ struct inode *inode,
+ struct file *file
+)
+{
+ return single_open(file, nv_procfs_show_text_file, PDE_DATA(inode));
+}
+
+static const struct file_operations nv_procfs_text_fops = {
+ .owner = THIS_MODULE,
+ .open = nv_procfs_open_text_file,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
static void
nvos_proc_add_text_file(
struct proc_dir_entry *parent,
@@ -762,41 +790,18 @@ nvos_proc_add_text_file(
)
{
#ifdef CONFIG_PROC_FS
- struct proc_dir_entry *entry;
-
/* world readable file */
int flags = S_IFREG | S_IRUGO;
- entry = create_proc_entry(filename, flags, parent);
- if (!entry) return;
-
- entry->data = (void *)text;
- entry->read_proc = nv_kern_read_text_file;
-#if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
- entry->owner = THIS_MODULE;
-#endif
+ proc_create_data(filename, flags, parent, &nv_procfs_text_fops,
+ (void *)text);
#endif
}
-#ifdef CONFIG_PROC_FS
-static void nvos_proc_remove_all(struct proc_dir_entry *entry)
-{
- while (entry) {
- struct proc_dir_entry *next = entry->next;
- if (entry->subdir)
- nvos_proc_remove_all(entry->subdir);
- remove_proc_entry(entry->name, entry->parent);
- if (entry == proc_nvidia)
- break;
- entry = next;
- }
-}
-#endif
-
static void nvos_proc_remove(void)
{
#ifdef CONFIG_PROC_FS
- nvos_proc_remove_all(proc_nvidia);
+ remove_proc_subtree("nvidia", proc_nvidia);
#endif
}
@@ -3065,18 +3070,19 @@ void NV_API_CALL nv_set_dma_address_size(
}
static int
-nv_kern_read_cardinfo(char *page, char **start, off_t off,
- int count, int *eof, void *data)
+nv_procfs_show_card_info(
+ struct seq_file *m,
+ void *v
+)
{
struct pci_dev *dev;
char *type, *fmt, tmpstr[NV_DEVICE_NAME_LENGTH];
- int len = 0, status;
+ int status;
U032 vbios_rev1, vbios_rev2, vbios_rev3, vbios_rev4, vbios_rev5;
nv_stack_t *sp = NULL;
nv_state_t *nv;
- nv = (nv_state_t *) data;
- *eof = 1;
+ nv = (nv_state_t *) m->private;
dev = nv_get_pci_device(nv);
if (!dev)
@@ -3094,38 +3100,38 @@ nv_kern_read_cardinfo(char *page, char **start, off_t off,
strcpy (tmpstr, "Unknown");
}
- len += sprintf(page+len, "Model: \t\t %s\n", tmpstr);
- len += sprintf(page+len, "IRQ: \t\t %d\n", nv->interrupt_line);
+ seq_printf(m, "Model: \t\t %s\n", tmpstr);
+ seq_printf(m, "IRQ: \t\t %d\n", nv->interrupt_line);
status = rm_get_vbios_version(sp, nv, &vbios_rev1, &vbios_rev2,
&vbios_rev3, &vbios_rev4, &vbios_rev5);
if (status < 0) {
/* before rm_init_adapter */
- len += sprintf(page+len, "Video BIOS: \t ??.??.??.??.??\n");
+ seq_printf(m, "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,
+ seq_printf(m, fmt, vbios_rev1, vbios_rev2, vbios_rev3,
vbios_rev4, vbios_rev5);
}
if (nvos_find_agp_capability(dev)) type = "AGP";
else if (nvos_find_pci_express_capability(dev)) type = "PCI-E";
else type = "PCI";
- len += sprintf(page+len, "Card Type: \t %s\n", type);
+ seq_printf(m, "Card Type: \t %s\n", type);
// Report the number of bits set in dev->dma_mask
- len += sprintf(page+len, "DMA Size: \t %d bits\n",
+ seq_printf(m, "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 %02x.%02x.%x\n",
+ seq_printf(m, "DMA Mask: \t 0x%llx\n", dev->dma_mask);
+ seq_printf(m, "Bus Location: \t %02x.%02x.%x\n",
nv->bus, nv->slot, PCI_FUNC(dev->devfn));
#ifdef DEBUG
do
{
int j;
for (j = 0; j < NV_GPU_NUM_BARS; j++)
- len += sprintf(page+len, "BAR%i: \t\t 0x%08x (%iMB)\n",
+ seq_printf(m, "BAR%i: \t\t 0x%08x (%iMB)\n",
j, nv->bars[j].address, nv->bars[j].size >> 20);
} while(0);
#endif
@@ -3133,35 +3139,68 @@ nv_kern_read_cardinfo(char *page, char **start, off_t off,
NV_KMEM_CACHE_FREE_STACK(sp);
NV_PCI_DEV_PUT(dev);
- return len;
+ return 0;
+}
+
+static int
+nv_procfs_read_card_info(
+ struct inode *inode,
+ struct file *file
+)
+{
+ return single_open(file, nv_procfs_show_card_info, PDE_DATA(inode));
}
+static const struct file_operations nv_procfs_read_card_info_fops = {
+ .owner = THIS_MODULE,
+ .open = nv_procfs_read_card_info,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
static int
-nv_kern_read_version(char *page, char **start, off_t off,
- int count, int *eof, void *data)
+nv_procfs_show_version(
+ struct seq_file *m,
+ void *v
+)
{
- int len = 0;
- *eof = 1;
-
- len += sprintf(page+len, "NVRM version: %s\n", pNVRM_ID);
- len += sprintf(page+len, "GCC version: %s\n", NV_COMPILER);
-
- return len;
+ seq_printf(m, "NVRM version: %s\n", pNVRM_ID);
+ seq_printf(m, "GCC version: %s\n", NV_COMPILER);
+
+ return 0;
+}
+
+static int
+nv_procfs_open_version(
+ struct inode *inode,
+ struct file *file
+)
+{
+ return single_open(file, nv_procfs_show_version, NULL);
}
+static const struct file_operations nv_procfs_version_fops = {
+ .owner = THIS_MODULE,
+ .open = nv_procfs_open_version,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
static int
-nv_kern_read_agpinfo(char *page, char **start, off_t off,
- int count, int *eof, void *data)
+nv_procfs_show_agp_info(
+ struct seq_file *m,
+ void *v
+)
{
struct pci_dev *dev;
char *fw, *sba;
u8 cap_ptr;
u32 status, command, agp_rate;
- int len = 0;
nv_state_t *nv;
- nv = (nv_state_t *) data;
- *eof = 1;
+ nv = (nv_state_t *) m->private;
if (nv) {
dev = nv_get_pci_device(nv);
@@ -3172,12 +3211,12 @@ nv_kern_read_agpinfo(char *page, char **start, off_t off,
if (!dev)
return 0;
- len += sprintf(page+len, "Host Bridge: \t ");
+ seq_printf(m, "Host Bridge: \t ");
#if defined(CONFIG_PCI_NAMES)
- len += sprintf(page+len, "%s\n", NV_PCI_DEVICE_NAME(dev));
+ seq_printf(m, "%s\n", NV_PCI_DEVICE_NAME(dev));
#else
- len += sprintf(page+len, "PCI device %04x:%04x\n",
+ seq_printf(m, "PCI device %04x:%04x\n",
dev->vendor, dev->device);
#endif
}
@@ -3191,40 +3230,74 @@ nv_kern_read_agpinfo(char *page, char **start, off_t off,
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(m, "Fast Writes: \t %s\n", fw);
+ seq_printf(m, "SBA: \t\t %s\n", sba);
agp_rate = status & 0x7;
if (status & 0x8) // agp 3.0
agp_rate <<= 2;
- len += sprintf(page+len, "AGP Rates: \t %s%s%s%s\n",
+ seq_printf(m, "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(m, "Registers: \t 0x%08x:0x%08x\n", status, command);
NV_PCI_DEV_PUT(dev);
- return len;
+ return 0;
+}
+
+static int
+nv_procfs_read_agp_info(
+ struct inode *inode,
+ struct file *file
+)
+{
+ return single_open(file, nv_procfs_show_agp_info, NULL);
}
+static const struct file_operations nv_procfs_read_agp_info_fops = {
+ .owner = THIS_MODULE,
+ .open = nv_procfs_read_agp_info,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
static int
-nv_kern_read_status(char *page, char **start, off_t off,
- int count, int *eof, void *data)
+nv_procfs_read_agp_info_gpu(
+ struct inode *inode,
+ struct file *file
+)
+{
+ return single_open(file, nv_procfs_show_agp_info, PDE_DATA(inode));
+}
+
+static const struct file_operations nv_procfs_read_agp_info_gpu_fops = {
+ .owner = THIS_MODULE,
+ .open = nv_procfs_read_agp_info_gpu,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
+static int
+nv_procfs_show_agp_status(
+ struct seq_file *m,
+ void *v
+)
{
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;
nv_state_t *nv;
- nv = (nv_state_t *) data;
- *eof = 1;
+ nv = (nv_state_t *) m->private;
dev = nvos_get_agp_device_by_class(PCI_CLASS_BRIDGE_HOST);
if (!dev)
@@ -3246,10 +3319,10 @@ nv_kern_read_status(char *page, char **start, off_t off,
command &= scratch;
if (NV_AGP_ENABLED(nv) && (command & 0x100)) {
- len += sprintf(page+len, "Status: \t Enabled\n");
+ seq_printf(m, "Status: \t Enabled\n");
drv = NV_OSAGP_ENABLED(nv) ? "AGPGART" : "NVIDIA";
- len += sprintf(page+len, "Driver: \t %s\n", drv);
+ seq_printf(m, "Driver: \t %s\n", drv);
// mask off agp rate.
// If this is agp 3.0, we need to shift the value
@@ -3257,13 +3330,13 @@ nv_kern_read_status(char *page, char **start, off_t off,
if (status & 0x8) // agp 3.0
agp_rate <<= 2;
- len += sprintf(page+len, "AGP Rate: \t %dx\n", agp_rate);
+ seq_printf(m, "AGP Rate: \t %dx\n", agp_rate);
fw = (command & 0x00000010) ? "Enabled" : "Disabled";
- len += sprintf(page+len, "Fast Writes: \t %s\n", fw);
+ seq_printf(m, "Fast Writes: \t %s\n", fw);
sba = (command & 0x00000200) ? "Enabled" : "Disabled";
- len += sprintf(page+len, "SBA: \t\t %s\n", sba);
+ seq_printf(m, "SBA: \t\t %s\n", sba);
} else {
int agp_config = 0;
@@ -3274,7 +3347,7 @@ nv_kern_read_status(char *page, char **start, off_t off,
return 0;
}
- len += sprintf(page+len, "Status: \t Disabled\n\n");
+ seq_printf(m, "Status: \t Disabled\n\n");
/*
* If we find AGP is disabled, but the RM registry indicates it
@@ -3288,7 +3361,7 @@ nv_kern_read_status(char *page, char **start, off_t off,
rm_read_registry_dword(sp, nv, "NVreg", "XNvAGP", &agp_config);
if (agp_config != NVOS_AGP_CONFIG_DISABLE_AGP && NV_AGP_FAILED(nv)) {
- len += sprintf(page+len,
+ seq_printf(m,
"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");
@@ -3298,37 +3371,63 @@ nv_kern_read_status(char *page, char **start, off_t off,
}
NV_PCI_DEV_PUT(dev);
- return len;
+ return 0;
+}
+
+static int
+nv_procfs_read_agp_status(
+ struct inode *inode,
+ struct file *file
+)
+{
+ return single_open(file, nv_procfs_show_agp_status, PDE_DATA(inode));
}
+static const struct file_operations nv_procfs_read_agp_status_fops = {
+ .owner = THIS_MODULE,
+ .open = nv_procfs_read_agp_status,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
extern nv_parm_t nv_parms[];
extern char *NVreg_RegistryDwords;
static int
-nv_kern_read_registry(char *page, char **start, off_t off,
- int count, int *eof, void *data)
+nv_procfs_show_registry(
+ struct seq_file *m,
+ void *v
+)
{
- unsigned int i, len = 0;
+ unsigned int i;
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(m, "%s: %u\n", entry->name, *entry->data);
- len += sprintf(page+len, "RegistryDwords: \"%s\"\n",
+ seq_printf(m, "RegistryDwords: \"%s\"\n",
(NVreg_RegistryDwords != NULL) ? NVreg_RegistryDwords : "");
- return len;
+ return 0;
}
static int
-nv_kern_read_text_file(char *page, char **start, off_t off,
- int count, int *eof, void *data)
+nv_procfs_open_registry(
+ struct inode *inode,
+ struct file *file
+)
{
- *eof = 1;
- return sprintf(page, "%s", (char *)data);
+ return single_open(file, nv_procfs_show_registry, NULL);
}
+static const struct file_operations nv_procfs_registry_fops = {
+ .open = nv_procfs_open_registry,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
/***
*** EXPORTS to rest of resman
***/
--
1.7.9.5
Index: nvidia-173xx-kmod.spec
===================================================================
RCS file: /cvs/nonfree/rpms/nvidia-173xx-kmod/F-19/nvidia-173xx-kmod.spec,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- nvidia-173xx-kmod.spec 26 Jul 2013 09:09:54 -0000 1.57
+++ nvidia-173xx-kmod.spec 26 Jul 2013 22:54:23 -0000 1.58
@@ -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-173xx-kmod
Version: 173.14.37
# Taken over by kmodtool
-Release: 1%{?dist}.9
+Release: 2%{?dist}
Summary: NVIDIA 173xx display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -18,6 +18,7 @@
# http://us.download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linu...
Source0: nvidia-kmod-data-%{version}.tar.bz2
+Patch0: fix-build-with-linux-3.10.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -45,7 +46,7 @@
for arch in x86 x64
do
pushd nvidiapkg-${arch}
-echo "Nothing to patch"
+%patch0 -p1
popd
done
@@ -89,6 +90,9 @@
%changelog
+* Fri Jul 26 2013 Leigh Scott <leigh123linux(a)googlemail.com> - 173.14.37-2
+- patch for 3.10 kernel
+
* Fri Jul 26 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 173.14.37-1.9
- Rebuilt for kernel
11 years, 4 months
rpms/nvidia-kmod/F-19 3.10_kernel.patch, NONE, 1.1 nvidia-kmod.spec, 1.128, 1.129
by Leigh Scott
Author: leigh123linux
Update of /cvs/nonfree/rpms/nvidia-kmod/F-19
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv14050
Modified Files:
nvidia-kmod.spec
Added Files:
3.10_kernel.patch
Log Message:
* Fri Jul 26 2013 Leigh Scott <leigh123linux(a)googlemail.com> - 1:319.32-2
- patch for 3.10 kernel
3.10_kernel.patch:
nv-i2c.c | 13 --
nv-procfs.c | 372 ++++++++++++++++++++++++++++++------------------------------
2 files changed, 190 insertions(+), 195 deletions(-)
--- NEW FILE 3.10_kernel.patch ---
diff -ur a/kernel/nv-i2c.c b/kernel/nv-i2c.c
--- a/kernel/nv-i2c.c 2013-07-19 15:37:04.977306079 +0200
+++ b/kernel/nv-i2c.c 2013-07-19 14:16:08.755700586 +0200
@@ -311,8 +311,6 @@
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))
@@ -324,15 +322,10 @@
if (!pI2cAdapter) return FALSE;
// attempt release with the OS
- osstatus = i2c_del_adapter(pI2cAdapter);
+ i2c_del_adapter(pI2cAdapter);
+ os_free_mem(pI2cAdapter);
- if (!osstatus)
- {
- os_free_mem(pI2cAdapter);
- wasReleased = TRUE;
- }
-
- return wasReleased;
+ return TRUE;
}
#else // (defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE))
diff -ur a/kernel/nv-procfs.c b/kernel/nv-procfs.c
--- a/kernel/nv-procfs.c 2013-07-19 15:37:04.977306079 +0200
+++ b/kernel/nv-procfs.c 2013-07-19 15:23:15.013490851 +0200
@@ -60,60 +60,41 @@
__entry; \
})
-#define NV_CREATE_PROC_FILE(name,parent,__read_proc, \
- __write_proc,__fops,__data) \
- ({ \
- 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); \
- 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); \
- } \
- __entry; \
- })
+#define NV_PROC_RW (S_IFREG|S_IRUGO|S_IWUSR)
+#define NV_PROC_RO (S_IFREG|S_IRUGO)
#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 = proc_mkdir_mode(name, __mode, parent); \
__entry; \
})
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,9,255)
+static inline void *PDE_DATA(const struct inode *inode) {
+ return PDE(inode)->data;
+}
+#endif
+
#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
+nv_procfs_show_gpu_info(
+ struct seq_file *m,
+ void *v
)
{
- nv_state_t *nv = data;
+ nv_state_t *nv = m->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)
{
@@ -134,31 +115,31 @@
if (rm_get_device_name(sp, nv, dev->device, dev->subsystem_vendor,
dev->subsystem_device, NV_DEVICE_NAME_LENGTH,
tmpstr) != RM_OK)
- {
+ {
strcpy (tmpstr, "Unknown");
}
}
- len += sprintf(page+len, "Model: \t\t %s\n", tmpstr);
- len += sprintf(page+len, "IRQ: \t\t %d\n", nv->interrupt_line);
+ seq_printf(m, "Model: \t\t %s\n", tmpstr);
+ seq_printf(m, "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(m, "Firmware: \t ????.??.??\n");
else
{
fmt = "Firmware: \t %x.%x.%x\n";
- len += sprintf(page+len, fmt, fpga_rev1, fpga_rev2, fpga_rev3);
+ seq_printf(m, 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(m, "GPU UUID: \t %s\n", (char *)uuid);
os_free_mem(uuid);
}
@@ -166,12 +147,12 @@
&vbios_rev3, &vbios_rev4,
&vbios_rev5) != RM_OK)
{
- len += sprintf(page+len, "Video BIOS: \t ??.??.??.??.??\n");
+ seq_printf(m, "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,
+ seq_printf(m, fmt, vbios_rev1, vbios_rev2, vbios_rev3,
vbios_rev4, vbios_rev5);
}
}
@@ -180,12 +161,12 @@
type = "PCIe";
else
type = "PCI";
- len += sprintf(page+len, "Bus Type: \t %s\n", type);
+ seq_printf(m, "Bus Type: \t %s\n", type);
- len += sprintf(page+len, "DMA Size: \t %d bits\n",
+ seq_printf(m, "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",
+ seq_printf(m, "DMA Mask: \t 0x%llx\n", dev->dma_mask);
+ seq_printf(m, "Bus Location: \t %04x:%02x.%02x.%x\n",
nv->domain, nv->bus, nv->slot, PCI_FUNC(dev->devfn));
#if defined(DEBUG)
do
@@ -193,7 +174,7 @@
int j;
for (j = 0; j < NV_GPU_NUM_BARS; j++)
{
- len += sprintf(page+len, "BAR%u: \t\t 0x%llx (%lluMB)\n",
+ seq_printf(m, "BAR%u: \t\t 0x%llx (%lluMB)\n",
j, nv->bars[j].address, (nv->bars[j].size >> 20));
}
} while (0);
@@ -201,26 +182,120 @@
NV_KMEM_CACHE_FREE_STACK(sp);
- return len;
+ return 0;
}
static int
-nv_procfs_read_version(
- char *page,
- char **start,
- off_t off,
- int count,
- int *eof,
- void *data
+nv_procfs_open_gpu_info(
+ struct inode *inode,
+ struct file *file
+)
+{
+ return single_open(file, nv_procfs_show_gpu_info, PDE_DATA(inode));
+}
+
+static const struct file_operations nv_procfs_gpu_info_fops = {
+ .owner = THIS_MODULE,
+ .open = nv_procfs_open_gpu_info,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
+static int
+nv_procfs_show_version(
+ struct seq_file *m,
+ void *v
+)
+{
+ seq_printf(m, "NVRM version: %s\n", pNVRM_ID);
+ seq_printf(m, "GCC version: %s\n", NV_COMPILER);
+
+ return 0;
+}
+
+static int
+nv_procfs_open_version(
+ struct inode *inode,
+ struct file *file
+)
+{
+ return single_open(file, nv_procfs_show_version, NULL);
+}
+
+static const struct file_operations nv_procfs_version_fops = {
+ .owner = THIS_MODULE,
+ .open = nv_procfs_open_version,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
+static int
+nv_procfs_show_registry(
+ struct seq_file *m,
+ void *v
+)
+{
+ nv_state_t *nv = m->private;
+ nv_linux_state_t *nvl = NULL;
+ char *registry_keys;
+
+ if (nv != NULL)
+ nvl = NV_GET_NVL_FROM_NV_STATE(nv);
+ registry_keys = ((nvl != NULL) ?
+ nvl->registry_keys : nv_registry_keys);
+
+ seq_printf(m, "Binary: \"%s\"\n", registry_keys);
+
+ return 0;
+}
+
+static ssize_t
+nv_procfs_write_registry(
+ struct file *file,
+ const char __user *buffer,
+ size_t count,
+ loff_t *pos
)
{
- int len = 0;
- *eof = 1;
+ int status = 0;
+ nv_file_private_t *nvfp = NV_GET_FILE_PRIVATE(file);
+ char *proc_buffer;
+ unsigned long bytes_left;
+
+ down(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
+
+ bytes_left = (NV_PROC_WRITE_BUFFER_SIZE - nvfp->off - 1);
+
+ if (count == 0)
+ {
+ status = -EINVAL;
+ goto done;
+ }
+ else if ((bytes_left == 0) || (count > bytes_left))
+ {
+ status = -ENOSPC;
+ goto done;
+ }
+
+ proc_buffer = &((char *)nvfp->data)[nvfp->off];
+
+ if (copy_from_user(proc_buffer, buffer, count))
+ {
+ nv_printf(NV_DBG_ERRORS, "NVRM: failed to copy in proc data!\n");
+ status = -EFAULT;
+ }
+ else
+ {
+ nvfp->proc_data = PDE_DATA(file->f_inode);
+ nvfp->off += count;
+ }
- len += sprintf(page+len, "NVRM version: %s\n", pNVRM_ID);
- len += sprintf(page+len, "GCC version: %s\n", NV_COMPILER);
+done:
+ up(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
- return len;
+ return ((status < 0) ? status : count);
}
static int
@@ -233,7 +308,7 @@
nv_stack_t *sp = NULL;
if (0 == (file->f_mode & FMODE_WRITE))
- return 0;
+ return single_open(file, nv_procfs_show_registry, PDE_DATA(inode));
nvfp = nv_alloc_file_private();
if (nvfp == NULL)
@@ -282,6 +357,9 @@
RM_STATUS rm_status;
int rc = 0;
+ if (0 == (file->f_mode & FMODE_WRITE))
+ return single_release(inode, file);
+
nvfp = NV_GET_FILE_PRIVATE(file);
if (nvfp == NULL)
return 0;
@@ -346,122 +424,81 @@
return rc;
}
-static struct file_operations nv_procfs_registry_fops = {
+static const struct file_operations nv_procfs_registry_fops = {
.open = nv_procfs_open_registry,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .write = nv_procfs_write_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
+nv_procfs_show_params(
+ struct seq_file *m,
+ 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(m, "%s: %u\n", entry->name, *entry->data);
- len += sprintf(page+len, "RegistryDwords: \"%s\"\n",
+ seq_printf(m, "RegistryDwords: \"%s\"\n",
(NVreg_RegistryDwords != NULL) ? NVreg_RegistryDwords : "");
- len += sprintf(page+len, "RmMsg: \"%s\"\n",
+ seq_printf(m, "RmMsg: \"%s\"\n",
(NVreg_RmMsg != NULL) ? NVreg_RmMsg : "");
- return len;
+ return 0;
}
static int
-nv_procfs_read_registry(
- char *page,
- char **start,
- off_t off,
- int count,
- int *eof,
- void *data
-)
+nv_procfs_open_params(
+ struct inode *inode,
+ struct file *file
+)
{
- nv_state_t *nv = data;
- nv_linux_state_t *nvl = NULL;
- char *registry_keys;
+ return single_open(file, nv_procfs_show_params, NULL);
+}
- if (nv != NULL)
- nvl = NV_GET_NVL_FROM_NV_STATE(nv);
- registry_keys = ((nvl != NULL) ?
- nvl->registry_keys : nv_registry_keys);
+static const struct file_operations nv_procfs_params_fops = {
+ .owner = THIS_MODULE,
+ .open = nv_procfs_open_params,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
- *eof = 1;
- return sprintf(page, "Binary: \"%s\"\n", registry_keys);
-}
static int
-nv_procfs_write_registry(
- struct file *file,
- const char *buffer,
- unsigned long count,
- void *data
+nv_procfs_show_text_file(
+ struct seq_file *m,
+ void *v
)
{
- int status = 0;
- nv_file_private_t *nvfp = NV_GET_FILE_PRIVATE(file);
- char *proc_buffer;
- unsigned long bytes_left;
-
- down(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
-
- bytes_left = (NV_PROC_WRITE_BUFFER_SIZE - nvfp->off - 1);
+ seq_printf(m, "%s", (char *)m->private);
- if (count == 0)
- {
- status = -EINVAL;
- goto done;
- }
- else if ((bytes_left == 0) || (count > bytes_left))
- {
- status = -ENOSPC;
- goto done;
- }
-
- proc_buffer = &((char *)nvfp->data)[nvfp->off];
-
- if (copy_from_user(proc_buffer, buffer, count))
- {
- nv_printf(NV_DBG_ERRORS, "NVRM: failed to copy in proc data!\n");
- status = -EFAULT;
- }
- else
- {
- nvfp->proc_data = data;
- nvfp->off += count;
- }
-
-done:
- up(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
-
- return ((status < 0) ? status : (int)count);
+ return 0;
}
static int
-nv_procfs_read_text_file(
- char *page,
- char **start,
- off_t off,
- int count,
- int *eof,
- void *data
+nv_procfs_open_text_file(
+ struct inode *inode,
+ struct file *file
)
{
- *eof = 1;
- return sprintf(page, "%s", (char *)data);
+ return single_open(file, nv_procfs_show_text_file, PDE_DATA(inode));
}
+static const struct file_operations nv_procfs_text_fops = {
+ .owner = THIS_MODULE,
+ .open = nv_procfs_open_text_file,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
static void
nv_procfs_add_text_file(
struct proc_dir_entry *parent,
@@ -469,22 +506,7 @@
const char *text
)
{
- NV_CREATE_PROC_FILE(filename, parent,
- nv_procfs_read_text_file, NULL, NULL, (void *)text);
-}
-
-static void nv_procfs_unregister_all(struct proc_dir_entry *entry)
-{
- while (entry)
- {
- struct proc_dir_entry *next = entry->next;
- if (entry->subdir)
- nv_procfs_unregister_all(entry->subdir);
- remove_proc_entry(entry->name, entry->parent);
- if (entry == proc_nvidia)
- break;
- entry = next;
- }
+ proc_create_data(filename, NV_PROC_RO, parent, &nv_procfs_text_fops, (void *)text);
}
#endif
@@ -513,26 +535,11 @@
if (!proc_nvidia)
goto failed;
- entry = NV_CREATE_PROC_FILE("params", proc_nvidia,
- nv_procfs_read_params, NULL, NULL, NULL);
+ entry = proc_create("params", NV_PROC_RO, proc_nvidia, &nv_procfs_params_fops);
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 = proc_create("registry", NV_PROC_RW, proc_nvidia, &nv_procfs_registry_fops);
if (!entry)
goto failed;
@@ -553,8 +560,7 @@
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 = proc_create("version", NV_PROC_RO, proc_nvidia, &nv_procfs_version_fops);
if (!entry)
goto failed;
@@ -571,15 +577,11 @@
if (!proc_nvidia_gpu)
goto failed;
- entry = NV_CREATE_PROC_FILE("information", proc_nvidia_gpu,
- nv_procfs_read_gpu_info, NULL, NULL, nv);
+ entry = proc_create_data("information", NV_PROC_RO, proc_nvidia_gpu, &nv_procfs_gpu_info_fops, 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 = proc_create_data("registry", NV_PROC_RW, proc_nvidia_gpu, &nv_procfs_registry_fops, nv);
if (!entry)
goto failed;
}
@@ -587,7 +589,7 @@
return 0;
#if defined(CONFIG_PROC_FS)
failed:
- nv_procfs_unregister_all(proc_nvidia);
+ remove_proc_subtree("driver/nvidia", NULL);
return -1;
#endif
}
@@ -595,6 +597,6 @@
void nv_unregister_procfs(void)
{
#if defined(CONFIG_PROC_FS)
- nv_procfs_unregister_all(proc_nvidia);
+ remove_proc_subtree("driver/nvidia", NULL);
#endif
}
Index: nvidia-kmod.spec
===================================================================
RCS file: /cvs/nonfree/rpms/nvidia-kmod/F-19/nvidia-kmod.spec,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -r1.128 -r1.129
--- nvidia-kmod.spec 26 Jul 2013 09:10:21 -0000 1.128
+++ nvidia-kmod.spec 26 Jul 2013 22:34:01 -0000 1.129
@@ -3,13 +3,13 @@
# "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-kmod
Epoch: 1
Version: 319.32
# Taken over by kmodtool
-Release: 1%{?dist}.1
+Release: 2%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -21,6 +21,7 @@
Source0: nvidia-kmod-data-%{version}.tar.xz
Source11: nvidia-kmodtool-excludekernel-filterfile
+Patch0: 3.10_kernel.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -47,7 +48,7 @@
for arch in x86_64 i686 armv7hl
do
pushd nvidiapkg-${arch}
-echo "Nothing to patch"
+%patch0 -p1
popd
done
@@ -77,6 +78,9 @@
%changelog
+* Fri Jul 26 2013 Leigh Scott <leigh123linux(a)googlemail.com> - 1:319.32-2
+- patch for 3.10 kernel
+
* Fri Jul 26 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 1:319.32-1.1
- Rebuilt for kernel
11 years, 4 months
rpms/wl-kmod/F-19 wl-kmod.spec,1.83,1.84
by Nicolas Chauvet
Author: kwizart
Update of /cvs/nonfree/rpms/wl-kmod/F-19
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv22026
Modified Files:
wl-kmod.spec
Log Message:
* Fri Jul 26 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 5.100.82.112-11.1
- Rebuilt for kernel
Index: wl-kmod.spec
===================================================================
RCS file: /cvs/nonfree/rpms/wl-kmod/F-19/wl-kmod.spec,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -r1.83 -r1.84
--- wl-kmod.spec 24 Jul 2013 07:24:19 -0000 1.83
+++ wl-kmod.spec 26 Jul 2013 09:10:34 -0000 1.84
@@ -3,11 +3,11 @@
# "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 current
+%global buildforkernels newest
Name: wl-kmod
Version: 5.100.82.112
-Release: 11%{?dist}
+Release: 11%{?dist}.1
Summary: Kernel module for Broadcom wireless devices
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -103,6 +103,9 @@
rm -rf $RPM_BUILD_ROOT
%changelog
+* Fri Jul 26 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 5.100.82.112-11.1
+- Rebuilt for kernel
+
* Tue Jul 23 2013 Nicolas Vieville <nicolas.vieville(a)univ-valenciennes.fr> - 5.100.82.112-11
- Added patch to build for kernel >= 3.10
11 years, 4 months
rpms/nvidia-kmod/F-19 nvidia-kmod.spec,1.127,1.128
by Nicolas Chauvet
Author: kwizart
Update of /cvs/nonfree/rpms/nvidia-kmod/F-19
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv21903
Modified Files:
nvidia-kmod.spec
Log Message:
* Fri Jul 26 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 1:319.32-1.1
- Rebuilt for kernel
Index: nvidia-kmod.spec
===================================================================
RCS file: /cvs/nonfree/rpms/nvidia-kmod/F-19/nvidia-kmod.spec,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -r1.127 -r1.128
--- nvidia-kmod.spec 13 Jul 2013 15:44:31 -0000 1.127
+++ nvidia-kmod.spec 26 Jul 2013 09:10:21 -0000 1.128
@@ -3,13 +3,13 @@
# "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 newest
Name: nvidia-kmod
Epoch: 1
Version: 319.32
# Taken over by kmodtool
-Release: 1%{?dist}
+Release: 1%{?dist}.1
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -77,6 +77,9 @@
%changelog
+* Fri Jul 26 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 1:319.32-1.1
+- Rebuilt for kernel
+
* Sat Jul 13 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 1:319.32-1
- Update to 319.32
- Add support for armv7hl
11 years, 4 months