diff -Nurb linux-2.6.22-580/arch/i386/Kconfig linux-2.6.22-590/arch/i386/Kconfig
---- linux-2.6.22-580/arch/i386/Kconfig 2008-04-29 17:04:54.000000000 -0400
-+++ linux-2.6.22-590/arch/i386/Kconfig 2008-04-29 17:05:11.000000000 -0400
+--- linux-2.6.22-580/arch/i386/Kconfig 2008-04-30 09:29:26.000000000 -0400
++++ linux-2.6.22-590/arch/i386/Kconfig 2008-04-30 09:29:41.000000000 -0400
@@ -1217,6 +1217,14 @@
source "arch/i386/oprofile/Kconfig"
bool "Kprobes (EXPERIMENTAL)"
depends on KALLSYMS && EXPERIMENTAL && MODULES
diff -Nurb linux-2.6.22-580/block/ll_rw_blk.c linux-2.6.22-590/block/ll_rw_blk.c
---- linux-2.6.22-580/block/ll_rw_blk.c 2008-04-29 17:04:51.000000000 -0400
-+++ linux-2.6.22-590/block/ll_rw_blk.c 2008-04-29 17:05:11.000000000 -0400
+--- linux-2.6.22-580/block/ll_rw_blk.c 2008-04-30 09:29:21.000000000 -0400
++++ linux-2.6.22-590/block/ll_rw_blk.c 2008-04-30 09:29:41.000000000 -0400
@@ -30,6 +30,7 @@
#include <linux/cpu.h>
#include <linux/blktrace_api.h>
}
diff -Nurb linux-2.6.22-580/drivers/oprofile/cpu_buffer.c linux-2.6.22-590/drivers/oprofile/cpu_buffer.c
--- linux-2.6.22-580/drivers/oprofile/cpu_buffer.c 2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22-590/drivers/oprofile/cpu_buffer.c 2008-04-29 17:05:11.000000000 -0400
++++ linux-2.6.22-590/drivers/oprofile/cpu_buffer.c 2008-04-30 09:29:41.000000000 -0400
@@ -21,6 +21,7 @@
#include <linux/oprofile.h>
#include <linux/vmalloc.h>
void oprofile_add_pc(unsigned long pc, int is_kernel, unsigned long event)
diff -Nurb linux-2.6.22-580/fs/bio.c linux-2.6.22-590/fs/bio.c
--- linux-2.6.22-580/fs/bio.c 2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22-590/fs/bio.c 2008-04-29 17:05:11.000000000 -0400
++++ linux-2.6.22-590/fs/bio.c 2008-04-30 09:29:41.000000000 -0400
@@ -27,6 +27,7 @@
#include <linux/workqueue.h>
#include <linux/blktrace_api.h>
bio->bi_end_io(bio, bytes_done, error);
}
diff -Nurb linux-2.6.22-580/fs/exec.c linux-2.6.22-590/fs/exec.c
---- linux-2.6.22-580/fs/exec.c 2008-04-29 17:04:54.000000000 -0400
-+++ linux-2.6.22-590/fs/exec.c 2008-04-29 17:05:11.000000000 -0400
-@@ -38,7 +38,7 @@
- #include <linux/binfmts.h>
- #include <linux/swap.h>
- #include <linux/utsname.h>
--#include <linux/pid_namespace.h>
-+/*#include <linux/pid_namespace.h>*/
- #include <linux/module.h>
- #include <linux/namei.h>
- #include <linux/proc_fs.h>
+--- linux-2.6.22-580/fs/exec.c 2008-04-30 09:29:26.000000000 -0400
++++ linux-2.6.22-590/fs/exec.c 2008-04-30 09:29:41.000000000 -0400
@@ -52,6 +52,7 @@
#include <linux/audit.h>
#include <linux/signalfd.h>
file = ERR_PTR(-EACCES);
if (!(nd.mnt->mnt_flags & MNT_NOEXEC) &&
S_ISREG(inode->i_mode)) {
-@@ -627,8 +634,10 @@
- * Reparenting needs write_lock on tasklist_lock,
- * so it is safe to do it under read_lock.
- */
-+ /*
- if (unlikely(tsk->group_leader == child_reaper(tsk)))
- tsk->nsproxy->pid_ns->child_reaper = tsk;
-+ */
-
- zap_other_threads(tsk);
- read_unlock(&tasklist_lock);
diff -Nurb linux-2.6.22-580/include/linux/arrays.h linux-2.6.22-590/include/linux/arrays.h
--- linux-2.6.22-580/include/linux/arrays.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.22-590/include/linux/arrays.h 2008-04-29 17:05:11.000000000 -0400
++++ linux-2.6.22-590/include/linux/arrays.h 2008-04-30 09:29:41.000000000 -0400
@@ -0,0 +1,36 @@
+#ifndef __ARRAYS_H__
+#define __ARRAYS_H__
+};
+#endif
diff -Nurb linux-2.6.22-580/include/linux/mutex.h linux-2.6.22-590/include/linux/mutex.h
---- linux-2.6.22-580/include/linux/mutex.h 2008-04-30 09:19:15.000000000 -0400
-+++ linux-2.6.22-590/include/linux/mutex.h 2008-04-29 17:09:49.000000000 -0400
+--- linux-2.6.22-580/include/linux/mutex.h 2007-07-08 19:32:17.000000000 -0400
++++ linux-2.6.22-590/include/linux/mutex.h 2008-04-30 09:45:43.000000000 -0400
@@ -53,6 +53,10 @@
struct thread_info *owner;
const char *name;
+ struct thread_info *owner;
+#endif
#endif
-
#ifdef CONFIG_DEBUG_LOCK_ALLOC
+ struct lockdep_map dep_map;
diff -Nurb linux-2.6.22-580/include/linux/sched.h linux-2.6.22-590/include/linux/sched.h
---- linux-2.6.22-580/include/linux/sched.h 2008-04-29 17:04:54.000000000 -0400
-+++ linux-2.6.22-590/include/linux/sched.h 2008-04-29 17:05:11.000000000 -0400
+--- linux-2.6.22-580/include/linux/sched.h 2008-04-30 09:29:26.000000000 -0400
++++ linux-2.6.22-590/include/linux/sched.h 2008-04-30 09:29:41.000000000 -0400
@@ -850,6 +850,10 @@
#endif
unsigned long sleep_avg;
diff -Nurb linux-2.6.22-580/kernel/mutex.c linux-2.6.22-590/kernel/mutex.c
--- linux-2.6.22-580/kernel/mutex.c 2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22-590/kernel/mutex.c 2008-04-29 17:05:11.000000000 -0400
++++ linux-2.6.22-590/kernel/mutex.c 2008-04-30 09:29:41.000000000 -0400
@@ -18,6 +18,16 @@
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/debug_locks.h>
+#include <linux/arrays.h>
-+
++#undef CONFIG_CHOPSTIX
+#ifdef CONFIG_CHOPSTIX
+struct event_spec {
+ unsigned long pc;
}
diff -Nurb linux-2.6.22-580/kernel/sched.c linux-2.6.22-590/kernel/sched.c
---- linux-2.6.22-580/kernel/sched.c 2008-04-29 17:04:54.000000000 -0400
-+++ linux-2.6.22-590/kernel/sched.c 2008-04-30 09:14:33.000000000 -0400
+--- linux-2.6.22-580/kernel/sched.c 2008-04-30 09:29:26.000000000 -0400
++++ linux-2.6.22-590/kernel/sched.c 2008-04-30 09:29:41.000000000 -0400
@@ -10,7 +10,7 @@
* 1998-11-19 Implemented schedule_timeout() and related stuff
* by Andrea Arcangeli
+EXPORT_SYMBOL(in_sched_functions);
+#endif
diff -Nurb linux-2.6.22-580/mm/slab.c linux-2.6.22-590/mm/slab.c
---- linux-2.6.22-580/mm/slab.c 2008-04-29 17:04:54.000000000 -0400
-+++ linux-2.6.22-590/mm/slab.c 2008-04-29 17:05:11.000000000 -0400
+--- linux-2.6.22-580/mm/slab.c 2008-04-30 09:29:26.000000000 -0400
++++ linux-2.6.22-590/mm/slab.c 2008-04-30 09:29:41.000000000 -0400
@@ -110,11 +110,13 @@
#include <linux/fault-inject.h>
#include <linux/rtmutex.h>
local_irq_restore(flags);
}
EXPORT_SYMBOL(kfree);
+--- linux-2.6.22.19-chopstix/mm/memory.c.orig 2008-02-25 18:59:40.000000000 -0500
++++ linux-2.6.22.19-chopstix/mm/memory.c 2009-02-17 18:34:55.000000000 -0500
+@@ -59,6 +59,7 @@
+
+ #include <linux/swapops.h>
+ #include <linux/elf.h>
++#include <linux/arrays.h>
+
+ #ifndef CONFIG_NEED_MULTIPLE_NODES
+ /* use the per-pgdat data instead for discontigmem - mbligh */
+@@ -2581,6 +2582,15 @@
+ return VM_FAULT_MINOR;
+ }
+
++extern void (*rec_event)(void *,unsigned int);
++struct event_spec {
++ unsigned long pc;
++ unsigned long dcookie;
++ unsigned count;
++ unsigned char reason;
++};
++
++
+ /*
+ * By the time we get here, we already hold the mm semaphore
+ */
+@@ -2610,6 +2620,24 @@
+ if (!pte)
+ return VM_FAULT_OOM;
+
++#ifdef CONFIG_CHOPSTIX
++ if (rec_event) {
++ struct event event;
++ struct event_spec espec;
++ struct pt_regs *regs;
++ unsigned int pc;
++ regs = task_pt_regs(current);
++ pc = regs->eip & (unsigned int) ~4095;
++
++ espec.reason = 0; /* alloc */
++ event.event_data=&espec;
++ event.task = current;
++ espec.pc=pc;
++ event.event_type=5;
++ (*rec_event)(&event, 1);
++ }
++#endif
++
+ return handle_pte_fault(mm, vma, address, pte, pmd, write_access);
+ }
+