Skip to content
Snippets Groups Projects
  1. Jun 16, 2011
    • Konrad Rzeszutek Wilk's avatar
      [CPUFREQ] powernow-k8: Don't try to transition if the pstate is incorrect · fbb5b89e
      Konrad Rzeszutek Wilk authored
      
      This patch augments the pstate transition code to error out
      (instead of returning 0) when an incorrect pstate is provided.
      
      Suggested-by: default avatarBorislav Petkov <bp@alien8.de>
      CC: andre.przywara@amd.com
      CC: Mark.Langsdorf@amd.com
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      fbb5b89e
    • Konrad Rzeszutek Wilk's avatar
      [CPUFREQ] powernow-k8: Don't notify of successful transition if we failed (vid case). · a9d3d206
      Konrad Rzeszutek Wilk authored
      
      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: default avatarBorislav Petkov <bp@alien8.de>
      CC: andre.przywara@amd.com
      CC: Mark.Langsdorf@amd.com
      Reported-by: default avatarTobias Diedrich <ranma+xen@tdiedrich.de>
      Tested-by: default avatarTobias Diedrich <ranma+xen@tdiedrich.de>
      [v1: Rebased on v3.0-rc2, reduced patch to deal with vid case]
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      a9d3d206
  2. May 19, 2011
  3. May 04, 2011
    • Dominik Brodowski's avatar
      [CPUFREQ] use dynamic debug instead of custom infrastructure · 2d06d8c4
      Dominik Brodowski authored
      
      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: default avatarDominik Brodowski <linux@dominikbrodowski.net>
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      2d06d8c4
  4. Mar 18, 2011
  5. Mar 16, 2011
  6. Mar 01, 2011
  7. Dec 30, 2010
  8. Aug 03, 2010
  9. Jul 26, 2010
  10. Jul 19, 2010
  11. May 25, 2010
  12. May 03, 2010
  13. Apr 09, 2010
  14. Jan 27, 2010
  15. Jan 13, 2010
  16. Dec 16, 2009
  17. Nov 24, 2009
    • Thomas Renninger's avatar
      [ACPI/CPUFREQ] Introduce bios_limit per cpu cpufreq sysfs interface · e2f74f35
      Thomas Renninger authored
      
      This interface is mainly intended (and implemented) for ACPI _PPC BIOS
      frequency limitations, but other cpufreq drivers can also use it for
      similar use-cases.
      
      Why is this needed:
      
      Currently it's not obvious why cpufreq got limited.
      People see cpufreq/scaling_max_freq reduced, but this could have
      happened by:
        - any userspace prog writing to scaling_max_freq
        - thermal limitations
        - hardware (_PPC in ACPI case) limitiations
      
      Therefore export bios_limit (in kHz) to:
        - Point the user that it's the BIOS (broken or intended) which limits
          frequency
        - Export it as a sysfs interface for userspace progs.
          While this was a rarely used feature on laptops, there will appear
          more and more server implemenations providing "Green IT" features like
          allowing the service processor to limit the frequency. People want
          to know about HW/BIOS frequency limitations.
      
      All ACPI P-state driven cpufreq drivers are covered with this patch:
        - powernow-k8
        - powernow-k7
        - acpi-cpufreq
      
      Tested with a patched DSDT which limits the first two cores (_PPC returns 1)
      via _PPC, exposed by bios_limit:
      # echo 2200000 >cpu2/cpufreq/scaling_max_freq
      # cat cpu*/cpufreq/scaling_max_freq
      2600000
      2600000
      2200000
      2200000
      # #scaling_max_freq shows general user/thermal/BIOS limitations
      
      # cat cpu*/cpufreq/bios_limit
      2600000
      2600000
      2800000
      2800000
      # #bios_limit only shows the HW/BIOS limitation
      
      CC: Pallipadi Venkatesh <venkatesh.pallipadi@intel.com>
      CC: Len Brown <lenb@kernel.org>
      CC: davej@codemonkey.org.uk
      CC: linux@dominikbrodowski.net
      
      Signed-off-by: default avatarThomas Renninger <trenn@suse.de>
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      e2f74f35
    • Rusty Russell's avatar
      [CPUFREQ] cpumask: don't put a cpumask on the stack in x86...cpufreq/powernow-k8.c · b8cbe7e8
      Rusty Russell authored
      
      It's still mugging the current process's cpumask, but as comment in
      1ff6e97f says, it's not a trivial fix.
      
      So, at least we can use a cpumask_var_t to do the Wrong Thing the Right Way :)
      
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      To: cpufreq@vger.kernel.org
      Cc: Mark Langsdorf <mark.langsdorf@amd.com>
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      b8cbe7e8
  18. Nov 17, 2009
  19. Sep 16, 2009
  20. Sep 01, 2009
  21. Jul 08, 2009
  22. Jul 06, 2009
  23. Jun 15, 2009
  24. Jun 09, 2009
  25. Jun 05, 2009
  26. May 26, 2009
    • Andreas Herrmann's avatar
      [CPUFREQ] powernow-k8: determine exact CPU frequency for HW Pstates · ca446d06
      Andreas Herrmann authored
      
      Slightly modified by trenn@suse.de -> only do this on fam 10h and fam 11h.
      
      Currently powernow-k8 determines CPU frequency from ACPI PSS objects, but
      according to AMD family 11h BKDG this frequency is just a rounded value:
      
        "CoreFreq (MHz) = The CPU COF specified by MSRC001_00[6B:64][CpuFid]
        rounded to the nearest 100 Mhz."
      
      As a consequnce powernow-k8 reports wrong CPU frequency on some systems,
      e.g. on Turion X2 Ultra:
      
        powernow-k8: Found 1 AMD Turion(tm)X2 Ultra DualCore Mobile ZM-82
                     processors (2 cpu cores) (version 2.20.00)
        powernow-k8:    0 : pstate 0 (2200 MHz)
        powernow-k8:    1 : pstate 1 (1100 MHz)
        powernow-k8:    2 : pstate 2 (600 MHz)
      
      But this is wrong as frequency for Pstate2 is 550 MHz. x86info reports it
      correctly:
      
        #x86info -a |grep Pstate
        ...
        Pstate-0: fid=e, did=0, vid=24 (2200MHz)
        Pstate-1: fid=e, did=1, vid=30 (1100MHz)
        Pstate-2: fid=e, did=2, vid=3c (550MHz) (current)
      
      Solution is to determine the frequency directly from Pstate MSRs instead
      of using rounded values from ACPI table.
      
      Signed-off-by: default avatarAndreas Herrmann <andreas.herrmann3@amd.com>
      Signed-off-by: default avatarThomas Renninger <trenn@suse.de>
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      ca446d06
Loading