]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'linus' into sched/urgent
authorIngo Molnar <mingo@elte.hu>
Mon, 11 Aug 2008 11:40:56 +0000 (13:40 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 11 Aug 2008 11:40:56 +0000 (13:40 +0200)
1  2 
kernel/sched.c

diff --combined kernel/sched.c
index 0d1717b0022549ba69097f31b35093ee4527524c,04160d277e7aeafe5b34e58da1bcb5a786b1696d..f0141947c7d54649ba95f22566629fcdb22d60d3
@@@ -834,7 -834,7 +834,7 @@@ static inline u64 global_rt_period(void
  
  static inline u64 global_rt_runtime(void)
  {
 -      if (sysctl_sched_rt_period < 0)
 +      if (sysctl_sched_rt_runtime < 0)
                return RUNTIME_INF;
  
        return (u64)sysctl_sched_rt_runtime * NSEC_PER_USEC;
@@@ -5004,19 -5004,21 +5004,21 @@@ recheck
                        return -EPERM;
        }
  
+       if (user) {
  #ifdef CONFIG_RT_GROUP_SCHED
-       /*
-        * Do not allow realtime tasks into groups that have no runtime
-        * assigned.
-        */
-       if (user
-           && rt_policy(policy) && task_group(p)->rt_bandwidth.rt_runtime == 0)
-               return -EPERM;
+               /*
+                * Do not allow realtime tasks into groups that have no runtime
+                * assigned.
+                */
+               if (rt_policy(policy) && task_group(p)->rt_bandwidth.rt_runtime == 0)
+                       return -EPERM;
  #endif
  
-       retval = security_task_setscheduler(p, policy, param);
-       if (retval)
-               return retval;
+               retval = security_task_setscheduler(p, policy, param);
+               if (retval)
+                       return retval;
+       }
        /*
         * make sure no PI-waiters arrive (or leave) while we are
         * changing the priority of the task:
@@@ -7671,34 -7673,34 +7673,34 @@@ static ssize_t sched_power_savings_stor
  }
  
  #ifdef CONFIG_SCHED_MC
- static ssize_t sched_mc_power_savings_show(struct sys_device *dev,
-                               struct sysdev_attribute *attr, char *page)
+ static ssize_t sched_mc_power_savings_show(struct sysdev_class *class,
+                                          char *page)
  {
        return sprintf(page, "%u\n", sched_mc_power_savings);
  }
- static ssize_t sched_mc_power_savings_store(struct sys_device *dev,
-                                           struct sysdev_attribute *attr,
+ static ssize_t sched_mc_power_savings_store(struct sysdev_class *class,
                                            const char *buf, size_t count)
  {
        return sched_power_savings_store(buf, count, 0);
  }
- static SYSDEV_ATTR(sched_mc_power_savings, 0644, sched_mc_power_savings_show,
-                  sched_mc_power_savings_store);
+ static SYSDEV_CLASS_ATTR(sched_mc_power_savings, 0644,
+                        sched_mc_power_savings_show,
+                        sched_mc_power_savings_store);
  #endif
  
  #ifdef CONFIG_SCHED_SMT
- static ssize_t sched_smt_power_savings_show(struct sys_device *dev,
-                               struct sysdev_attribute *attr, char *page)
+ static ssize_t sched_smt_power_savings_show(struct sysdev_class *dev,
+                                           char *page)
  {
        return sprintf(page, "%u\n", sched_smt_power_savings);
  }
- static ssize_t sched_smt_power_savings_store(struct sys_device *dev,
-                                            struct sysdev_attribute *attr,
+ static ssize_t sched_smt_power_savings_store(struct sysdev_class *dev,
                                             const char *buf, size_t count)
  {
        return sched_power_savings_store(buf, count, 1);
  }
- static SYSDEV_ATTR(sched_smt_power_savings, 0644, sched_smt_power_savings_show,
+ static SYSDEV_CLASS_ATTR(sched_smt_power_savings, 0644,
+                  sched_smt_power_savings_show,
                   sched_smt_power_savings_store);
  #endif