summaryrefslogtreecommitdiff
path: root/~lukeshu/not-working/codeanalyst/kernel3.4.patch
diff options
context:
space:
mode:
Diffstat (limited to '~lukeshu/not-working/codeanalyst/kernel3.4.patch')
-rw-r--r--~lukeshu/not-working/codeanalyst/kernel3.4.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/~lukeshu/not-working/codeanalyst/kernel3.4.patch b/~lukeshu/not-working/codeanalyst/kernel3.4.patch
new file mode 100644
index 000000000..589abc800
--- /dev/null
+++ b/~lukeshu/not-working/codeanalyst/kernel3.4.patch
@@ -0,0 +1,72 @@
+diff -ru kernel2.6.38/Makefile kernel3.4/Makefile
+--- kernel2.6.38/Makefile 2012-04-13 01:41:43.000000000 -0400
++++ kernel3.4/Makefile 2012-07-11 11:32:27.000000000 -0400
+@@ -1,6 +1,6 @@
+ TARGET = oprofile.ko
+
+-MDIR = $(if $(shell uname -m | grep x86_64),arch/x86/oprofile,arch/x86/oprofile)
++MDIR = arch/x86/oprofile
+
+ DRIVER_OBJS = oprof.o cpu_buffer.o buffer_sync.o \
+ event_buffer.o oprofile_files.o \
+@@ -16,7 +16,8 @@
+ CURRENT = $(shell uname -r)
+ ARCH = $(if $(shell uname -m | grep x86_64),64,32)
+ KERN_ARCH = $(if $(shell uname -m | grep x86_64),x86_64,i386)
+-KDIR = /lib/modules/$(CURRENT)/build
++SYS_KDIR = /lib/modules/$(CURRENT)/build
++KDIR = $(PWD)/../build
+ PWD = $(shell pwd)
+ DEST = /lib/modules/$(CURRENT)/kernel/$(MDIR)
+ USE_INTERNAL_ERRATA = $(if $(shell ls ../internal/errata.h 2> /dev/null),1,0)
+@@ -39,6 +40,8 @@
+ all: default
+
+ default:
++ rm -rf $(KDIR)
++ cp -r $(SYS_KDIR)/ $(KDIR)
+ make -C $(KDIR) SUBDIRS=$(PWD) CFLAGS_MODULE+="-DMODULE -DUSE_INTERNAL_ERRATA=$(USE_INTERNAL_ERRATA)" modules ARCH=$(KERN_ARCH)
+
+ install:
+@@ -52,13 +55,12 @@
+
+ uninstall:
+ @echo "... Restore original oprofile.ko."
+- @mv -v $(DEST)/$(TARGET).orig $(DEST)/$(TARGET)
++ @mv -v $(DEST)/$(TARGET).orig $(DEST)/$(TARGET)
+
+ clean:
+ rm -f *.o oprofile.ko .*.cmd .*.flags *.mod.c
+
+ prebuild:
+ cp $(TARGET) ../prebuilds/$(CURRENT)_$(ARCH).ko
+-
+
+--include $(KDIR)/Rules.make
++-include $(SYS_KDIR)/Rules.make
+Only in kernel3.4/: modules.order
+Only in kernel3.4/: Module.symvers
+diff -ru kernel2.6.38/nmi_int.c kernel3.4/nmi_int.c
+--- kernel2.6.38/nmi_int.c 2012-04-13 01:41:43.000000000 -0400
++++ kernel3.4/nmi_int.c 2012-07-11 11:32:27.000000000 -0400
+@@ -16,7 +16,6 @@
+ #include <linux/notifier.h>
+ #include <linux/smp.h>
+ #include "oprofile.h"
+-#include <linux/sysdev.h>
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0)
+ #include <linux/syscore_ops.h>
+ #endif
+diff -ru kernel2.6.38/oprofilefs.c kernel3.4/oprofilefs.c
+--- kernel2.6.38/oprofilefs.c 2012-04-13 01:41:43.000000000 -0400
++++ kernel3.4/oprofilefs.c 2012-07-11 11:32:27.000000000 -0400
+@@ -244,7 +244,7 @@
+ return -ENOMEM;
+ root_inode->i_op = &simple_dir_inode_operations;
+ root_inode->i_fop = &simple_dir_operations;
+- root_dentry = d_alloc_root(root_inode);
++ root_dentry = d_make_root(root_inode);
+ if (!root_dentry) {
+ iput(root_inode);
+ return -ENOMEM;
+Only in kernel3.4/: .tmp_versions