ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/nonfree/rpms/nvidia-kmod/devel/nvidia_3.13_kernel.patch
Revision: 1.2
Committed: Mon Jan 13 17:37:48 2014 UTC (9 months, 2 weeks ago) by leigh123linux
Branch: MAIN
CVS Tags: nvidia-kmod-331_38-3_fc21
Changes since 1.1: +22 -0 lines
Log Message:
* Mon Jan 13 2014 Leigh Scott <leigh123linux@googlemail.com> - 1:331.38-3
- fix patch for 3.13 kernel

Line File contents
1 --- a/kernel/nv-acpi.c
2 +++ b/kernel/nv-acpi.c
3 @@ -15,6 +15,10 @@
4 #include "nv-linux.h"
5 #include "nv-reg.h"
6
7 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0) && defined(ACPI_HANDLE)
8 +#define DEVICE_ACPI_HANDLE(a) ACPI_HANDLE(a)
9 +#endif
10 +
11 #if defined(NV_LINUX_ACPI_EVENTS_SUPPORTED)
12 static RM_STATUS nv_acpi_extract_integer (const union acpi_object *, void *, NvU32, NvU32 *);
13 static RM_STATUS nv_acpi_extract_buffer (const union acpi_object *, void *, NvU32, NvU32 *);
14 @@ -303,7 +307,10 @@ static int nv_acpi_remove(struct acpi_de
15
16 if (pNvAcpiObject->notify_handler_installed)
17 {
18 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
19 + /* beginning with 3.13, acpi_remove_notify_handler() waits for events to finish */
20 NV_ACPI_OS_WAIT_EVENTS_COMPLETE();
21 +#endif
22
23 // remove event notifier
24 status = acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, nv_acpi_event);
25 --- a/kernel/uvm/nvidia_uvm_linux.h
26 +++ b/kernel/uvm/nvidia_uvm_linux.h
27 @@ -405,11 +405,17 @@ typedef void irqreturn_t;
28 // not require the RCU's read lock on current->cred.
29 //
30 //
31 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
32 +#define NV_KUID_TO_UID(value) (__kuid_val(value))
33 +#else
34 +#define NV_KUID_TO_UID(value) (value)
35 +#endif
36 +
37 #if defined(NV_TASK_STRUCT_HAS_CRED)
38 #define NV_CURRENT_EUID() \
39 - (((typeof(*current->cred) __force __kernel *)current->cred)->euid)
40 + NV_KUID_TO_UID(((typeof(*current->cred) __force __kernel *)current->cred)->euid)
41 #else
42 -#define NV_CURRENT_EUID() (current->euid)
43 +#define NV_CURRENT_EUID() NV_KUID_TO_UID(current->euid)
44 #endif
45
46 #define NV_ATOMIC_SET(data,val) atomic_set(&(data), (val))