]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 21 Apr 2008 22:41:27 +0000 (15:41 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 21 Apr 2008 22:41:27 +0000 (15:41 -0700)
* 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc:
  Deprecate the asm/semaphore.h files in feature-removal-schedule.
  Convert asm/semaphore.h users to linux/semaphore.h
  security: Remove unnecessary inclusions of asm/semaphore.h
  lib: Remove unnecessary inclusions of asm/semaphore.h
  kernel: Remove unnecessary inclusions of asm/semaphore.h
  include: Remove unnecessary inclusions of asm/semaphore.h
  fs: Remove unnecessary inclusions of asm/semaphore.h
  drivers: Remove unnecessary inclusions of asm/semaphore.h
  net: Remove unnecessary inclusions of asm/semaphore.h
  arch: Remove unnecessary inclusions of asm/semaphore.h

1  2 
Documentation/feature-removal-schedule.txt
arch/arm/plat-omap/clock.c
drivers/firmware/dcdbas.c
include/linux/fs.h
include/linux/sched.h
kernel/kthread.c
kernel/stop_machine.c

index 309c47b91598e4fba5d23eaec16234d560624895,44ce6f607f2547cf5c799daca286c9750359501b..b45ea28abc997c5269f20fdaa331f9a558cb4705
@@@ -282,13 -282,6 +282,13 @@@ Why:     Not used in-tree. The current out-
        out-of-tree driver.
  Who:  Thomas Gleixner <tglx@linutronix.de>
  
 +----------------------------
 +
 +What: usedac i386 kernel parameter
 +When: 2.6.27
 +Why:  replaced by allowdac and no dac combination
 +Who:  Glauber Costa <gcosta@redhat.com>
 +
  ---------------------------
  
  What: /sys/o2cb symlink
@@@ -298,3 -291,11 +298,11 @@@ Why:     /sys/fs/o2cb is the proper locatio
        ocfs2-tools. 2 years should be sufficient time to phase in new versions
        which know to look in /sys/fs/o2cb.
  Who:  ocfs2-devel@oss.oracle.com
+ ---------------------------
+ What: asm/semaphore.h
+ When: 2.6.26
+ Why:  Implementation became generic; users should now include
+       linux/semaphore.h instead.
+ Who:  Matthew Wilcox <willy@linux.intel.com>
index 32a533ba9adaa519dff8ef02c8d1a335b7e45e30,203ac508b6b59b8bd78faa9be98bce68d0f360f9..72d34a23a2ec6276073af8906e916075b6808945
@@@ -23,7 -23,6 +23,6 @@@
  #include <linux/platform_device.h>
  
  #include <asm/io.h>
- #include <asm/semaphore.h>
  
  #include <asm/arch/clock.h>
  
@@@ -304,23 -303,6 +303,23 @@@ void propagate_rate(struct clk * tclk
        }
  }
  
 +/**
 + * recalculate_root_clocks - recalculate and propagate all root clocks
 + *
 + * Recalculates all root clocks (clocks with no parent), which if the
 + * clock's .recalc is set correctly, should also propagate their rates.
 + * Called at init.
 + */
 +void recalculate_root_clocks(void)
 +{
 +      struct clk *clkp;
 +
 +      list_for_each_entry(clkp, &clocks, node) {
 +              if (unlikely(!clkp->parent) && likely((u32)clkp->recalc))
 +                      clkp->recalc(clkp);
 +      }
 +}
 +
  int clk_register(struct clk *clk)
  {
        if (clk == NULL || IS_ERR(clk))
@@@ -375,30 -357,6 +374,30 @@@ void clk_allow_idle(struct clk *clk
  }
  EXPORT_SYMBOL(clk_allow_idle);
  
 +void clk_enable_init_clocks(void)
 +{
 +      struct clk *clkp;
 +
 +      list_for_each_entry(clkp, &clocks, node) {
 +              if (clkp->flags & ENABLE_ON_INIT)
 +                      clk_enable(clkp);
 +      }
 +}
 +EXPORT_SYMBOL(clk_enable_init_clocks);
 +
 +#ifdef CONFIG_CPU_FREQ
 +void clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
 +{
 +      unsigned long flags;
 +
 +      spin_lock_irqsave(&clockfw_lock, flags);
 +      if (arch_clock->clk_init_cpufreq_table)
 +              arch_clock->clk_init_cpufreq_table(table);
 +      spin_unlock_irqrestore(&clockfw_lock, flags);
 +}
 +EXPORT_SYMBOL(clk_init_cpufreq_table);
 +#endif
 +
  /*-------------------------------------------------------------------------*/
  
  #ifdef CONFIG_OMAP_RESET_CLOCKS
@@@ -437,4 -395,3 +436,4 @@@ int __init clk_init(struct clk_function
  
        return 0;
  }
 +
index 0ffef3b7c6ca1400526007b867aecf4680534086,d8822eedba65fae844fd02c961cba8d458c22b4b..f235940719e71363b0a5f273ac84e9bc57093c37
@@@ -35,7 -35,6 +35,6 @@@
  #include <linux/types.h>
  #include <linux/mutex.h>
  #include <asm/io.h>
- #include <asm/semaphore.h>
  
  #include "dcdbas.h"
  
@@@ -265,7 -264,7 +264,7 @@@ static int smi_request(struct smi_cmd *
  
        /* SMI requires CPU 0 */
        old_mask = current->cpus_allowed;
 -      set_cpus_allowed(current, cpumask_of_cpu(0));
 +      set_cpus_allowed_ptr(current, &cpumask_of_cpu(0));
        if (smp_processor_id() != 0) {
                dev_dbg(&dcdbas_pdev->dev, "%s: failed to get CPU 0\n",
                        __FUNCTION__);
        );
  
  out:
 -      set_cpus_allowed(current, old_mask);
 +      set_cpus_allowed_ptr(current, &old_mask);
        return ret;
  }
  
diff --combined include/linux/fs.h
index d1eeea669d2c7c1fc4b8f9d4d13bad2a90e3dab8,91e8dec9e42b6c6b28d76b6aea590ee625348b97..0c609e71c3790cdd09ddce6ae51aa61d0d0f5e9a
@@@ -287,9 -287,9 +287,9 @@@ extern int dir_notify_enable
  #include <linux/pid.h>
  #include <linux/mutex.h>
  #include <linux/capability.h>
+ #include <linux/semaphore.h>
  
  #include <asm/atomic.h>
- #include <asm/semaphore.h>
  #include <asm/byteorder.h>
  
  struct export_operations;
@@@ -776,9 -776,6 +776,9 @@@ static inline int ra_has_index(struct f
                index <  ra->start + ra->size);
  }
  
 +#define FILE_MNT_WRITE_TAKEN  1
 +#define FILE_MNT_WRITE_RELEASED       2
 +
  struct file {
        /*
         * fu_list becomes invalid after file_free is called and queued via
        spinlock_t              f_ep_lock;
  #endif /* #ifdef CONFIG_EPOLL */
        struct address_space    *f_mapping;
 +#ifdef CONFIG_DEBUG_WRITECOUNT
 +      unsigned long f_mnt_write_state;
 +#endif
  };
  extern spinlock_t files_lock;
  #define file_list_lock() spin_lock(&files_lock);
  #define get_file(x)   atomic_inc(&(x)->f_count)
  #define file_count(x) atomic_read(&(x)->f_count)
  
 +#ifdef CONFIG_DEBUG_WRITECOUNT
 +static inline void file_take_write(struct file *f)
 +{
 +      WARN_ON(f->f_mnt_write_state != 0);
 +      f->f_mnt_write_state = FILE_MNT_WRITE_TAKEN;
 +}
 +static inline void file_release_write(struct file *f)
 +{
 +      f->f_mnt_write_state |= FILE_MNT_WRITE_RELEASED;
 +}
 +static inline void file_reset_write(struct file *f)
 +{
 +      f->f_mnt_write_state = 0;
 +}
 +static inline void file_check_state(struct file *f)
 +{
 +      /*
 +       * At this point, either both or neither of these bits
 +       * should be set.
 +       */
 +      WARN_ON(f->f_mnt_write_state == FILE_MNT_WRITE_TAKEN);
 +      WARN_ON(f->f_mnt_write_state == FILE_MNT_WRITE_RELEASED);
 +}
 +static inline int file_check_writeable(struct file *f)
 +{
 +      if (f->f_mnt_write_state == FILE_MNT_WRITE_TAKEN)
 +              return 0;
 +      printk(KERN_WARNING "writeable file with no "
 +                          "mnt_want_write()\n");
 +      WARN_ON(1);
 +      return -EINVAL;
 +}
 +#else /* !CONFIG_DEBUG_WRITECOUNT */
 +static inline void file_take_write(struct file *filp) {}
 +static inline void file_release_write(struct file *filp) {}
 +static inline void file_reset_write(struct file *filp) {}
 +static inline void file_check_state(struct file *filp) {}
 +static inline int file_check_writeable(struct file *filp)
 +{
 +      return 0;
 +}
 +#endif /* CONFIG_DEBUG_WRITECOUNT */
 +
  #define       MAX_NON_LFS     ((1UL<<31) - 1)
  
  /* Page cache limit. The filesystems should put that into their s_maxbytes 
@@@ -1784,8 -1735,7 +1784,8 @@@ extern struct file *create_read_pipe(st
  extern struct file *create_write_pipe(void);
  extern void free_write_pipe(struct file *);
  
 -extern int open_namei(int dfd, const char *, int, int, struct nameidata *);
 +extern struct file *do_filp_open(int dfd, const char *pathname,
 +              int open_flag, int mode);
  extern int may_open(struct nameidata *, int, int);
  
  extern int kernel_read(struct file *, unsigned long, char *, unsigned long);
diff --combined include/linux/sched.h
index be6914014c7045d0faf603406bfd586f404c9968,a37b5964828aa2da9ab851994ce21dc0ac65d47b..311380e5fe8915a1d85f6999f524bcd4330f0141
@@@ -61,7 -61,6 +61,6 @@@ struct sched_param 
  #include <linux/mm_types.h>
  
  #include <asm/system.h>
- #include <asm/semaphore.h>
  #include <asm/page.h>
  #include <asm/ptrace.h>
  #include <asm/cputime.h>
@@@ -704,7 -703,6 +703,7 @@@ enum cpu_idle_type 
  #define SD_POWERSAVINGS_BALANCE       256     /* Balance for power savings */
  #define SD_SHARE_PKG_RESOURCES        512     /* Domain members share cpu pkg resources */
  #define SD_SERIALIZE          1024    /* Only a single load balancing instance */
 +#define SD_WAKE_IDLE_FAR      2048    /* Gain latency sacrificing cache hit */
  
  #define BALANCE_FOR_MC_POWER  \
        (sched_smt_power_savings ? SD_POWERSAVINGS_BALANCE : 0)
