1. 09 Feb, 2017 1 commit
  2. 30 Jan, 2017 3 commits
  3. 27 Jan, 2017 2 commits
  4. 06 Dec, 2016 4 commits
  5. 30 Nov, 2016 1 commit
    • Stephen Boyd's avatar
      PM / OPP: Pass opp_table to dev_pm_opp_put_regulator() · 91291d9a
      Stephen Boyd authored
      Joonyoung Shim reported an interesting problem on his ARM octa-core
      Odoroid-XU3 platform. During system suspend, dev_pm_opp_put_regulator()
      was failing for a struct device for which dev_pm_opp_set_regulator() is
      called earlier.
      This happened because an earlier call to
      dev_pm_opp_of_cpumask_remove_table() function (from cpufreq-dt.c file)
      removed all the entries from opp_table->dev_list apart from the last CPU
      device in the cpumask of CPUs sharing the OPP.
      But both dev_pm_opp_set_regulator() and dev_pm_opp_put_regulator()
      routines get CPU device for the first CPU in the cpumask. And so the OPP
      core failed to find the OPP table for the struct device.
      This patch attempts to fix this problem by returning a pointer to the
      opp_table from dev_pm_opp_set_regulator() and using that as the
      parameter to dev_pm_opp_put_regulator(). This ensures that the
      dev_pm_opp_put_regulator() doesn't fail to find the opp table.
      Note that similar design problem also exists with other
      dev_pm_opp_put_*() APIs, but those aren't used currently by anyone and
      so we don't need to update them for now.
      Cc: 4.4+ <stable@vger.kernel.org> # 4.4+
      Reported-by: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      [ Viresh: Wrote commit log and tested on exynos 5250 ]
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
  6. 04 May, 2016 2 commits
    • Sudeep Holla's avatar
      PM / OPP: add non-OF versions of dev_pm_opp_{cpumask_, }remove_table · 411466c5
      Sudeep Holla authored
      Functions dev_pm_opp_of_{cpumask_,}remove_table removes/frees all the
      static OPP entries associated with the device and/or all cpus(in case
      of cpumask) that are created from DT.
      However the OPP entries are populated reading from the firmware or some
      different method using dev_pm_opp_add are marked dynamic and can't be
      removed using above functions.
      This patch adds non DT/OF versions of dev_pm_opp_{cpumask_,}remove_table
      to support the above mentioned usecase.
      This is in preparation to make use of the same in scpi-cpufreq.c
      Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Reviewed-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    • Arnd Bergmann's avatar
      PM / OPP: pass cpumask by reference · ddbb74bc
      Arnd Bergmann authored
      The new use of dev_pm_opp_set_sharing_cpus resulted in a harmless compiler
      warning with CONFIG_CPUMASK_OFFSTACK=y:
      drivers/cpufreq/mvebu-cpufreq.c: In function 'armada_xp_pmsu_cpufreq_init':
      include/linux/cpumask.h:550:25: error: passing argument 2 of 'dev_pm_opp_set_sharing_cpus' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
      The problem here is that cpumask_var_t gets passed by reference, but
      by declaring a 'const cpumask_var_t' argument, only the pointer is
      constant, not the actual mask. This is harmless because the function
      does not actually modify the mask.
      This patch changes the function prototypes for all of the related functions
      to pass a 'struct cpumask *' instead of 'cpumask_var_t', matching what
      most other such functions do in the kernel. This lets us mark all the
      other similar functions as taking a 'const' mask where possible,
      and it avoids the warning without any change in object code.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: 947bd567 (mvebu: Use dev_pm_opp_set_sharing_cpus() to mark OPP tables as shared)
      Acked-by: Pavel Machek's avatarPavel Machek <pavel@ucw.cz>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Reviewed-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
  7. 28 Apr, 2016 3 commits
  8. 25 Apr, 2016 1 commit
  9. 10 Feb, 2016 4 commits
  10. 10 Dec, 2015 2 commits
  11. 15 Sep, 2015 2 commits
  12. 09 Sep, 2015 1 commit
  13. 07 Aug, 2015 3 commits
  14. 29 Nov, 2014 1 commit
    • Viresh Kumar's avatar
      PM / OPP Introduce APIs to remove OPPs · 129eec55
      Viresh Kumar authored
      OPPs are created statically (from DT) or dynamically. Currently we don't free
      OPPs that are created statically, when the module unloads. And so if the module
      is inserted back again, we get warning for duplicate OPPs as the same were
      already present.
      Also, there might be a need to remove dynamic OPPs in future and so API for that
      is also added.
      This patch adds helper APIs to remove/free existing static and dynamic OPPs.
      Because the OPPs are used both under RCU and SRCU, we have to wait for grace
      period of both. And so are using kfree_rcu() from within call_srcu().
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
  15. 06 May, 2014 1 commit
  16. 25 Oct, 2013 3 commits
  17. 22 Feb, 2013 1 commit
  18. 09 Sep, 2012 1 commit
  19. 16 Mar, 2012 1 commit
    • Paul Gortmaker's avatar
      device.h: audit and cleanup users in main include dir · 313162d0
      Paul Gortmaker authored
      The <linux/device.h> header includes a lot of stuff, and
      it in turn gets a lot of use just for the basic "struct device"
      which appears so often.
      Clean up the users as follows:
      1) For those headers only needing "struct device" as a pointer
      in fcn args, replace the include with exactly that.
      2) For headers not really using anything from device.h, simply
      delete the include altogether.
      3) For headers relying on getting device.h implicitly before
      being included themselves, now explicitly include device.h
      4) For files in which doing #1 or #2 uncovers an implicit
      dependency on some other header, fix by explicitly adding
      the required header(s).
      Any C files that were implicitly relying on device.h to be
      present have already been dealt with in advance.
      Total removals from #1 and #2: 51.  Total additions coming
      from #3: 9.  Total other implicit dependencies from #4: 7.
      As of 3.3-rc1, there were 110, so a net removal of 42 gives
      about a 38% reduction in device.h presence in include/*
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
  20. 04 Nov, 2011 1 commit
  21. 30 Sep, 2011 1 commit
  22. 15 Jul, 2011 1 commit