fix rpm-build dependency problem
[linux-2.6.git] / linux-2.6-591-chopstix-intern.patch
index 616522b..81a578c 100644 (file)
@@ -1,8 +1,43 @@
+From 6f68de5f723e57e2709b468f55914fd0f963ce90 Mon Sep 17 00:00:00 2001
+From: S.Çağlar Onur <caglar@cs.princeton.edu>
+Date: Tue, 7 Dec 2010 11:09:43 -0500
+Subject: [PATCH] linux-2.6-591-chopstix-intern.patch
+
+block/blk-core.c: In function '__generic_make_request':
+block/blk-core.c:1557: warning: assignment makes integer from pointer without a cast
+fs/exec.c: In function 'open_exec':
+fs/exec.c:698: warning: ISO C90 forbids mixed declarations and code
+fs/bio.c: In function 'bio_endio':
+fs/bio.c:1440: warning: assignment makes integer from pointer without a cast
+mm/slab.c: In function '__cache_alloc':
+mm/slab.c:3513: warning: assignment makes integer from pointer without a cast
+mm/slab.c: In function '__cache_free':
+mm/slab.c:3646: warning: assignment makes integer from pointer without a cast
+
+---
+ arch/Kconfig                     |    8 ++++
+ arch/x86/kernel/asm-offsets_32.c |   25 +++++++++++
+ arch/x86/kernel/entry_32.S       |   28 +++++++++++++
+ arch/x86/mm/fault.c              |   10 +++++
+ block/blk-core.c                 |   29 +++++++++++++
+ drivers/oprofile/cpu_buffer.c    |   30 ++++++++++++++
+ fs/bio.c                         |   31 ++++++++++++++
+ fs/exec.c                        |    8 ++++
+ include/linux/arrays.h           |   39 ++++++++++++++++++
+ include/linux/mutex.h            |    2 +-
+ include/linux/sched.h            |    5 ++
+ kernel/mutex.c                   |   55 +++++++++++++++++++++++++
+ kernel/sched.c                   |   82 +++++++++++++++++++++++++++++++++++++-
+ mm/memory.c                      |   29 +++++++++++++
+ mm/slab.c                        |   54 +++++++++++++++++++++++--
+ 15 files changed, 429 insertions(+), 6 deletions(-)
+ create mode 100644 include/linux/arrays.h
+
 diff --git a/arch/Kconfig b/arch/Kconfig
-index 4e312ff..ef6a721 100644
+index b15fd1c..16a5734 100644
 --- a/arch/Kconfig
 +++ b/arch/Kconfig
-@@ -43,6 +43,14 @@ config OPROFILE_EVENT_MULTIPLEX
+@@ -41,6 +41,14 @@ config OPROFILE_EVENT_MULTIPLEX
  
          If unsure, say N.
  
@@ -68,7 +103,7 @@ index dfdbf64..29c79b8 100644
        OFFSET(TI_exec_domain, thread_info, exec_domain);
        OFFSET(TI_flags, thread_info, flags);
 diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
-index c097e7d..8eff053 100644
+index 21feb03..1109aac 100644
 --- a/arch/x86/kernel/entry_32.S
 +++ b/arch/x86/kernel/entry_32.S
 @@ -526,6 +526,34 @@ ENTRY(system_call)
@@ -107,7 +142,7 @@ index c097e7d..8eff053 100644
        movl %eax,PT_EAX(%esp)          # store the return value
  syscall_exit:
 diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
-index 4302583..85bf9f2 100644
+index a948561..76d32a6 100644
 --- a/arch/x86/mm/fault.c
 +++ b/arch/x86/mm/fault.c
 @@ -62,6 +62,16 @@ static inline int notify_page_fault(struct pt_regs *regs)
@@ -128,7 +163,7 @@ index 4302583..85bf9f2 100644
   * Prefetch quirks:
   *
 diff --git a/block/blk-core.c b/block/blk-core.c
-index 71da511..1cefcaa 100644
+index 5e1b914..2260822 100644
 --- a/block/blk-core.c
 +++ b/block/blk-core.c
 @@ -27,12 +27,23 @@
@@ -155,7 +190,7 @@ index 71da511..1cefcaa 100644
  EXPORT_TRACEPOINT_SYMBOL_GPL(block_remap);
  EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_remap);
  EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_complete);
-@@ -1478,6 +1489,24 @@ static inline void __generic_make_request(struct bio *bio)
+@@ -1535,6 +1546,24 @@ static inline void __generic_make_request(struct bio *bio)
  
                trace_block_bio_queue(q, bio);
  