@@@ -734,31 -732,12 +733,31 @@@ struct sched_group 
        u32 reciprocal_cpu_power;
  };
  
 +enum sched_domain_level {
 +      SD_LV_NONE = 0,
 +      SD_LV_SIBLING,
 +      SD_LV_MC,
 +      SD_LV_CPU,
 +      SD_LV_NODE,
 +      SD_LV_ALLNODES,
 +      SD_LV_MAX
 +};
 +
 +struct sched_domain_attr {
 +      int relax_domain_level;
 +};
 +
 +#define SD_ATTR_INIT  (struct sched_domain_attr) {    \
 +      .relax_domain_level = -1,                       \
 +}
 +
  struct sched_domain {
        /* These fields must be setup */
        struct sched_domain *parent;    /* top domain must be null terminated */
        struct sched_domain *child;     /* bottom domain must be null terminated */
        struct sched_group *groups;     /* the balancing groups of the domain */
        cpumask_t span;                 /* span of all CPUs in this domain */
 +      int first_cpu;                  /* cache of the first cpu in this domain */
        unsigned long min_interval;     /* Minimum balance interval ms */
        unsigned long max_interval;     /* Maximum balance interval ms */
        unsigned int busy_factor;       /* less balancing by factor if busy */
        unsigned int wake_idx;
        unsigned int forkexec_idx;
        int flags;                      /* See SD_* */
 +      enum sched_domain_level level;
  
        /* Runtime fields. */
        unsigned long last_balance;     /* init to jiffies. units in jiffies */
  #endif
  };
  
 -extern void partition_sched_domains(int ndoms_new, cpumask_t *doms_new);
 +extern void partition_sched_domains(int ndoms_new, cpumask_t *doms_new,
 +                                  struct sched_domain_attr *dattr_new);
  extern int arch_reinit_sched_domains(void);
  
  #endif        /* CONFIG_SMP */
