1. 28 Aug, 2013 2 commits
    • Stratos Karafotis's avatar
      cpufreq: governors: Remove duplicate check of target freq in supported range · 934dac1e
      Stratos Karafotis authored
      Function __cpufreq_driver_target() checks if target_freq is within
      policy->min and policy->max range. generic_powersave_bias_target() also
      checks if target_freq is valid via a cpufreq_frequency_table_target()
      call. So, drop the unnecessary duplicate check in *_check_cpu().
      Signed-off-by: default avatarStratos Karafotis <stratosk@semaphore.gr>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      934dac1e
    • Stephen Boyd's avatar
      cpufreq: Fix timer/workqueue corruption due to double queueing · 3617f2ca
      Stephen Boyd authored
      When a CPU is hot removed we'll cancel all the delayed work items
      via gov_cancel_work(). Normally this will just cancels a delayed
      timer on each CPU that the policy is managing and the work won't
      run, but if the work is already running the workqueue code will
      wait for the work to finish before continuing to prevent the
      work items from re-queuing themselves like they normally do. This
      scheme will work most of the time, except for the case where the
      work function determines that it should adjust the delay for all
      other CPUs that the policy is managing. If this scenario occurs,
      the canceling CPU will cancel its own work but queue up the other
      CPUs works to run. For example:
      
       CPU0                                        CPU1
       ----                                        ----
       cpu_down()
        ...
        __cpufreq_remove_dev()
         cpufreq_governor_dbs()
          case CPUFREQ_GOV_STOP:
           gov_cancel_work(dbs_data, policy);
            cpu0 work is canceled
             timer is canceled
             cpu1 work is canceled                    <work runs>
             <waits for cpu1>                         od_dbs_timer()
                                                       gov_queue_work(*, *, true);
       						  cpu0 work queued
       						  cpu1 work queued
      						  cpu2 work queued
      						  ...
             cpu1 work is canceled
             cpu2 work is canceled
             ...
      
      At the end of the GOV_STOP case cpu0 still has a work queued to
      run although the code is expecting all of the works to be
      canceled. __cpufreq_remove_dev() will then proceed to
      re-initialize all the other CPUs works except for the CPU that is
      going down. The CPUFREQ_GOV_START case in cpufreq_governor_dbs()
      will trample over the queued work and debugobjects will spit out
      a warning:
      
      WARNING: at lib/debugobjects.c:260 debug_print_object+0x94/0xbc()
      ODEBUG: init active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x10
      Modules linked in:
      CPU: 0 PID: 1491 Comm: sh Tainted: G        W    3.10.0 #19
      [<c010c178>] (unwind_backtrace+0x0/0x11c) from [<c0109dec>] (show_stack+0x10/0x14)
      [<c0109dec>] (show_stack+0x10/0x14) from [<c01904cc>] (warn_slowpath_common+0x4c/0x6c)
      [<c01904cc>] (warn_slowpath_common+0x4c/0x6c) from [<c019056c>] (warn_slowpath_fmt+0x2c/0x3c)
      [<c019056c>] (warn_slowpath_fmt+0x2c/0x3c) from [<c0388a7c>] (debug_print_object+0x94/0xbc)
      [<c0388a7c>] (debug_print_object+0x94/0xbc) from [<c0388e34>] (__debug_object_init+0x2d0/0x340)
      [<c0388e34>] (__debug_object_init+0x2d0/0x340) from [<c019e3b0>] (init_timer_key+0x14/0xb0)
      [<c019e3b0>] (init_timer_key+0x14/0xb0) from [<c0635f78>] (cpufreq_governor_dbs+0x3e8/0x5f8)
      [<c0635f78>] (cpufreq_governor_dbs+0x3e8/0x5f8) from [<c06325a0>] (__cpufreq_governor+0xdc/0x1a4)
      [<c06325a0>] (__cpufreq_governor+0xdc/0x1a4) from [<c0633704>] (__cpufreq_remove_dev.isra.10+0x3b4/0x434)
      [<c0633704>] (__cpufreq_remove_dev.isra.10+0x3b4/0x434) from [<c08989f4>] (cpufreq_cpu_callback+0x60/0x80)
      [<c08989f4>] (cpufreq_cpu_callback+0x60/0x80) from [<c08a43c0>] (notifier_call_chain+0x38/0x68)
      [<c08a43c0>] (notifier_call_chain+0x38/0x68) from [<c01938e0>] (__cpu_notify+0x28/0x40)
      [<c01938e0>] (__cpu_notify+0x28/0x40) from [<c0892ad4>] (_cpu_down+0x7c/0x2c0)
      [<c0892ad4>] (_cpu_down+0x7c/0x2c0) from [<c0892d3c>] (cpu_down+0x24/0x40)
      [<c0892d3c>] (cpu_down+0x24/0x40) from [<c0893ea8>] (store_online+0x2c/0x74)
      [<c0893ea8>] (store_online+0x2c/0x74) from [<c04519d8>] (dev_attr_store+0x18/0x24)
      [<c04519d8>] (dev_attr_store+0x18/0x24) from [<c02a69d4>] (sysfs_write_file+0x100/0x148)
      [<c02a69d4>] (sysfs_write_file+0x100/0x148) from [<c0255c18>] (vfs_write+0xcc/0x174)
      [<c0255c18>] (vfs_write+0xcc/0x174) from [<c0255f70>] (SyS_write+0x38/0x64)
      [<c0255f70>] (SyS_write+0x38/0x64) from [<c0106120>] (ret_fast_syscall+0x0/0x30)
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3617f2ca
  2. 27 Aug, 2013 1 commit
  3. 26 Aug, 2013 1 commit
    • Sascha Hauer's avatar
      cpufreq: imx6q: Fix clock enable balance · fae19b84
      Sascha Hauer authored
      For changing the cpu frequency the i.MX6q has to be switched to some
      intermediate clock during the PLL reprogramming. The driver tries
      to be clever to keep the enable count correct but gets it wrong. If
      the cpufreq is increased it calls clk_disable_unprepare twice
      on pll2_pfd2_396m. This puts all other devices which get their clock
      from pll2_pfd2_396m into a nonworking state.
      
      Fix this by removing the clk enabling/disabling altogether since the
      clk core will do this automatically during a reparent.
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      fae19b84
  4. 23 Aug, 2013 1 commit
  5. 22 Aug, 2013 2 commits
    • Rafael J. Wysocki's avatar
      Merge branch 'cpu_of_node' of git://linux-arm.org/linux-skn into pm-cpufreq-next · 09198f8f
      Rafael J. Wysocki authored
      Pull DT/core/cpufreq cpu_ofnode updates for v3.12 from Sudeep KarkadaNagesha.
      
      * 'cpu_of_node' of git://linux-arm.org/linux-skn:
        cpufreq: pmac32-cpufreq: remove device tree parsing for cpu nodes
        cpufreq: pmac64-cpufreq: remove device tree parsing for cpu nodes
        cpufreq: maple-cpufreq: remove device tree parsing for cpu nodes
        cpufreq: arm_big_little: remove device tree parsing for cpu nodes
        cpufreq: kirkwood-cpufreq: remove device tree parsing for cpu nodes
        cpufreq: spear-cpufreq: remove device tree parsing for cpu nodes
        cpufreq: highbank-cpufreq: remove device tree parsing for cpu nodes
        cpufreq: cpufreq-cpu0: remove device tree parsing for cpu nodes
        cpufreq: imx6q-cpufreq: remove device tree parsing for cpu nodes
        drivers/bus: arm-cci: avoid parsing DT for cpu device nodes
        ARM: mvebu: remove device tree parsing for cpu nodes
        ARM: topology: remove hwid/MPIDR dependency from cpu_capacity
        of/device: add helper to get cpu device node from logical cpu index
        driver/core: cpu: initialize of_node in cpu's device struture
        ARM: DT/kernel: define ARM specific arch_match_cpu_phys_id
        of: move of_get_cpu_node implementation to DT core library
        powerpc: refactor of_get_cpu_node to support other architectures
        openrisc: remove undefined of_get_cpu_node declaration
        microblaze: remove undefined of_get_cpu_node declaration
      09198f8f
    • Rafael J. Wysocki's avatar
      4eb5178c
  6. 21 Aug, 2013 20 commits
  7. 20 Aug, 2013 5 commits
  8. 18 Aug, 2013 3 commits
  9. 17 Aug, 2013 4 commits
  10. 16 Aug, 2013 1 commit
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm · 2620bf06
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "The usual collection of random fixes.  Also some further fixes to the
        last set of security fixes, and some more from Will (which you may
        already have in a slightly different form)"
      
      * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: 7807/1: kexec: validate CPU hotplug support
        ARM: 7812/1: rwlocks: retry trylock operation if strex fails on free lock
        ARM: 7811/1: locks: use early clobber in arch_spin_trylock
        ARM: 7810/1: perf: Fix array out of bounds access in armpmu_map_hw_event()
        ARM: 7809/1: perf: fix event validation for software group leaders
        ARM: Fix FIQ code on VIVT CPUs
        ARM: Fix !kuser helpers case
        ARM: Fix the world famous typo with is_gate_vma()
      2620bf06