1. 07 Dec, 2017 20 commits
  2. 05 Dec, 2017 3 commits
    • Stephen Boyd's avatar
      Merge branch 'clk-fixes' into clk-next · 082ea2ef
      Stephen Boyd authored
      * clk-fixes:
        clk: fix a panic error caused by accessing NULL pointer
        clk: Manage proper runtime PM state in clk_change_rate()
      082ea2ef
    • Cai Li's avatar
      clk: fix a panic error caused by accessing NULL pointer · 975b820b
      Cai Li authored
      In some cases the clock parent would be set NULL when doing re-parent,
      it will cause a NULL pointer accessing if clk_set trace event is
      enabled.
      
      This patch sets the parent as "none" if the input parameter is NULL.
      
      Fixes: dfc202ea (clk: Add tracepoints for hardware operations)
      Signed-off-by: default avatarCai Li <cai.li@spreadtrum.com>
      Signed-off-by: default avatarChunyan Zhang <chunyan.zhang@spreadtrum.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      975b820b
    • Marek Szyprowski's avatar
      clk: Manage proper runtime PM state in clk_change_rate() · 588fb54b
      Marek Szyprowski authored
      clk_change_rate() propagates rate change down to all its children. Such
      operation requires managing proper runtime PM state of each child, what
      was missing. Add needed calls to clk_pm_runtime*() to ensure that
      set_rate() clock callback is called on runtime active clock.
      
      This fixes following issue found on Exynos5433 TM2 board with devfreq
      enabled:
      
      Synchronous External Abort: synchronous external abort (0x96000210) at 0xffffff80093f5600
      Internal error: : 96000210 [#1] PREEMPT SMP
      Modules linked in:
      CPU: 0 PID: 5 Comm: kworker/u16:0 Not tainted 4.15.0-rc1-next-20171129+ #4
      Hardware name: Samsung TM2 board (DT)
      Workqueue: devfreq_wq devfreq_monitor
      task: ffffffc0ca96b600 task.stack: ffffff80093a8000
      pstate: a0000085 (NzCv daIf -PAN -UAO)
      pc : clk_divider_set_rate+0x54/0x118
      lr : clk_divider_set_rate+0x44/0x118
      ...
      Process kworker/u16:0 (pid: 5, stack limit = 0xffffff80093a8000)
      Call trace:
       clk_divider_set_rate+0x54/0x118
       clk_change_rate+0xfc/0x4e0
       clk_change_rate+0x1f0/0x4e0
       clk_change_rate+0x1f0/0x4e0
       clk_change_rate+0x1f0/0x4e0
       clk_core_set_rate_nolock+0x138/0x148
       clk_set_rate+0x28/0x50
       exynos_bus_passive_target+0x6c/0x11c
       update_devfreq_passive+0x58/0xb4
       devfreq_passive_notifier_call+0x50/0x5c
       notifier_call_chain+0x4c/0x88
       __srcu_notifier_call_chain+0x54/0x80
       srcu_notifier_call_chain+0x14/0x1c
       update_devfreq+0x100/0x1b4
       devfreq_monitor+0x2c/0x88
       process_one_work+0x148/0x3d8
       worker_thread+0x13c/0x3f8
       kthread+0x100/0x12c
       ret_from_fork+0x10/0x18
      Reported-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      Fixes: 9a34b453 ("clk: Add support for runtime PM")
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Tested-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      Reviewed-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      588fb54b
  3. 01 Dec, 2017 17 commits