@@@ -911,8 -888,7 +910,8 @@@ struct sched_class 
        void (*set_curr_task) (struct rq *rq);
        void (*task_tick) (struct rq *rq, struct task_struct *p, int queued);
        void (*task_new) (struct rq *rq, struct task_struct *p);
 -      void (*set_cpus_allowed)(struct task_struct *p, cpumask_t *newmask);
 +      void (*set_cpus_allowed)(struct task_struct *p,
 +                               const cpumask_t *newmask);
  
        void (*join_domain)(struct rq *rq);
        void (*leave_domain)(struct rq *rq);
@@@ -946,7 -922,6 +945,7 @@@ struct load_weight 
  struct sched_entity {
        struct load_weight      load;           /* for load-balancing */
        struct rb_node          run_node;
 +      struct list_head        group_node;
        unsigned int            on_rq;
  
        u64                     exec_start;
@@@ -1006,7 -981,6 +1005,7 @@@ struct sched_rt_entity 
        unsigned long timeout;
        int nr_cpus_allowed;
  
 +      struct sched_rt_entity *back;
  #ifdef CONFIG_RT_GROUP_SCHED
        struct sched_rt_entity  *parent;
        /* rq on which this entity is (to be) queued: */
@@@ -1527,21 -1501,15 +1526,21 @@@ static inline void put_task_struct(stru
  #define used_math() tsk_used_math(current)
  
  #ifdef CONFIG_SMP
 -extern int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask);
 +extern int set_cpus_allowed_ptr(struct task_struct *p,
 +                              const cpumask_t *new_mask);
  #else
 -static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
 +static inline int set_cpus_allowed_ptr(struct task_struct *p,
 +                                     const cpumask_t *new_mask)
  {
 -      if (!cpu_isset(0, new_mask))
 +      if (!cpu_isset(0, *new_mask))
                return -EINVAL;
        return 0;
  }
  #endif
 +static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
 +{
 +      return set_cpus_allowed_ptr(p, &new_mask);
 +}
  
  extern unsigned long long sched_clock(void);
  
@@@ -1582,6 -1550,7 +1581,6 @@@ static inline void wake_up_idle_cpu(in
  extern unsigned int sysctl_sched_latency;
  extern unsigned int sysctl_sched_min_granularity;
  extern unsigned int sysctl_sched_wakeup_granularity;
 -extern unsigned int sysctl_sched_batch_wakeup_granularity;
  extern unsigned int sysctl_sched_child_runs_first;
  extern unsigned int sysctl_sched_features;
  extern unsigned int sysctl_sched_migration_cost;
@@@ -1594,10 -1563,6 +1593,10 @@@ int sched_nr_latency_handler(struct ctl
  extern unsigned int sysctl_sched_rt_period;
  extern int sysctl_sched_rt_runtime;
  
 +int sched_rt_handler(struct ctl_table *table, int write,
 +              struct file *filp, void __user *buffer, size_t *lenp,
 +              loff_t *ppos);
 +
  extern unsigned int sysctl_sched_compat_yield;
  
  #ifdef CONFIG_RT_MUTEXES
@@@ -2065,7 -2030,7 +2064,7 @@@ static inline void arch_pick_mmap_layou
  }
  #endif
  
 -extern long sched_setaffinity(pid_t pid, cpumask_t new_mask);
 +extern long sched_setaffinity(pid_t pid, const cpumask_t *new_mask);
  extern long sched_getaffinity(pid_t pid, cpumask_t *mask);
  
  extern int sched_mc_power_savings, sched_smt_power_savings;
@@@ -2075,11 -2040,8 +2074,11 @@@ extern void normalize_rt_tasks(void)
  #ifdef CONFIG_GROUP_SCHED
  
  extern struct task_group init_task_group;
 +#ifdef CONFIG_USER_SCHED
 +extern struct task_group root_task_group;
 +#endif
  
 -extern struct task_group *sched_create_group(void);
 +extern struct task_group *sched_create_group(struct task_group *parent);
  extern void sched_destroy_group(struct task_group *tg);
  extern void sched_move_task(struct task_struct *tsk);
  #ifdef CONFIG_FAIR_GROUP_SCHED
@@@ -2090,9 -2052,6 +2089,9 @@@ extern unsigned long sched_group_shares
  extern int sched_group_set_rt_runtime(struct task_group *tg,
                                      long rt_runtime_us);
  extern long sched_group_rt_runtime(struct task_group *tg);
 +extern int sched_group_set_rt_period(struct task_group *tg,
 +                                    long rt_period_us);
 +extern long sched_group_rt_period(struct task_group *tg);
  #endif
  #endif
  
diff --combined kernel/kthread.c
index 25241d6ec8cdec1c5c2e1a80d61dff4335f9db9a,92dd1bcaa0df08d652059266c87ea96622c139a1..92cf6930ab51a74e034ae9db30d72b21e9a84e9d
@@@ -13,7 -13,6 +13,6 @@@
  #include <linux/file.h>
  #include <linux/module.h>
  #include <linux/mutex.h>
- #include <asm/semaphore.h>
  
  #define KTHREAD_NICE_LEVEL (-5)
  
@@@ -180,7 -179,6 +179,7 @@@ void kthread_bind(struct task_struct *k
        wait_task_inactive(k);
        set_task_cpu(k, cpu);
        k->cpus_allowed = cpumask_of_cpu(cpu);
 +      k->rt.nr_cpus_allowed = 1;
  }
  EXPORT_SYMBOL(kthread_bind);
  
diff --combined kernel/stop_machine.c
index e1b2a5b1b105452f3f741fa285c51358075cfb26,3da3c2c6702dd02944c1455622414ea3600f02cb..dc25b0baaa96944df5a61cc3cfef356f7f0c3bbd
@@@ -11,7 -11,6 +11,6 @@@
  #include <linux/interrupt.h>
  
  #include <asm/atomic.h>
- #include <asm/semaphore.h>
  #include <asm/uaccess.h>
  
  /* Since we effect priority and affinity (both of which are visible
@@@ -35,7 -34,7 +34,7 @@@ static int stopmachine(void *cpu
        int irqs_disabled = 0;
        int prepared = 0;
  
 -      set_cpus_allowed(current, cpumask_of_cpu((int)(long)cpu));
 +      set_cpus_allowed_ptr(current, &cpumask_of_cpu((int)(long)cpu));
  
        /* Ack: we are alive */
        smp_mb(); /* Theoretically the ack = 0 might not be on this CPU yet. */