1. 06 8月, 2016 1 次提交
    • A
      cpufreq: powernv: Fix crash in gpstate_timer_handler() · 8e859467
      Akshay Adiga 提交于
      Commit 09ca4c9b (cpufreq: powernv: Replacing pstate_id with
      frequency table index) changes calc_global_pstate() to use
      cpufreq_table index instead of pstate_id.
      
      But in gpstate_timer_handler(), pstate_id was being passed instead
      of cpufreq_table index, which caused index_to_pstate() to access
      out of bound indices, leading to this crash.
      
      Adding sanity check for index and pstate, to ensure only valid pstate
      and index values are returned.
      
      Call Trace:
      [c00000078d66b130] [c00000000011d224] __free_irq+0x234/0x360
      (unreliable)
      [c00000078d66b1c0] [c00000000011d44c] free_irq+0x6c/0xa0
      [c00000078d66b1f0] [c00000000006c4f8] opal_event_shutdown+0x88/0xd0
      [c00000078d66b230] [c000000000067a4c] opal_shutdown+0x1c/0x90
      [c00000078d66b260] [c000000000063a00] pnv_shutdown+0x20/0x40
      [c00000078d66b280] [c000000000021538] machine_restart+0x38/0x90
      [c0000000078d66b310] [c000000000965ea0] panic+0x284/0x300
      [c00000078d66b3a0] [c00000000001f508] die+0x388/0x450
      [c00000078d66b430] [c000000000045a50] bad_page_fault+0xd0/0x140
      [c00000078d66b4a0] [c000000000008964] handle_page_fault+0x2c/0x30
         interrupt: 300 at gpstate_timer_handler+0x150/0x260
          LR = gpstate_timer_handler+0x130/0x260
      [c00000078d66b7f0] [c000000000132b58] call_timer_fn+0x58/0x1c0
      [c00000078d66b880] [c000000000132e20] expire_timers+0x130/0x1d0
      [c00000078d66b8f0] [c000000000133068] run_timer_softirq+0x1a8/0x230
      [c00000078d66b980] [c0000000000b535c] __do_softirq+0x18c/0x400
      [c00000078d66ba70] [c0000000000b5828] irq_exit+0xc8/0x100
      [c00000078d66ba90] [c00000000001e214] timer_interrupt+0xa4/0xe0
      [c00000078d66bac0] [c0000000000027d0] decrementer_common+0x150/0x180
         interrupt: 901 at arch_local_irq_restore+0x74/0x90
        0] [c000000000106b34] call_cpuidle+0x44/0x90
      [c00000078d66be50] [c00000000010708c] cpu_startup_entry+0x38c/0x460
      [c00000078d66bf20] [c00000000003d930] start_secondary+0x330/0x380
      [c00000078d66bf90] [c000000000008e6c] start_secondary_prolog+0x10/0x14
      
      Fixes: 09ca4c9b (cpufreq: powernv: Replacing pstate_id with frequency table index)
      Reported-by: NMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Signed-off-by: NAkshay Adiga <akshay.adiga@linux.vnet.ibm.com>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Tested-by: NAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8e859467
  2. 03 8月, 2016 1 次提交
  3. 29 7月, 2016 1 次提交
  4. 23 7月, 2016 1 次提交
    • A
      Revert "cpufreq: pcc-cpufreq: update default value of cpuinfo_transition_latency" · da7d3abe
      Andreas Herrmann 提交于
      This reverts commit 790d849b.
      
      Using a v4.7-rc7 kernel on a HP ProLiant triggered following messages
      
       pcc-cpufreq: (v1.10.00) driver loaded with frequency limits: 1200 MHz, 2800 MHz
       cpufreq: ondemand governor failed, too long transition latency of HW, fallback to performance governor
      
      The last line was shown for each CPU in the system.
      Testing v4.5 (where commit 790d849b was integrated) triggered
      similar messages. Same behaviour on a 2nd HP Proliant system.
      
      So commit 790d849b (cpufreq: pcc-cpufreq: update default value of
      cpuinfo_transition_latency) causes the system to use performance
      governor which, I guess, was not the intention of the patch.
      
      Enabling debug output in pcc-cpufreq provides following verbose output:
      
       pcc-cpufreq: (v1.10.00) driver loaded with frequency limits: 1200 MHz, 2800 MHz
       pcc_get_offset: for CPU 0: pcc_cpu_data input_offset: 0x44, pcc_cpu_data output_offset: 0x48
       init: policy->max is 2800000, policy->min is 1200000
       get: get_freq for CPU 0
       get: SUCCESS: (virtual) output_offset for cpu 0 is 0xffffc9000d7c0048, contains a value of: 0xff06. Speed is: 168000 MHz
       cpufreq: ondemand governor failed, too long transition latency of HW, fallback to performance governor
       target: CPU 0 should go to target freq: 2800000 (virtual) input_offset is 0xffffc9000d7c0044
       target: was SUCCESSFUL for cpu 0
      
      I am asking to revert 790d849b to re-enable usage of ondemand
      governor with pcc-cpufreq.
      
      Fixes: 790d849b (cpufreq: pcc-cpufreq: update default value of cpuinfo_transition_latency)
      CC: <stable@vger.kernel.org> # 4.5+
      Signed-off-by: NAndreas Herrmann <aherrmann@suse.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      da7d3abe
  5. 22 7月, 2016 3 次提交
  6. 21 7月, 2016 4 次提交
  7. 12 7月, 2016 1 次提交
  8. 11 7月, 2016 1 次提交
  9. 07 7月, 2016 4 次提交
  10. 04 7月, 2016 1 次提交
  11. 28 6月, 2016 6 次提交
  12. 24 6月, 2016 1 次提交
  13. 22 6月, 2016 1 次提交
  14. 15 6月, 2016 1 次提交
  15. 14 6月, 2016 3 次提交
  16. 10 6月, 2016 1 次提交
  17. 09 6月, 2016 7 次提交
  18. 08 6月, 2016 2 次提交
    • D
      x86/cpufreq: Use Intel family name macros for the intel_pstate cpufreq driver · 5b20c944
      Dave Hansen 提交于
      Another straightforward replacement of magic numbers.
      Signed-off-by: NDave Hansen <dave.hansen@linux.intel.com>
      Acked-by: NRafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Dave Hansen <dave@sr71.net>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: jacob.jun.pan@intel.com
      Cc: linux-pm@vger.kernel.org
      Link: http://lkml.kernel.org/r/20160603001945.0F5D02AA@viggo.jf.intel.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      5b20c944
    • S
      cpufreq: intel_pstate: Fix ->set_policy() interface for no_turbo · 983e600e
      Srinivas Pandruvada 提交于
      When turbo is disabled, the ->set_policy() interface is broken.
      
      For example, when turbo is disabled and cpuinfo.max = 2900000 (full
      max turbo frequency), setting the limits results in frequency less
      than the requested one:
      Set 1000000 KHz results in 0700000 KHz
      Set 1500000 KHz results in 1100000 KHz
      Set 2000000 KHz results in  1500000 KHz
      
      This is because the limits->max_perf fraction is calculated using
      the max turbo frequency as the reference, but when the max P-State is
      capped in intel_pstate_get_min_max(), the reference is not the max
      turbo P-State. This results in reducing max P-State.
      
      One option is to always use max turbo as reference for calculating
      limits. But this will not be correct. By definition the intel_pstate
      sysfs limits, shows percentage of available performance. So when
      BIOS has disabled turbo, the available performance is max non turbo.
      So the max_perf_pct should still show 100%.
      Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      [ rjw : Subject & changelog, rewrite in fewer lines of code ]
      Cc: All applicable <stable@vger.kernel.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      983e600e