@@ -181,7 +216,7 @@ index 71da511..1cefcaa 100644
        } while (ret);
  
 diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c
-index a7aae24..9817d91 100644
+index de82183..1f1acf6 100644
 --- a/drivers/oprofile/cpu_buffer.c
 +++ b/drivers/oprofile/cpu_buffer.c
 @@ -22,6 +22,7 @@
@@ -192,7 +227,7 @@ index a7aae24..9817d91 100644
  
  #include "event_buffer.h"
  #include "cpu_buffer.h"
-@@ -326,6 +327,17 @@ static inline void oprofile_end_trace(struct oprofile_cpu_buffer *cpu_buf)
+@@ -288,6 +289,17 @@ static inline void oprofile_end_trace(struct oprofile_cpu_buffer *cpu_buf)
        cpu_buf->tracing = 0;
  }
  
@@ -210,7 +245,7 @@ index a7aae24..9817d91 100644
  static inline void
  __oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs,
                          unsigned long event, int is_kernel)
-@@ -360,7 +372,25 @@ void oprofile_add_sample(struct pt_regs * const regs, unsigned long event)
+@@ -322,7 +334,25 @@ void oprofile_add_sample(struct pt_regs * const regs, unsigned long event)
        int is_kernel = !user_mode(regs);
        unsigned long pc = profile_pc(regs);
  
@@ -237,7 +272,7 @@ index a7aae24..9817d91 100644
  
  /*
 diff --git a/fs/bio.c b/fs/bio.c
-index e0c9e71..796767d 100644
+index e10d5b1..db37c70 100644
 --- a/fs/bio.c
 +++ b/fs/bio.c
 @@ -26,6 +26,7 @@
@@ -256,7 +291,7 @@ index e0c9e71..796767d 100644
  /*
   * fs_bio_set is the bio_set containing bio and iovec memory pools used by
   * IO code that does not need private memory pools.
-@@ -1398,6 +1400,17 @@ void bio_check_pages_dirty(struct bio *bio)
+@@ -1395,6 +1397,17 @@ void bio_check_pages_dirty(struct bio *bio)
        }
  }
  
@@ -274,7 +309,7 @@ index e0c9e71..796767d 100644
  /**
   * bio_endio - end I/O on a bio
   * @bio:      bio
-@@ -1419,6 +1432,24 @@ void bio_endio(struct bio *bio, int error)
+@@ -1416,6 +1429,24 @@ void bio_endio(struct bio *bio, int error)
        else if (!test_bit(BIO_UPTODATE, &bio->bi_flags))
                error = -EIO;
  
@@ -300,7 +335,7 @@ index e0c9e71..796767d 100644
                bio->bi_end_io(bio, error);
  }
 diff --git a/fs/exec.c b/fs/exec.c
-index 0a049b8..6c6bcc5 100644
+index f42d519..5ac9745 100644
 --- a/fs/exec.c
 +++ b/fs/exec.c
 @@ -27,6 +27,7 @@
@@ -311,15 +346,15 @@ index 0a049b8..6c6bcc5 100644
  #include <linux/fcntl.h>
  #include <linux/smp_lock.h>
  #include <linux/swap.h>
-@@ -673,6 +674,13 @@ struct file *open_exec(const char *name)
+@@ -693,6 +694,13 @@ struct file *open_exec(const char *name)
        if (err)
                goto exit;
  
 +#ifdef CONFIG_CHOPSTIX
 +      unsigned long cookie;
 +      extern void (*rec_event)(void *, unsigned int);
-+      if (rec_event && !nd.path.dentry->d_cookie)
-+              get_dcookie(&nd.path, &cookie);
++      if (rec_event && !(file->f_path.dentry->d_flags & DCACHE_COOKIE))
++              get_dcookie(&file->f_path, &cookie);
 +#endif
 +
  out:
@@ -371,24 +406,23 @@ index 0000000..7641a3c
 +};
 +#endif
 diff --git a/include/linux/mutex.h b/include/linux/mutex.h
-index 878cab4..8bac64d 100644
+index 878cab4..6c21914 100644
 --- a/include/linux/mutex.h
 +++ b/include/linux/mutex.h
-@@ -57,6 +57,9 @@ struct mutex {
-       const char              *name;
-       void                    *magic;
- #endif
-+#ifdef CONFIG_CHOPSTIX
-+      struct thread_info      *owner;
-+#endif
- #ifdef CONFIG_DEBUG_LOCK_ALLOC
-       struct lockdep_map      dep_map;
+@@ -50,7 +50,7 @@ struct mutex {
+       atomic_t                count;
+       spinlock_t              wait_lock;
+       struct list_head        wait_list;
+-#if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP)
++#if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP) || defined(CONFIG_CHOPSTIX)
+       struct thread_info      *owner;
  #endif
+ #ifdef CONFIG_DEBUG_MUTEXES
 diff --git a/include/linux/sched.h b/include/linux/sched.h
-index c9d3cae..dd62888 100644
+index caf30e1..6d60b0f 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -1349,6 +1349,11 @@ struct task_struct {
+@@ -1351,6 +1351,11 @@ struct task_struct {
        cputime_t utime, stime, utimescaled, stimescaled;
        cputime_t gtime;
        cputime_t prev_utime, prev_stime;
@@ -401,7 +435,7 @@ index c9d3cae..dd62888 100644
        struct timespec start_time;             /* monotonic time */
        struct timespec real_start_time;        /* boot based time */
 diff --git a/kernel/mutex.c b/kernel/mutex.c
