1. 29 4月, 2008 5 次提交
  2. 06 3月, 2008 3 次提交
    • S
      [CPUFREQ] fix section mismatch warnings · f6ebef30
      Sam Ravnborg 提交于
      Fix the following warnings:
      WARNING: vmlinux.o(.text+0xfe6711): Section mismatch in reference from the function cpufreq_unregister_driver() to the variable .cpuinit.data:cpufreq_cpu_notifier
      WARNING: vmlinux.o(.text+0xfe68af): Section mismatch in reference from the function cpufreq_register_driver() to the variable .cpuinit.data:cpufreq_cpu_notifier
      WARNING: vmlinux.o(.exit.text+0xc4fa): Section mismatch in reference from the function cpufreq_stats_exit() to the variable .cpuinit.data:cpufreq_stat_cpu_notifier
      
      The warnings were casued by references to unregister_hotcpu_notifier()
      from normal functions or exit functions.
      This is flagged by modpost as a potential error because
      it does not know that for the non HOTPLUG_CPU
      scenario the unregister_hotcpu_notifier() is a nop.
      Silence the warning by replacing the __initdata
      annotation with a __refdata annotation.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDave Jones <davej@codemonkey.org.uk>
      f6ebef30
    • D
      [CPUFREQ] Fix missing cpufreq_cpu_put() call in ->store · a07530b4
      Dave Jones 提交于
      refactor to use gotos instead of explicit exit paths
      Signed-off-by: NDave Jones <davej@redhat.com>
      a07530b4
    • D
      [CPUFREQ] Fix missing cpufreq_cpu_put() call in ->show · 0db4a8a9
      Dave Jones 提交于
      refactor to use gotos instead of explicit exit paths
      Signed-off-by: NDave Jones <davej@redhat.com>
      0db4a8a9
  3. 22 2月, 2008 1 次提交
    • B
      cpufreq: fix kobject reference count handling · 7ab47050
      Balaji Rao 提交于
      The cpufreq core should not take an extra kobject reference count for no
      reason, and then refuse to release it.  This has been reported as
      keeping machines from properly powering down all the way.
      Signed-off-by: NBalaji Rao <balajirrao@gmail.com>
      Cc: Dave Jones <davej@codemonkey.org.uk>
      Cc: Yi Yang <yi.y.yang@intel.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Frans Pop <elendil@planet.nl>
      Cc: Yinghai Lu <yhlu.kernel@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7ab47050
  4. 07 2月, 2008 4 次提交
  5. 30 1月, 2008 1 次提交
    • Y
      cpufreq: fix obvious condition statement error · 53391fa2
      Yi Yang 提交于
      The function __cpufreq_set_policy in file drivers/cpufreq/cpufreq.c
      has a very obvious error:
      
              if (policy->min > data->min && policy->min > policy->max) {
                      ret = -EINVAL;
                      goto error_out;
              }
      
      This condtion statement is wrong because it returns -EINVAL only if
      policy->min is greater than policy->max (in this case,
      "policy->min > data->min" is true for ever.). In fact, it should
      return -EINVAL as well if policy->max is less than data->min.
      
      The correct condition should be:
      
      	if (policy->min > data->max || policy->max < data->min) {
      
      The following test result testifies the above conclusion:
      
      Before applying this patch:
      
      [root@yangyi-dev /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
      2394000 1596000
      [root@yangyi-dev /]# echo 1596000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
      [root@yangyi-dev /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
      1596000
      [root@yangyi-dev /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
      1596000
      [root@yangyi-dev /]# echo "2000000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
      -bash: echo: write error: Invalid argument
      [root@yangyi-dev /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
      1596000
      [root@yangyi-dev /]# echo "0" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
      [root@yangyi-dev /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
      1596000
      [root@yangyi-dev /]# echo "1595000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
      [root@yangyi-dev /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
      1596000
      [root@yangyi-dev /]#
      
      After applying this patch:
      
      [root@yangyi-dev /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
      2394000 1596000
      [root@yangyi-dev /]# echo 1596000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
      [root@yangyi-dev /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
      1596000
      [root@yangyi-dev /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
      1596000
      [root@localhost /]# echo "2000000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
      -bash: echo: write error: Invalid argument
      [root@localhost /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
      1596000
      [root@localhost /]# echo "0" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
      -bash: echo: write error: Invalid argument
      [root@localhost /]# echo "1595000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
      -bash: echo: write error: Invalid argument
      [root@localhost /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
      1596000
      [root@localhost /]# echo "1596000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
      [root@localhost /]# echo "2394000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
      [root@localhost /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
      2394000
      [root@localhost /]
      Signed-off-by: NYi Yang <yi.y.yang@intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      53391fa2
  6. 25 1月, 2008 2 次提交
  7. 18 1月, 2008 1 次提交
    • J
      cpufreq: Initialise default governor before use · 6915719b
      Johannes Weiner 提交于
      When the cpufreq driver starts up at boot time, it calls into the default
      governor which might not be initialised yet.  This hurts when the
      governor's worker function relies on memory that is not yet set up by its
      init function.
      
      This migrates all governors from module_init() to fs_initcall() when being
      the default, as was already done in cpufreq_performance when it was the
      only possible choice.  The performance governor is always initialized early
      because it might be used as fallback even when not being the default.
      
      Fixes at least one actual oops where ondemand is the default governor and
      cpufreq_governor_dbs() uses the uninitialised kondemand_wq work-queue
      during boot-time.
      Signed-off-by: NJohannes Weiner <hannes@saeurebad.de>
      Cc: Dave Jones <davej@codemonkey.org.uk>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6915719b
  8. 18 12月, 2007 2 次提交
  9. 23 10月, 2007 2 次提交
  10. 13 10月, 2007 1 次提交
  11. 10 10月, 2007 1 次提交
    • A
      [CPUFREQ] Don't take semaphore in cpufreq_quick_get() · 9eb59573
      Andi Kleen 提交于
      I don't see any reason to take an expensive lock in cpufreq_quick_get()
      Reading policy->cur is a single atomic operation and after
      the lock is dropped again the state could change any time anyways.
      
      So don't take the lock in the first place.
      
      This also makes this function interrupt safe which is useful
      for some code of mine.
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
      Signed-off-by: NDave Jones <davej@redhat.com>
      9eb59573
  12. 05 10月, 2007 5 次提交
  13. 13 7月, 2007 2 次提交
  14. 12 7月, 2007 1 次提交
    • T
      sysfs: kill unnecessary attribute->owner · 7b595756
      Tejun Heo 提交于
      sysfs is now completely out of driver/module lifetime game.  After
      deletion, a sysfs node doesn't access anything outside sysfs proper,
      so there's no reason to hold onto the attribute owners.  Note that
      often the wrong modules were accounted for as owners leading to
      accessing removed modules.
      
      This patch kills now unnecessary attribute->owner.  Note that with
      this change, userland holding a sysfs node does not prevent the
      backing module from being unloaded.
      
      For more info regarding lifetime rule cleanup, please read the
      following message.
      
        http://article.gmane.org/gmane.linux.kernel/510293
      
      (tweaked by Greg to not delete the field just yet, to make it easier to
      merge things properly.)
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7b595756
  15. 22 6月, 2007 4 次提交
  16. 30 5月, 2007 1 次提交
  17. 10 5月, 2007 1 次提交
    • R
      Add suspend-related notifications for CPU hotplug · 8bb78442
      Rafael J. Wysocki 提交于
      Since nonboot CPUs are now disabled after tasks and devices have been
      frozen and the CPU hotplug infrastructure is used for this purpose, we need
      special CPU hotplug notifications that will help the CPU-hotplug-aware
      subsystems distinguish normal CPU hotplug events from CPU hotplug events
      related to a system-wide suspend or resume operation in progress.  This
      patch introduces such notifications and causes them to be used during
      suspend and resume transitions.  It also changes all of the
      CPU-hotplug-aware subsystems to take these notifications into consideration
      (for now they are handled in the same way as the corresponding "normal"
      ones).
      
      [oleg@tv-sign.ru: cleanups]
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Gautham R Shenoy <ego@in.ibm.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8bb78442
  18. 09 5月, 2007 1 次提交
  19. 27 4月, 2007 2 次提交