X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=linux-2.6-590-chopstix-intern.patch;h=5c8cc49e8b9c1c1b04ebe0dfc5ea58463c7c3076;hb=1b58f5f62e0b6db70f98875d74a9a4c95d1b5309;hp=71f53e828217ddf81ef8f000929f05604bc373cc;hpb=69491d17b2a88bccb06b8748c8415614c444803e;p=linux-2.6.git diff --git a/linux-2.6-590-chopstix-intern.patch b/linux-2.6-590-chopstix-intern.patch index 71f53e828..5c8cc49e8 100644 --- a/linux-2.6-590-chopstix-intern.patch +++ b/linux-2.6-590-chopstix-intern.patch @@ -275,6 +275,20 @@ diff -Nurb linux-2.6.22-580/include/linux/arrays.h linux-2.6.22-590/include/linu + struct task_struct *task; +}; +#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 +@@ -53,6 +53,10 @@ + struct thread_info *owner; + const char *name; + void *magic; ++#else ++#ifdef CONFIG_CHOPSTIX ++ struct thread_info *owner; ++#endif + #endif + + #ifdef CONFIG_DEBUG_LOCK_ALLOC 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 @@ -407,7 +421,7 @@ diff -Nurb linux-2.6.22-580/kernel/mutex.c linux-2.6.22-590/kernel/mutex.c 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-29 17:05:11.000000000 -0400 ++++ linux-2.6.22-590/kernel/sched.c 2008-04-30 09:14:33.000000000 -0400 @@ -10,7 +10,7 @@ * 1998-11-19 Implemented schedule_timeout() and related stuff * by Andrea Arcangeli @@ -505,7 +519,7 @@ diff -Nurb linux-2.6.22-580/kernel/sched.c linux-2.6.22-590/kernel/sched.c } } -@@ -3765,6 +3793,38 @@ +@@ -3765,6 +3793,39 @@ prev->sleep_avg = 0; prev->timestamp = prev->last_ran = now; @@ -514,19 +528,20 @@ diff -Nurb linux-2.6.22-580/kernel/sched.c linux-2.6.22-590/kernel/sched.c + if (rec_event) { + prev->last_ran_j = jiffies; + if (next->last_interrupted!=-1) { ++ if (next->last_interrupted) { ++ diff = (jiffies-next->last_interrupted); ++ sampling_reason = 0; ++ } ++ else { ++ diff = jiffies-next->last_ran_j; ++ sampling_reason = 1; ++ } ++ + if (diff > HZ/5) { + struct event event; + struct event_spec espec; + unsigned long eip; + -+ if (next->last_interrupted) { -+ diff = (jiffies-next->last_interrupted); -+ sampling_reason = 0; -+ } -+ else { -+ diff = jiffies-next->last_ran_j; -+ sampling_reason = 1; -+ } + espec.reason = sampling_reason; + eip = next->thread.esp & 4095; + event.event_data=&espec; @@ -544,7 +559,7 @@ diff -Nurb linux-2.6.22-580/kernel/sched.c linux-2.6.22-590/kernel/sched.c sched_info_switch(prev, next); if (likely(prev != next)) { next->timestamp = next->last_ran = now; -@@ -4664,6 +4724,7 @@ +@@ -4664,6 +4725,7 @@ get_task_struct(p); read_unlock(&tasklist_lock); @@ -552,7 +567,7 @@ diff -Nurb linux-2.6.22-580/kernel/sched.c linux-2.6.22-590/kernel/sched.c retval = -EPERM; if ((current->euid != p->euid) && (current->euid != p->uid) && !capable(CAP_SYS_NICE)) -@@ -5032,6 +5093,7 @@ +@@ -5032,6 +5094,7 @@ jiffies_to_timespec(p->policy == SCHED_FIFO ? 0 : task_timeslice(p), &t); read_unlock(&tasklist_lock); @@ -560,7 +575,7 @@ diff -Nurb linux-2.6.22-580/kernel/sched.c linux-2.6.22-590/kernel/sched.c retval = copy_to_user(interval, &t, sizeof(t)) ? -EFAULT : 0; out_nounlock: return retval; -@@ -7275,3 +7337,9 @@ +@@ -7275,3 +7338,9 @@ } #endif