-index 947b3ad..ae1dc67 100644
+index e04aa45..196ac04 100644
 --- a/kernel/mutex.c
 +++ b/kernel/mutex.c
 @@ -23,6 +23,16 @@
@@ -431,7 +465,7 @@ index 947b3ad..ae1dc67 100644
        spin_lock_init(&lock->wait_lock);
        INIT_LIST_HEAD(&lock->wait_list);
        mutex_clear_owner(lock);
-@@ -247,6 +260,25 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
+@@ -254,6 +267,25 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
                }
                __set_task_state(task, state);
  
@@ -457,7 +491,7 @@ index 947b3ad..ae1dc67 100644
                /* didnt get the lock, go to sleep: */
                spin_unlock_mutex(&lock->wait_lock, flags);
                preempt_enable_no_resched();
-@@ -261,6 +293,10 @@ done:
+@@ -268,6 +300,10 @@ done:
        mutex_remove_waiter(lock, &waiter, current_thread_info());
        mutex_set_owner(lock);
  
@@ -468,7 +502,7 @@ index 947b3ad..ae1dc67 100644
        /* set it to 0 if there are no waiters left: */
        if (likely(list_empty(&lock->wait_list)))
                atomic_set(&lock->count, 0);
-@@ -331,6 +367,25 @@ __mutex_unlock_common_slowpath(atomic_t *lock_count, int nested)
+@@ -338,6 +374,25 @@ __mutex_unlock_common_slowpath(atomic_t *lock_count, int nested)
  
                debug_mutex_wake_waiter(lock, waiter);
  
@@ -495,7 +529,7 @@ index 947b3ad..ae1dc67 100644
        }
  
 diff --git a/kernel/sched.c b/kernel/sched.c
-index 90b63b8..43b728e 100644
+index dd8a4df..345645b 100644
 --- a/kernel/sched.c
 +++ b/kernel/sched.c
 @@ -10,7 +10,7 @@
@@ -524,7 +558,7 @@ index 90b63b8..43b728e 100644
  #define CREATE_TRACE_POINTS
  #include <trace/events/sched.h>
  
-@@ -2742,6 +2746,10 @@ static void __sched_fork(struct task_struct *p)
+@@ -2719,6 +2723,10 @@ static void __sched_fork(struct task_struct *p)
        INIT_HLIST_HEAD(&p->preempt_notifiers);
  #endif
  
@@ -535,7 +569,7 @@ index 90b63b8..43b728e 100644
        /*
         * We mark the process as running here, but have not actually
         * inserted it onto the runqueue yet. This guarantees that
-@@ -5659,6 +5667,30 @@ pick_next_task(struct rq *rq)
+@@ -5764,6 +5772,30 @@ pick_next_task(struct rq *rq)
        }
  }
  
@@ -566,7 +600,7 @@ index 90b63b8..43b728e 100644
  /*
   * schedule() is the main scheduler function.
   */
