1. 02 4月, 2013 2 次提交
  2. 02 2月, 2013 2 次提交
  3. 21 11月, 2012 2 次提交
  4. 01 11月, 2012 1 次提交
  5. 23 10月, 2012 1 次提交
    • A
      cpufreq / powernow-k8: Remove usage of smp_processor_id() in preemptible code · e4df1cbc
      Andreas Herrmann 提交于
      Commit 6889125b
      (cpufreq/powernow-k8: workqueue user shouldn't migrate the kworker to another CPU)
      causes powernow-k8 to trigger a preempt warning, e.g.:
      
        BUG: using smp_processor_id() in preemptible [00000000] code: cpufreq/3776
        caller is powernowk8_target+0x20/0x49
        Pid: 3776, comm: cpufreq Not tainted 3.6.0 #9
        Call Trace:
         [<ffffffff8125b447>] debug_smp_processor_id+0xc7/0xe0
         [<ffffffff814877e7>] powernowk8_target+0x20/0x49
         [<ffffffff81482b02>] __cpufreq_driver_target+0x82/0x8a
         [<ffffffff81484fc6>] cpufreq_governor_performance+0x4e/0x54
         [<ffffffff81482c50>] __cpufreq_governor+0x8c/0xc9
         [<ffffffff81482e6f>] __cpufreq_set_policy+0x1a9/0x21e
         [<ffffffff814839af>] store_scaling_governor+0x16f/0x19b
         [<ffffffff81484f16>] ? cpufreq_update_policy+0x124/0x124
         [<ffffffff8162b4a5>] ? _raw_spin_unlock_irqrestore+0x2c/0x49
         [<ffffffff81483640>] store+0x60/0x88
         [<ffffffff811708c0>] sysfs_write_file+0xf4/0x130
         [<ffffffff8111243b>] vfs_write+0xb5/0x151
         [<ffffffff811126e0>] sys_write+0x4a/0x71
         [<ffffffff816319a9>] system_call_fastpath+0x16/0x1b
      
      Fix this by by always using work_on_cpu().
      Signed-off-by: NAndreas Herrmann <andreas.herrmann3@amd.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e4df1cbc
  6. 20 9月, 2012 1 次提交
    • T
      cpufreq/powernow-k8: workqueue user shouldn't migrate the kworker to another CPU · 6889125b
      Tejun Heo 提交于
      powernowk8_target() runs off a per-cpu work item and if the
      cpufreq_policy->cpu is different from the current one, it migrates the
      kworker to the target CPU by manipulating current->cpus_allowed.  The
      function migrates the kworker back to the original CPU but this is
      still broken.  Workqueue concurrency management requires the kworkers
      to stay on the same CPU and powernowk8_target() ends up triggerring
      BUG_ON(rq != this_rq()) in try_to_wake_up_local() if it contends on
      fidvid_mutex and sleeps.
      
      It is unclear why this bug is being reported now.  Duncan says it
      appeared to be a regression of 3.6-rc1 and couldn't reproduce it on
      3.5.  Bisection seemed to point to 63d95a91 "workqueue: use @pool
      instead of @gcwq or @cpu where applicable" which is an non-functional
      change.  Given that the reproduce case sometimes took upto days to
      trigger, it's easy to be misled while bisecting.  Maybe something made
      contention on fidvid_mutex more likely?  I don't know.
      
      This patch fixes the bug by using work_on_cpu() instead if @pol->cpu
      isn't the same as the current one.  The code assumes that
      cpufreq_policy->cpu is kept online by the caller, which Rafael tells
      me is the case.
      
      stable: ed48ece2 ("workqueue: reimplement work_on_cpu() using
              system_wq") should be applied before this; otherwise, the
              behavior could be horrible.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NDuncan <1i5t5.duncan@cox.net>
      Tested-by: NDuncan <1i5t5.duncan@cox.net>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
      Cc: stable@vger.kernel.org
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=47301
      6889125b
  7. 10 9月, 2012 3 次提交
  8. 05 9月, 2012 1 次提交
  9. 27 1月, 2012 1 次提交
    • A
      cpufreq: Add support for x86 cpuinfo auto loading v4 · fa8031ae
      Andi Kleen 提交于
      This marks all the x86 cpuinfo tables to the CPU specific device drivers,
      to allow auto loading by udev. This should simplify the distribution
      startup scripts for this greatly.
      
      I didn't add MODULE_DEVICE_IDs to the centrino and p4-clockmod drivers,
      because those probably shouldn't be auto loaded and the acpi driver
      be used instead (not fully sure on that, would appreciate feedback)
      
      The old nforce drivers autoload based on the PCI ID.
      
      ACPI cpufreq is autoloaded in another patch.
      
      v3: Autoload gx based on PCI IDs only. Remove cpu check (Dave Jones)
      v4: Use newly introduce HW_PSTATE feature for powernow-k8 loading
      
      Cc: Dave Jones <davej@redhat.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      Acked-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fa8031ae
  10. 06 1月, 2012 3 次提交
  11. 17 6月, 2011 2 次提交
    • K
      [CPUFREQ] powernow-k8: Don't try to transition if the pstate is incorrect · fbb5b89e
      Konrad Rzeszutek Wilk 提交于
      This patch augments the pstate transition code to error out
      (instead of returning 0) when an incorrect pstate is provided.
      Suggested-by: NBorislav Petkov <bp@alien8.de>
      CC: andre.przywara@amd.com
      CC: Mark.Langsdorf@amd.com
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NDave Jones <davej@redhat.com>
      fbb5b89e
    • K
      [CPUFREQ] powernow-k8: Don't notify of successful transition if we failed (vid case). · a9d3d206
      Konrad Rzeszutek Wilk 提交于
      Before this patch if we failed the vid transition would still try to
      submit the "new" frequencies to cpufreq.
      That is incorrect - also we could submit a non-existing frequency value
      which would cause cpufreq to crash. The ultimate fix is in cpufreq
      to deal with incorrect values, but this patch improves the error
      recovery in the AMD powernowk8 driver.
      
      The failure that was reported was as follows:
      
      powernow-k8: Found 1 AMD Athlon(tm) 64 Processor 3700+ (1 cpu cores) (version 2.20.00)
      powernow-k8: fid 0x2 (1000 MHz), vid 0x12
      powernow-k8: fid 0xa (1800 MHz), vid 0xa
      powernow-k8: fid 0xc (2000 MHz), vid 0x8
      powernow-k8: fid 0xe (2200 MHz), vid 0x8
      Marking TSC unstable due to cpufreq changes
      powernow-k8: fid trans failed, fid 0x2, curr 0x0
      BUG: unable to handle kernel paging request at ffff880807e07b78
      IP: [<ffffffff81479163>] cpufreq_stats_update+0x46/0x5b
      ...
      
      And transition fails and data->currfid ends up with 0. Since
      the machine does not support 800Mhz value when the calculation is
      done ('find_khz_freq_from_fid(data->currfid);') it reports the
      new frequency as 800000 which is bogus. This patch fixes
      the issue during target setting.
      
      The patch however does not fix the issue in 'powernowk8_cpu_init'
      where the pol->cur can also be set with the 800000 value:
      
                pol->cur = find_khz_freq_from_fid(data->currfid);
        dprintk("policy current frequency %d kHz\n", pol->cur);
      
        /* min/max the cpu is capable of */
        if (cpufreq_frequency_table_cpuinfo(pol, data->powernow_table)) {
      
      The fix for that looks to update cpufreq_frequency_table_cpuinfo to
      check pol->cur.... but that would cause an regression in how the
      acpi-cpufreq driver works (it sets cpu->cur after calling
      cpufreq_frequency_table_cpuinfo). Instead the fix will be to let
      cpufreq gracefully handle bogus data (another patch).
      Acked-by: NBorislav Petkov <bp@alien8.de>
      CC: andre.przywara@amd.com
      CC: Mark.Langsdorf@amd.com
      Reported-by: NTobias Diedrich <ranma+xen@tdiedrich.de>
      Tested-by: NTobias Diedrich <ranma+xen@tdiedrich.de>
      [v1: Rebased on v3.0-rc2, reduced patch to deal with vid case]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NDave Jones <davej@redhat.com>
      a9d3d206
  12. 20 5月, 2011 1 次提交
  13. 04 5月, 2011 1 次提交
    • D
      [CPUFREQ] use dynamic debug instead of custom infrastructure · 2d06d8c4
      Dominik Brodowski 提交于
      With dynamic debug having gained the capability to report debug messages
      also during the boot process, it offers a far superior interface for
      debug messages than the custom cpufreq infrastructure. As a first step,
      remove the old cpufreq_debug_printk() function and replace it with a call
      to the generic pr_debug() function.
      
      How can dynamic debug be used on cpufreq? You need a kernel which has
      CONFIG_DYNAMIC_DEBUG enabled.
      
      To enabled debugging during runtime, mount debugfs and
      
      $ echo -n 'module cpufreq +p' > /sys/kernel/debug/dynamic_debug/control
      
      for debugging the complete "cpufreq" module. To achieve the same goal during
      boot, append
      
      	ddebug_query="module cpufreq +p"
      
      as a boot parameter to the kernel of your choice.
      
      For more detailled instructions, please see
      Documentation/dynamic-debug-howto.txt
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      Signed-off-by: NDave Jones <davej@redhat.com>
      2d06d8c4
  14. 18 3月, 2011 1 次提交
  15. 17 3月, 2011 1 次提交
  16. 02 3月, 2011 2 次提交
  17. 30 12月, 2010 2 次提交
  18. 04 8月, 2010 3 次提交
    • B
      [CPUFREQ] powernow-k8: Fix misleading variable naming · b30d3304
      Borislav Petkov 提交于
      rdmsr() takes the lower 32 bits as a second argument and the high 32 as
      a third. Fix the names accordingly since they were swapped.
      
      There should be no functionality change resulting from this patch.
      Signed-off-by: NBorislav Petkov <borislav.petkov@amd.com>
      Signed-off-by: NDave Jones <davej@redhat.com>
      b30d3304
    • M
      [CPUFREQ] powernow-k8: On load failure, remind the user to enable support in BIOS setup · 298decfb
      Marti Raudsepp 提交于
      On Wed, 2010-01-20 at 16:56 +0100, Thomas Renninger wrote:
      > But most often this happens if people upgrade their CPU and do not
      > update their BIOS.
      > Or the vendor does not recognise the new CPU even if the BIOS got
      > updated.
      
      Maybe some of those people just didn't realize it was disabled in BIOS?
      If you tell users that it's a firmware bug then they'll probably just
      give up.
      
      > The itself message might be an enhancment, IMO it's not worth a patch.
      
      Why do you think so? I spent an hour on hunting down the BIOS upgrade,
      only to find that it didn't improve anything. It was a day later that I
      realized that it might be a BIOS option; and the option was literally
      the _last_ option in the whole BIOS setup. :)
      
      This message would have saved the day.
      
      > But do not revert the FW_BUG part!
      
      Sure, you have a point here.
      
      How about this patch?
      298decfb
    • B
      [CPUFREQ] powernow-k8: Limit Pstate transition latency check · c2f4a2c6
      Borislav Petkov 提交于
      The Pstate transition latency check was added for broken F10h BIOSen
      which wrongly contain a value of 0 for transition and bus master
      latency. Fam11h and later, however, (will) have similar transition
      latency so extend that behavior for them too.
      Signed-off-by: NBorislav Petkov <borislav.petkov@amd.com>
      Signed-off-by: NDave Jones <davej@redhat.com>
      c2f4a2c6
  19. 27 7月, 2010 1 次提交
  20. 19 7月, 2010 1 次提交
  21. 26 5月, 2010 1 次提交
  22. 03 5月, 2010 1 次提交
  23. 10 4月, 2010 3 次提交
  24. 28 1月, 2010 1 次提交
  25. 13 1月, 2010 1 次提交
  26. 17 12月, 2009 1 次提交
    • R
      cpumask: rename tsk_cpumask to tsk_cpus_allowed · a4636818
      Rusty Russell 提交于
      Noone uses this wrapper yet, and Ingo asked that it be kept consistent
      with current task_struct usage.
      
      (One user crept in via linux-next: fixed)
      
      Signed-off-by: Rusty Russell <rusty@rustcorp.com.au.
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Tejun Heo <tj@kernel.org>
      a4636818