Skip to content

Instantly share code, notes, and snippets.

View tpruzina's full-sized avatar

Tomáš Pružina tpruzina

View GitHub Profile
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index a4bb92600b0a..e753d31e7fb4 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -319,6 +319,7 @@ config MPSC
config MATOM
bool "Intel Atom"
+ select X86_P6_NOP
---help---
@tpruzina
tpruzina / p6_nop.patch
Created December 13, 2016 02:50
P6_NOP_patch
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index a4bb92600b0a..e753d31e7fb4 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -319,6 +319,7 @@ config MPSC
config MATOM
bool "Intel Atom"
+ select X86_P6_NOP
---help---
@tpruzina
tpruzina / 370.20-4.9.0+-stageing50.patch
Created December 15, 2016 09:25 — forked from anonymous/370.20-4.9.0+-stageing50.patch
370.20-4.9.0+-stageing50.patch
diff -ur NVIDIA-Linux-x86_64-375.20/kernel/common/inc/nv-mm.h NVIDIA-Linux-x86_64-375.20-patched/kernel/common/inc/nv-mm.h
--- NVIDIA-Linux-x86_64-375.20/kernel/common/inc/nv-mm.h 2016-11-16 00:53:45.000000000 +0100
+++ NVIDIA-Linux-x86_64-375.20-patched/kernel/common/inc/nv-mm.h 2016-12-15 09:54:13.755753901 +0100
@@ -83,7 +83,7 @@
if (force)
flags |= FOLL_FORCE;
- return get_user_pages_remote(tsk, mm, start, nr_pages, flags, pages, vmas);
+ return get_user_pages_remote(tsk, mm, start, nr_pages, flags, pages, vmas, NULL);
}
@tpruzina
tpruzina / gist:939ca3170d1aa48a601228b7773e2bb1
Created January 1, 2017 12:38
NVIDIA 375.26 Kernel 4.10-rc1 (w/ CPU hotplug workaround)
diff -ur NVIDIA-Linux-x86_64-375.26/kernel/common/inc/nv-linux.h NVIDIA-Linux-x86_64-375.26.patched/kernel/common/inc/nv-linux.h
--- NVIDIA-Linux-x86_64-375.26/kernel/common/inc/nv-linux.h 2016-12-09 02:17:49.000000000 +0100
+++ NVIDIA-Linux-x86_64-375.26.patched/kernel/common/inc/nv-linux.h 2016-12-31 10:55:17.637374373 +0100
@@ -294,7 +294,8 @@
extern int nv_pat_mode;
-#if defined(CONFIG_HOTPLUG_CPU)
+//#if defined(CONFIG_HOTPLUG_CPU)
+#if 0
diff -ur NVIDIA-Linux-x86_64-378.09/kernel/common/inc/nv-linux.h NVIDIA-Linux-x86_64-378.09.patched/kernel/common/inc/nv-linux.h
--- NVIDIA-Linux-x86_64-378.09/kernel/common/inc/nv-linux.h 2017-01-15 07:33:26.000000000 +0100
+++ NVIDIA-Linux-x86_64-378.09.patched/kernel/common/inc/nv-linux.h 2017-01-19 14:47:21.389272354 +0100
@@ -294,7 +294,8 @@
extern int nv_pat_mode;
-#if defined(CONFIG_HOTPLUG_CPU)
+//#if defined(CONFIG_HOTPLUG_CPU)
+#if 0
@tpruzina
tpruzina / gist:3e36f7da0673c1bf4b421f53b8d99b02
Last active December 13, 2018 21:08
NVIDIA-Linux-x86_64-378.13-kernel-4.10-rc8.patch
diff -ur NVIDIA-Linux-x86_64-378.13/kernel/common/inc/nv-linux.h NVIDIA-Linux-x86_64-378.13.patched/kernel/common/inc/nv-linux.h
--- NVIDIA-Linux-x86_64-378.13/kernel/common/inc/nv-linux.h 2017-02-08 04:58:34.000000000 +0100
+++ NVIDIA-Linux-x86_64-378.13.patched/kernel/common/inc/nv-linux.h 2017-02-15 04:14:46.304110124 +0100
@@ -294,7 +294,8 @@
extern int nv_pat_mode;
-#if defined(CONFIG_HOTPLUG_CPU)
+//#if defined(CONFIG_HOTPLUG_CPU)
+#if 0
@tpruzina
tpruzina / gist:4a4aef53b266aa04606385b92ca6d042
Last active February 25, 2017 12:47
NVIDIA-378.13-KERNEL-4.10-stageing-7bb033829ef3ecfc491c0ed0197966e8f197fbdc.patch
diff -ur NVIDIA-Linux-x86_64-378.13/kernel/common/inc/nv-mm.h NVIDIA-Linux-x86_64-378.13.patched/kernel/common/inc/nv-mm.h
--- NVIDIA-Linux-x86_64-378.13/kernel/common/inc/nv-mm.h 2017-02-08 04:58:34.000000000 +0100
+++ NVIDIA-Linux-x86_64-378.13.patched/kernel/common/inc/nv-mm.h 2017-02-24 21:38:54.126260185 +0100
@@ -46,6 +46,8 @@
* 2016 Dec 14:5b56d49fc31dbb0487e14ead790fc81ca9fb2c99
*/
+#include <linux/version.h>
+
#if defined(NV_GET_USER_PAGES_REMOTE_PRESENT)
@tpruzina
tpruzina / gist:c4d9c0ca6bdbb6e78ab2126a7cdf8f1c
Last active May 10, 2017 08:09
NVIDIA-378.13-KERNEL-4.10.patch
diff -ur NVIDIA-Linux-x86_64-378.13/kernel/common/inc/nv-mm.h NVIDIA-Linux-x86_64-378.13.patched/kernel/common/inc/nv-mm.h
--- NVIDIA-Linux-x86_64-378.13/kernel/common/inc/nv-mm.h 2017-02-08 04:58:34.000000000 +0100
+++ NVIDIA-Linux-x86_64-378.13.patched/kernel/common/inc/nv-mm.h 2017-02-23 18:57:34.655592444 +0100
@@ -46,6 +46,8 @@
* 2016 Dec 14:5b56d49fc31dbb0487e14ead790fc81ca9fb2c99
*/
+#include <linux/version.h>
+
#if defined(NV_GET_USER_PAGES_REMOTE_PRESENT)
@tpruzina
tpruzina / gist:d30eb213b15e57b8158c5cf0bb528c1c
Created August 10, 2017 21:00
Radare2 automatic session store (.zshrc function)
# automatically calculates md5 of binary path and saves it as a name for project file
function r2()
{
BACKUP="$@"
MD5=""
NAME=""
while [[ "$#" -gt 0 ]]; do
if [ -f "$1" ]; then
NAME=$(realpath $1)
@tpruzina
tpruzina / NVIDIA-Linux-x86_64-387.22.patch
Created November 17, 2017 00:25
NVIDIA-Linux-x86_64-387.22 patch for 4.15-staging-cf9b0772f2e410645fece13b749bd56505b998b8
diff -u -r NVIDIA-Linux-x86_64-387.22/kernel/Kbuild NVIDIA-Linux-x86_64-387.22.patched/kernel/Kbuild
--- NVIDIA-Linux-x86_64-387.22/kernel/Kbuild 2017-10-26 07:11:01.000000000 +0200
+++ NVIDIA-Linux-x86_64-387.22.patched/kernel/Kbuild 2017-10-31 19:20:41.430505370 +0100
@@ -61,6 +61,7 @@
EXTRA_CFLAGS += -Wall -MD $(DEFINES) $(INCLUDES) -Wsign-compare -Wno-cast-qual -Wno-error
EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"387.22\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -Wno-sign-compare -Wno-format-extra-args
EXTRA_CFLAGS += $(call cc-option,-Werror=undef,)
+EXTRA_CFLAGS += -mtune=native
#