1. 02 9月, 2009 9 次提交
    • T
      [CPUFREQ] Introduce global, not per core: /sys/devices/system/cpu/cpufreq · 8aa84ad8
      Thomas Renninger 提交于
      Currently everything in the cpufreq layer is per core based.
      This does not reflect reality, for example ondemand on conservative
      governors have global sysfs variables.
      
      Introduce a global cpufreq directory and add the kobject to the governor
      struct, so that governors can easily access it.
      The directory is initialized in the cpufreq_core_init initcall and thus will
      always be created if cpufreq is compiled in, even if no cpufreq driver is
      active later.
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      Signed-off-by: NDave Jones <davej@redhat.com>
      8aa84ad8
    • T
      [CPUFREQ] Bail out of cpufreq_add_dev if the link for a managed CPU got created · 4bfa042c
      Thomas Renninger 提交于
      Doing:
      echo 0 >cpu1/online
      echo 1 >cpu1/online
      
      on a managed CPU will result in:
      Jul 22 15:15:37 linux kernel: [   80.013864] WARNING: at fs/sysfs/dir.c:487 sysfs_add_one+0xcf/0xe6()
      Jul 22 15:15:37 linux kernel: [   80.013866] Hardware name: To Be Filled By O.E.M.
      Jul 22 15:15:37 linux kernel: [   80.013868] sysfs: cannot create duplicate filename '/devices/system/cpu/cpu1/cpufreq'
      Jul 22 15:15:37 linux kernel: [   80.013870] Modules linked in: powernow_k8
      Jul 22 15:15:37 linux kernel: [   80.013874] Pid: 5750, comm: bash Not tainted 2.6.31-rc2 #40
      Jul 22 15:15:37 linux kernel: [   80.013876] Call Trace:
      Jul 22 15:15:37 linux kernel: [   80.013879]  [<ffffffff8112ebda>] ? sysfs_add_one+0xcf/0xe6
      Jul 22 15:15:37 linux kernel: [   80.013884]  [<ffffffff81041926>] warn_slowpath_common+0x77/0xa4
      Jul 22 15:15:37 linux kernel: [   80.013888]  [<ffffffff810419a0>] warn_slowpath_fmt+0x3c/0x3e
      Jul 22 15:15:37 linux kernel: [   80.013891]  [<ffffffff8112ebda>] sysfs_add_one+0xcf/0xe6
      Jul 22 15:15:37 linux kernel: [   80.013894]  [<ffffffff8112f213>] create_dir+0x58/0x87
      Jul 22 15:15:37 linux kernel: [   80.013898]  [<ffffffff8112f27a>] sysfs_create_dir+0x38/0x4f
      Jul 22 15:15:37 linux kernel: [   80.013902]  [<ffffffff811ffb8a>] kobject_add_internal+0x11f/0x1de
      Jul 22 15:15:37 linux kernel: [   80.013905]  [<ffffffff811ffd21>] kobject_add_varg+0x41/0x4e
      Jul 22 15:15:37 linux kernel: [   80.013908]  [<ffffffff811ffd7a>] kobject_init_and_add+0x4c/0x57
      Jul 22 15:15:37 linux kernel: [   80.013913]  [<ffffffff810667bc>] ? mark_lock+0x22/0x228
      Jul 22 15:15:37 linux kernel: [   80.013918]  [<ffffffff813e8a3b>] cpufreq_add_dev_interface+0x40/0x1e4
      ...
      
      This bug slipped in by git commit:
      150b06f7f223cfd0f808737a5243cceca8ea47fa
      
      When splitting up cpufreq_add_dev, the whole cpufreq_add_dev function
      is not left anymore, only cpufreq_add_dev_policy.
      This patch should reconstruct the identical functionality again as it
      was before the split.
      
      CC: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      Signed-off-by: NDave Jones <davej@redhat.com>
      4bfa042c
    • D
      [CPUFREQ] Factor out policy setting from cpufreq_add_dev · ecf7e461
      Dave Jones 提交于
      Signed-off-by: NDave Jones <davej@redhat.com>
      ecf7e461
    • D
      909a694e
    • D
      19d6f7ec
    • D
      [CPUFREQ] cleanup up -ENOMEM handling in cpufreq_add_dev · 059019a3
      Dave Jones 提交于
      Signed-off-by: NDave Jones <davej@redhat.com>
      059019a3
    • D
      [CPUFREQ] Reduce scope of cpu_sys_dev in cpufreq_add_dev · 54e6fe16
      Dave Jones 提交于
      Signed-off-by: NDave Jones <davej@redhat.com>
      54e6fe16
    • N
      [CPUFREQ] update Doc for cpuinfo_cur_freq and scaling_cur_freq · da470db1
      Naga Chumbalkar 提交于
      I think the way "cpuinfo_cur_info" and "scaling_cur_info" are defined under
      ./Documentation/cpu-freq/user-guide.txt can be enhanced. Currently, they are
      both defined the same way: "Current speed/frequency" of the CPU, in KHz".
      
      Below is a patch that distinguishes one from the other.
      
      Regards,
      - naga -
      
      -----------------------------------------
      Update description for "cpuinfo_cur_freq" and "scaling_cur_freq".
      
      Some of the wording is drawn from comments found in
      ./drivers/cpufreq/cpufreq.c: cpufreq_out_of_sync():
      
       *      @old_freq: CPU frequency the kernel thinks the CPU runs at
       *      @new_freq: CPU frequency the CPU actually runs at
      Signed-off-by: NNaga Chumbalkar <nagananda.chumbalkar@hp.com>
      Signed-off-by: NDave Jones <davej@redhat.com>
      da470db1
    • D
      [CPUFREQ] Re-enable cpufreq suspend and resume code · ce6c3997
      Dominik Brodowski 提交于
      Commit 4bc5d341 is broken and causes regressions:
      
      (1) cpufreq_driver->resume() and ->suspend() were only called on
      __powerpc__, but you could set them on all architectures. In fact,
      ->resume() was defined and used before the PPC-related commit
      42d4dc3f complained about in 4bc5d341.
      
      (2) Therfore, the resume functions in acpi_cpufreq and speedstep-smi
      would never be called.
      
      (3) This means speedstep-smi would be unusuable after suspend or resume.
      
      The _real_ problem was calling cpufreq_driver->get() with interrupts
      off, but it re-enabling interrupts on some platforms. Why is ->get()
      necessary?
      
      Some systems like to change the CPU frequency behind our
      back, especially during BIOS-intensive operations like suspend or
      resume. If such systems also use a CPU frequency-dependant timing loop,
      delays might be off by large factors. Therefore, we need to ascertain
      as soon as possible that the CPU frequency is indeed at the speed we
      think it is. You can do this two ways: either setting it anew, or trying
      to get it. The latter is what was done, the former also has the same IRQ
      issue.
      
      So, let's try something different: defer the checking to after interrupts
      are re-enabled, by calling cpufreq_update_policy() (via schedule_work()).
      Timings may be off until this later stage, so let's watch out for
      resume regressions caused by the deferred handling of frequency changes
      behind the kernel's back.
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      Signed-off-by: NDave Jones <davej@redhat.com>
      ce6c3997
  2. 01 9月, 2009 6 次提交
  3. 31 8月, 2009 10 次提交
  4. 30 8月, 2009 2 次提交
  5. 29 8月, 2009 10 次提交
  6. 28 8月, 2009 3 次提交