Hi Guys,
This patchset add APIs in OPP layer to allow OPPs transitioning from
within OPP layer. Currently all OPP users need to replicate the same
code to switch between OPPs. While the same can be handled easily by
OPP-core.
The first 7 patches update the OPP core to introduce the new APIs and
the next Nine patches update cpufreq-dt for the same.
11 out of 17 are already Reviewed by Stephen, only few are left :)
I hope this is the last version of the series :)
Testing:
- Tested on exynos 5250-arndale (dual-cortex-A15)
- Tested for both Old-V1 bindings and New V2 bindings
- Tested with regulator names as: 'cpu-supply' and 'cpu0-supply'
- Tested with Unsupported supply ranges as well, to check the
opp-disable logic
V2->V3:
- Very minor updates.
- find_supply_name() doesn't return an error value now, and so its
callers don't check for it.
- And so we don't need to initialize name to NULL
Viresh Kumar (16):
PM / OPP: get/put regulators from OPP core
PM / OPP: Disable OPPs that aren't supported by the regulator
PM / OPP: Introduce dev_pm_opp_get_max_volt_latency()
PM / OPP: Introduce dev_pm_opp_get_max_transition_latency()
PM / OPP: Parse clock-latency and voltage-tolerance for v1 bindings
PM / OPP: Manage device clk
PM / OPP: Add dev_pm_opp_set_rate()
cpufreq: dt: Convert few pr_debug/err() calls to dev_dbg/err()
cpufreq: dt: Rename 'need_update' to 'opp_v1'
cpufreq: dt: OPP layers handles clock-latency for V1 bindings as well
cpufreq: dt: Pass regulator name to the OPP core
cpufreq: dt: Unsupported OPPs are already disabled
cpufreq: dt: Reuse dev_pm_opp_get_max_transition_latency()
cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequency
cpufreq: dt: No need to fetch voltage-tolerance
cpufreq: dt: No need to allocate resources anymore
drivers/base/power/opp/core.c | 420 ++++++++++++++++++++++++++++++++++++++++++
drivers/base/power/opp/opp.h | 13 ++
drivers/cpufreq/cpufreq-dt.c | 300 +++++++++++-------------------
include/linux/pm_opp.h | 27 +++
4 files changed, 565 insertions(+), 195 deletions(-)
--
2.7.1.370.gb2aa7f8
When handing the SETUP packet by composite_setup(), we will release the
dwc->lock. If we get the 'USB_GADGET_DELAYED_STATUS' result from setup
function, which means we need to delay handling the STATUS phase.
But during the lock release period, maybe the request for handling delay
STATUS phase has been queued into list before we set 'dwc->delayed_status'
flag or entering 'EP0_STATUS_PHASE' phase, then we will miss the chance
to handle the STATUS phase. Thus we should check if the request for delay
STATUS phase has been enqueued when entering 'EP0_STATUS_PHASE' phase in
dwc3_ep0_xfernotready(), if so, we should handle it.
Signed-off-by: Baolin Wang <baolin.wang(a)linaro.org>
---
drivers/usb/dwc3/ep0.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 9bb1f85..e689ced 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -1123,7 +1123,21 @@ static void dwc3_ep0_xfernotready(struct dwc3 *dwc,
dwc->ep0state = EP0_STATUS_PHASE;
if (dwc->delayed_status) {
+ struct dwc3_ep *dep = dwc->eps[0];
+
WARN_ON_ONCE(event->endpoint_number != 1);
+ /*
+ * We should handle the delay STATUS phase here if the
+ * request for handling delay STATUS has been queued
+ * into the list.
+ */
+ if (!list_empty(&dep->pending_list)) {
+ dwc->delayed_status = false;
+ usb_gadget_set_state(&dwc->gadget,
+ USB_STATE_CONFIGURED);
+ dwc3_ep0_do_control_status(dwc, event);
+ }
+
return;
}
--
1.7.9.5
Hi,
This patchset adds support for cpufreq selftests to the kernel selftest
framework. More details can be found on individual patches.
These are all tested after installation of selftests on ARM Dual A15
core Exynos platform.
The content of the output file for the basic tests looks like this:
http://pastebin.com/nBY9AfD5 .
--
viresh
Viresh Kumar (4):
selftest: cpufreq: Add support for cpufreq tests
selftest: cpufreq: Add suspend/resume/hibernate support
selftest: cpufreq: Add support to test cpufreq modules
selftest: cpufreq: Add special tests
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/cpufreq/Makefile | 8 +
tools/testing/selftests/cpufreq/cpu.sh | 84 ++++++++
tools/testing/selftests/cpufreq/cpufreq.sh | 241 ++++++++++++++++++++++
tools/testing/selftests/cpufreq/governor.sh | 153 ++++++++++++++
tools/testing/selftests/cpufreq/main.sh | 194 ++++++++++++++++++
tools/testing/selftests/cpufreq/module.sh | 243 +++++++++++++++++++++++
tools/testing/selftests/cpufreq/special-tests.sh | 115 +++++++++++
8 files changed, 1039 insertions(+)
create mode 100644 tools/testing/selftests/cpufreq/Makefile
create mode 100755 tools/testing/selftests/cpufreq/cpu.sh
create mode 100755 tools/testing/selftests/cpufreq/cpufreq.sh
create mode 100755 tools/testing/selftests/cpufreq/governor.sh
create mode 100755 tools/testing/selftests/cpufreq/main.sh
create mode 100755 tools/testing/selftests/cpufreq/module.sh
create mode 100755 tools/testing/selftests/cpufreq/special-tests.sh
--
2.7.1.410.g6faf27b
Hi,
An earlier series[1] tried to implement bindings for PM domain
performance states. Rob Herring suggested that we can actually write the
supporting code first instead of bindings, as that will make things
easier to understand for all.
The bindings [1] aren't discarded yet and this series is based on a
version of those only. The bindings are only used by the last patch,
which should not be applied and is only sent for completeness.
All other patches can be reviewed/applied whenever the maintainers feel
they look good.
A brief summary of the problem this series is trying to solve:
Some platforms have the capability to configure the performance state of
their Power Domains. The performance levels are represented by positive
integer values, a lower value represents lower performance state.
We decided earlier that we should extend Power Domain framework to
support active state power management as well. The power-domains until
now were only concentrating on the idle state management of the device
and this needs to change in order to reuse the infrastructure of power
domains for active state management.
The first 5 patches update the PM domain and QoS frameworks to support
that and the last one presents the front end interface to it.
All the patches are tested by hacking the OPP core a bit for now.
--
viresh
[1] https://marc.info/?l=linux-kernel&m=148154020127722&w=2
Viresh Kumar (6):
PM / QOS: Add default case to the switch
PM / QOS: Pass request type to dev_pm_qos_{add|remove}_notifier()
PM / QOS: Add 'performance' request
PM / domain: Register for PM QOS performance notifier
PM / domain: Save/restore performance state at runtime suspend/resume
PM / OPP: Add support to parse domain-performance-state
Documentation/power/pm_qos_interface.txt | 11 ++--
drivers/base/power/domain.c | 102 ++++++++++++++++++++++++++++---
drivers/base/power/opp/core.c | 75 +++++++++++++++++++++++
drivers/base/power/opp/debugfs.c | 4 ++
drivers/base/power/opp/of.c | 44 +++++++++++++
drivers/base/power/opp/opp.h | 12 ++++
drivers/base/power/qos.c | 74 +++++++++++++++++++---
include/linux/pm_domain.h | 6 ++
include/linux/pm_qos.h | 16 +++--
9 files changed, 322 insertions(+), 22 deletions(-)
--
2.7.1.410.g6faf27b
Tree/Branch: next-20170131
Git describe: next-20170131
Commit: 7c088bd91d Add linux-next specific files for 20170131
Build Time: 105 min 2 sec
Passed: 8 / 10 ( 80.00 %)
Failed: 2 / 10 ( 20.00 %)
Errors: 6
Warnings: 3
Section Mismatches: 0
Failed defconfigs:
arm-allmodconfig
Errors:
arm-allmodconfig
../drivers/hsi/clients/cmt_speech.c:1114:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
../drivers/gpu/drm/armada/armada_gem.c:38:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
../drivers/gpu/drm/etnaviv/etnaviv_drv.c:468:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
../drivers/gpu/drm/etnaviv/etnaviv_gem.c:178:5: error: conflicting types for 'etnaviv_gem_fault'
../drivers/gpu/drm/omapdrm/omap_drv.c:696:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
../drivers/gpu/drm/omapdrm/omap_gem.c:531:5: error: conflicting types for 'omap_gem_fault'
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
1 warnings 0 mismatches : x86_64-allnoconfig
1 warnings 0 mismatches : arm64-allnoconfig
2 warnings 0 mismatches : arm-allmodconfig
1 warnings 0 mismatches : arm-allnoconfig
-------------------------------------------------------------------------------
Errors summary: 6
1 ../drivers/hsi/clients/cmt_speech.c:1114:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
1 ../drivers/gpu/drm/omapdrm/omap_gem.c:531:5: error: conflicting types for 'omap_gem_fault'
1 ../drivers/gpu/drm/omapdrm/omap_drv.c:696:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
1 ../drivers/gpu/drm/etnaviv/etnaviv_gem.c:178:5: error: conflicting types for 'etnaviv_gem_fault'
1 ../drivers/gpu/drm/etnaviv/etnaviv_drv.c:468:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
1 ../drivers/gpu/drm/armada/armada_gem.c:38:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
Warnings Summary: 3
3 ../drivers/char/random.c:318:12: warning: 'random_min_urandom_seed' defined but not used [-Wunused-variable]
1 ../include/linux/dynamic_debug.h:126:3: warning: 'ept_cfg' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:815:40: warning: 'out_dev' may be used uninitialized in this function [-Wmaybe-uninitialized]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
x86_64-allnoconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
../drivers/char/random.c:318:12: warning: 'random_min_urandom_seed' defined but not used [-Wunused-variable]
-------------------------------------------------------------------------------
arm64-allnoconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
../drivers/char/random.c:318:12: warning: 'random_min_urandom_seed' defined but not used [-Wunused-variable]
-------------------------------------------------------------------------------
arm-allmodconfig : FAIL, 6 errors, 2 warnings, 0 section mismatches
Errors:
../drivers/hsi/clients/cmt_speech.c:1114:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
../drivers/gpu/drm/armada/armada_gem.c:38:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
../drivers/gpu/drm/etnaviv/etnaviv_drv.c:468:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
../drivers/gpu/drm/etnaviv/etnaviv_gem.c:178:5: error: conflicting types for 'etnaviv_gem_fault'
../drivers/gpu/drm/omapdrm/omap_drv.c:696:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
../drivers/gpu/drm/omapdrm/omap_gem.c:531:5: error: conflicting types for 'omap_gem_fault'
Warnings:
../drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:815:40: warning: 'out_dev' may be used uninitialized in this function [-Wmaybe-uninitialized]
../include/linux/dynamic_debug.h:126:3: warning: 'ept_cfg' may be used uninitialized in this function [-Wmaybe-uninitialized]
-------------------------------------------------------------------------------
arm-allnoconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
../drivers/char/random.c:318:12: warning: 'random_min_urandom_seed' defined but not used [-Wunused-variable]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
arm64-allmodconfig
arm-multi_v5_defconfig
arm-multi_v7_defconfig
x86_64-defconfig
arm-multi_v4t_defconfig
arm64-defconfig
> This patch updates dev_pm_opp_find_freq_*() routines to get a reference
> to the OPPs returned by them.
>
> Also updates the users of dev_pm_opp_find_freq_*() routines to call
> dev_pm_opp_put() after they are done using the OPPs.
>
> As it is guaranteed the that OPPs wouldn't get freed while being used,
> the RCU read side locking present with the users isn't required anymore.
> Drop it as well.
>
> This patch also updates all users of devfreq_recommended_opp() which was
> returning an OPP received from the OPP core.
>
> Note that some of the OPP core routines have gained
> rcu_read_{lock|unlock}() calls, as those still use RCU specific APIs
> within them.
>
> Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
> Reviewed-by: Chanwoo Choi <cw00.choi(a)samsung.com> [Devfreq]
This patch gets a lot of fails during application.
For devfreq-side, I've got:
error: drivers/devfreq/devfreq.c: patch does not apply
error: patch failed: drivers/devfreq/exynos-bus.c:103
error: drivers/devfreq/exynos-bus.c: patch does not apply
error: patch failed: drivers/devfreq/governor_passive.c:59
error: drivers/devfreq/governor_passive.c: patch does not apply
error: patch failed: drivers/devfreq/rk3399_dmc.c:91
error: drivers/devfreq/rk3399_dmc.c: patch does not apply
error: patch failed: drivers/devfreq/tegra-devfreq.c:487
error: drivers/devfreq/tegra-devfreq.c: patch does not apply
With the condition that you are going to properly rebase the patch,
you may add "Reviewed-by" from me.
(the code itself looks fine.)
Cheers,
MyungJoo
> ---
> arch/arm/mach-omap2/pm.c | 5 +-
> drivers/base/power/opp/core.c | 114 +++++++++++++++++++----------------
> drivers/base/power/opp/cpu.c | 22 ++-----
> drivers/clk/tegra/clk-dfll.c | 17 ++----
> drivers/cpufreq/exynos5440-cpufreq.c | 5 +-
> drivers/cpufreq/imx6q-cpufreq.c | 10 +--
> drivers/cpufreq/mt8173-cpufreq.c | 8 +--
> drivers/cpufreq/omap-cpufreq.c | 4 +-
> drivers/devfreq/devfreq.c | 14 ++---
> drivers/devfreq/exynos-bus.c | 14 ++---
> drivers/devfreq/governor_passive.c | 4 +-
> drivers/devfreq/rk3399_dmc.c | 16 ++---
> drivers/devfreq/tegra-devfreq.c | 4 +-
> drivers/thermal/cpu_cooling.c | 11 +---
> drivers/thermal/devfreq_cooling.c | 15 ++---
> 15 files changed, 110 insertions(+), 153 deletions(-)
>