-@@ -5706,6 +5738,54 @@ need_resched_nonpreemptible:
+@@ -5811,6 +5843,54 @@ need_resched_nonpreemptible:
        next = pick_next_task(rq);
  
        if (likely(prev != next)) {
@@ -619,10 +653,10 @@ index 90b63b8..43b728e 100644
 +#endif
 +
                sched_info_switch(prev, next);
-               perf_event_task_sched_out(prev, next, cpu);
+               perf_event_task_sched_out(prev, next);
  
 diff --git a/mm/memory.c b/mm/memory.c
-index e828063..6e88fed 100644
+index 30858a5..b9a9d9f 100644
 --- a/mm/memory.c
 +++ b/mm/memory.c
 @@ -57,6 +57,7 @@
@@ -633,7 +667,7 @@ index e828063..6e88fed 100644
  
  #include <asm/io.h>
  #include <asm/pgalloc.h>
-@@ -3070,6 +3071,16 @@ out:
+@@ -3152,6 +3153,16 @@ out:
        return ret;
  }
  
@@ -650,7 +684,7 @@ index e828063..6e88fed 100644
  /*
   * By the time we get here, we already hold the mm semaphore
   */
-@@ -3115,6 +3126,24 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -3197,6 +3208,24 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
        if (!pte)
                return VM_FAULT_OOM;
  
@@ -676,7 +710,7 @@ index e828063..6e88fed 100644
  }
  
 diff --git a/mm/slab.c b/mm/slab.c
-index ad2828e..5acdf6c 100644
+index f644e70..6a5489c 100644
 --- a/mm/slab.c
 +++ b/mm/slab.c
 @@ -113,6 +113,7 @@
@@ -686,8 +720,8 @@ index ad2828e..5acdf6c 100644
 +#include <linux/arrays.h>
  #include      <linux/debugobjects.h>
  #include      <linux/kmemcheck.h>
-@@ -252,6 +253,16 @@ struct slab_rcu {
+ #include      <linux/memory.h>
+@@ -253,6 +254,16 @@ struct slab_rcu {
        void *addr;
  };
  
@@ -704,7 +738,7 @@ index ad2828e..5acdf6c 100644
  /*
   * struct array_cache
   *
-@@ -3400,6 +3411,19 @@ __cache_alloc(struct kmem_cache *cachep, gfp_t flags, void *caller)
+@@ -3491,6 +3502,19 @@ __cache_alloc(struct kmem_cache *cachep, gfp_t flags, void *caller)
        kmemleak_alloc_recursive(objp, obj_size(cachep), 1, cachep->flags,
                                 flags);
        prefetchw(objp);
@@ -724,7 +758,7 @@ index ad2828e..5acdf6c 100644
  
        if (likely(objp))
                kmemcheck_slab_alloc(cachep, flags, objp, obj_size(cachep));
-@@ -3512,13 +3536,28 @@ free_done:
+@@ -3603,13 +3627,28 @@ free_done:
   * Release an obj back to its cache. If the obj has a constructed state, it must
   * be in this state _before_ it is released.  Called with disabled ints.
   */
@@ -755,7 +789,7 @@ index ad2828e..5acdf6c 100644
        vx_slab_free(cachep);
  
        kmemcheck_slab_free(cachep, objp, obj_size(cachep));
-@@ -3720,10 +3759,17 @@ void *__kmalloc_track_caller(size_t size, gfp_t flags, unsigned long caller)
+@@ -3811,10 +3850,17 @@ void *__kmalloc_track_caller(size_t size, gfp_t flags, unsigned long caller)
  EXPORT_SYMBOL(__kmalloc_track_caller);
  
  #else
@@ -773,7 +807,7 @@ index ad2828e..5acdf6c 100644
  EXPORT_SYMBOL(__kmalloc);
  #endif
  
-@@ -3743,7 +3789,7 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp)
+@@ -3834,7 +3880,7 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp)
        debug_check_no_locks_freed(objp, obj_size(cachep));
        if (!(cachep->flags & SLAB_DEBUG_OBJECTS))
                debug_check_no_obj_freed(objp, obj_size(cachep));
@@ -782,7 +816,7 @@ index ad2828e..5acdf6c 100644
        local_irq_restore(flags);
  
        trace_kmem_cache_free(_RET_IP_, objp);
-@@ -3773,7 +3819,7 @@ void kfree(const void *objp)
+@@ -3864,7 +3910,7 @@ void kfree(const void *objp)
        c = virt_to_cache(objp);
        debug_check_no_locks_freed(objp, obj_size(c));
        debug_check_no_obj_freed(objp, obj_size(c));
@@ -791,3 +825,6 @@ index ad2828e..5acdf6c 100644
        local_irq_restore(flags);
  }
  EXPORT_SYMBOL(kfree);
+-- 
+1.5.4.3
+