1. 17 7月, 2015 2 次提交
  2. 10 7月, 2015 2 次提交
    • V
      cpufreq: Allow freq_table to be obtained for offline CPUs · 5a31d594
      Viresh Kumar 提交于
      Users of freq table may want to access it for any CPU from
      policy->related_cpus mask. One such user is cpu-cooling layer. It gets a
      list of 'clip_cpus' (equivalent to policy->related_cpus) during
      registration and tries to get freq_table for the first CPU of this mask.
      
      If the CPU, for which it tries to fetch freq_table, is offline,
      cpufreq_frequency_get_table() fails. This happens because it relies on
      cpufreq_cpu_get_raw() for its functioning which returns policy only for
      online CPUs.
      
      The fix is to access the policy data structure for the given CPU
      directly (which also returns a valid policy for offline CPUs), but the
      policy itself has to be active (meaning that at least one CPU using it
      is online) for the frequency table to be returned.
      
      Because we will be using 'cpufreq_cpu_data' now, which is internal to
      the cpufreq core, move cpufreq_frequency_get_table() to cpufreq.c.
      Reported-and-tested-by: NPi-Cheng Chen <pi-cheng.chen@linaro.org>
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      5a31d594
    • V
      cpufreq: Initialize the governor again while restoring policy · 35afd02e
      Viresh Kumar 提交于
      When all CPUs of a policy are hot-unplugged, we EXIT the governor but
      don't mark policy->governor as NULL. This was done in order to keep last
      used governor's information intact in sysfs, while the CPUs are offline.
      
      But we also need to clear policy->governor when restoring the policy.
      
      Because policy->governor still points to the last governor while policy
      is restored, following sequence of event happens:
       - cpufreq_init_policy() called while restoring policy
       - find_governor() matches last_governor string for present governors and
         returns last used governor's pointer, say ondemand. policy->governor
         already has the same address, unless the governor was removed in
         between.
       - cpufreq_set_policy() is called with both old/new policies governor set
         as ondemand.
       - Because governors matched, we skip governor initialization and return
         after calling __cpufreq_governor(CPUFREQ_GOV_LIMITS). Because the
         governor wasn't initialized for this policy, it returned -EBUSY.
       - cpufreq_init_policy() exits the policy on this error, but doesn't
         destroy it properly (should be fixed separately).
       - And so we enter a scenario where the policy isn't completely
         initialized but used.
      
      Fix this by setting policy->governor to NULL while restoring the policy.
      Reported-and-tested-by: NPi-Cheng Chen <pi-cheng.chen@linaro.org>
      Reported-and-tested-by: N"Jon Medhurst (Tixy)" <tixy@linaro.org>
      Reported-and-tested-by: NSteven Rostedt <rostedt@goodmis.org>
      Fixes: 18bf3a12 (cpufreq: Mark policy->governor = NULL for inactive policies)
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      35afd02e
  3. 06 7月, 2015 2 次提交
    • L
      Linux 4.2-rc1 · d770e558
      Linus Torvalds 提交于
      d770e558
    • L
      Merge tag 'platform-drivers-x86-v4.2-2' of... · a585d2b7
      Linus Torvalds 提交于
      Merge tag 'platform-drivers-x86-v4.2-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86
      
      Pull late x86 platform driver updates from Darren Hart:
       "The following came in a bit later and I wanted them to bake in next a
        few more days before submitting, thus the second pull.
      
        A new intel_pmc_ipc driver, a symmetrical allocation and free fix in
        dell-laptop, a couple minor fixes, and some updated documentation in
        the dell-laptop comments.
      
        intel_pmc_ipc:
         - Add Intel Apollo Lake PMC IPC driver
      
        tc1100-wmi:
         - Delete an unnecessary check before the function call "kfree"
      
        dell-laptop:
         - Fix allocating & freeing SMI buffer page
         - Show info about WiGig and UWB in debugfs
         - Update information about wireless control"
      
      * tag 'platform-drivers-x86-v4.2-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86:
        intel_pmc_ipc: Add Intel Apollo Lake PMC IPC driver
        tc1100-wmi: Delete an unnecessary check before the function call "kfree"
        dell-laptop: Fix allocating & freeing SMI buffer page
        dell-laptop: Show info about WiGig and UWB in debugfs
        dell-laptop: Update information about wireless control
      a585d2b7
  4. 05 7月, 2015 34 次提交