Skip to content

Instantly share code, notes, and snippets.

@freshhawk
Created September 20, 2013 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freshhawk/6644781 to your computer and use it in GitHub Desktop.
Save freshhawk/6644781 to your computer and use it in GitHub Desktop.
nvidia-linux-3.11.patch
--- 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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment