1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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
|