Krzysztof Kozlowski | 14 Feb 05:56 2016
Picon

[next] Odroid XU3 boot fail after cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequency

Hi all,

Recently Odroid XU3 failed to boot on linux-next
on multi_v7 defconfig. exynos defconfig boots fine.

Probably the "cpufreq: dt: Use dev_pm_opp_set_rate() to
switch frequency" is important here:
commit 78c3ba5df96c875b1668e1cd3ee0a69e62454f32
Author: Viresh Kumar <viresh.kumar <at> linaro.org>
Date:   Tue Feb 9 10:30:46 2016 +0530

    cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequency

    OPP core supports frequency/voltage changes based on the target
    frequency now, use that instead of open coding the same in cpufreq-dt
    driver.

    Signed-off-by: Viresh Kumar <viresh.kumar <at> linaro.org>
    Reviewed-by: Stephen Boyd <sboyd <at> codeaurora.org>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki <at> intel.com>

Full log:
http://www.krzk.eu/builders/boot-odroid-xu3-multi_v7/builds/276/steps/Boot%20odroid/logs/serial

dmesg:
Feb 14 10:29:58 [    1.620308] vdd_ldo9: ramp_delay not set
Feb 14 10:29:58 [    1.631144] vdd_ldo13: ramp_delay not set
Feb 14 10:29:58 [    1.638523] vdd_ldo15: ramp_delay not set
Feb 14 10:29:58 [    1.649500] vdd_sd: ramp_delay not set
Feb 14 10:29:58 [    1.712318] ------------[ cut here ]------------
(Continue reading)

Kevin Hilman | 13 Feb 00:14 2016

Re: [PATCH V5 11/14] soc: tegra: pmc: Add generic PM domain support

Ulf Hansson <ulf.hansson <at> linaro.org> writes:

> On 28 January 2016 at 17:33, Jon Hunter <jonathanh <at> nvidia.com> wrote:
>> Adds generic PM support to the PMC driver where the PM domains are
>> populated from device-tree and the PM domain consumer devices are
>> bound to their relevant PM domains via device-tree as well.
>>
>> Update the tegra_powergate_sequence_power_up() API so that internally
>> it calls the same tegra_powergate_xxx functions that are used by the
>> tegra generic power domain code for consistency.
>>
>> This is based upon work by Thierry Reding <treding <at> nvidia.com>
>> and Vince Hsu <vinceh <at> nvidia.com>.
>>
>> Signed-off-by: Jon Hunter <jonathanh <at> nvidia.com>

[...]

>> +static void tegra_powergate_disable_clocks(struct tegra_powergate *pg)
>> +{
>> +       unsigned int i;
>> +
>> +       for (i = 0; i < pg->num_clks; i++)
>> +               clk_disable_unprepare(pg->clks[i]);
>> +}
>> +
>> +static int tegra_powergate_enable_clocks(struct tegra_powergate *pg)
>> +{
>> +       unsigned int i;
>> +       int err;
(Continue reading)

Belisko Marek | 11 Feb 21:38 2016
Picon

generic-adc-battery volatge-to-percent formula

Hi,

some time ago I did post series which added some conversion table from
voltage to percent for charging and discharging states [1] in
twl4030_madc driver. This approach was not accepted and we still want
to have something like that in kernel. We re-think re-thinking
original idea and also get reference where Pavel point us to formula
which could be used for computing voltage-to-percent conversion [2]

What about adding this formula as a default for the
voltage-to-percent-conversion to
the generic-adc-battery driver (and converting it to DT)? Would that
be a better solution than a table driven and twl4030 only driver?

[1] - http://www.serverphorums.com/read.php?12,1127548
[2] - https://lkml.org/lkml/2015/4/1/557

Many thanks.

BR,

marek

--

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
(Continue reading)

Bartlomiej Zolnierkiewicz | 11 Feb 17:13 2016

[PATCH] PM / OPP: Fix NULL pointer dereference when no regulator is defined

Commit 7d34d56ef334 ("PM / OPP: Disable OPPs that aren't
supported by the regulator") causes NULL pointer dereference
OOPS when no regulator for OPP is defined.  Fix it by
replacing IS_ERR() check with IS_ERR_OR_NULL() one (since
providing regulator for OPP is optional).

Cc: Viresh Kumar <viresh.kumar <at> linaro.org>
Cc: Stephen Boyd <sboyd <at> codeaurora.org>
Cc: Rafael J. Wysocki <rafael.j.wysocki <at> intel.com>
Fixes: 7d34d56ef334 ("PM / OPP: Disable OPPs that aren't supported by the regulator")
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie <at> samsung.com>
---
This fixes linux-pm/linux-next tree boot hang regression on
Exynos4412 SoC based Odroid-U3 board.

Rafael, please apply.  Thank you!

 drivers/base/power/opp/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
index ab711c2..d7cd4e2 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
 <at>  <at>  -975,7 +975,7  <at>  <at>  static bool _opp_supported_by_regulators(struct dev_pm_opp *opp,
 {
 	struct regulator *reg = dev_opp->regulator;

-	if (!IS_ERR(reg) &&
+	if (!IS_ERR_OR_NULL(reg) &&
(Continue reading)

Jon Hunter | 11 Feb 11:52 2016

Re: [PATCH V5 11/14] soc: tegra: pmc: Add generic PM domain support


On 11/02/16 10:37, Ulf Hansson wrote:
> [...]
> 
>>>>
>>>> Why not make pm_genpd_remove() to behave as you describe for
>>>> pm_genpd_remove_tail()?
>>>> That's probably the only sane way to remove genpds anyhow!?
>>>
>>> Simply to offer flexibility. I could see that for some devices that have
>>> no dependencies between pm-domains and have a static list of pm-domains,
>>> they can simply call pm_genpd_remove() for a given pm-domain. However,
>>> that said, I can envision a case where a single pm-domain would be
>>> removed by itself and so may be there is no benefit?
>>
>> By the way, do you think that instead of passing the struct device * to
>> pm_genpd_remove(), we should just have a void *dev_id in the same way
>> the request_irq()/free_irq() work? In other words, it would allow people
>> to use the struct device or struct device_node, etc?
> 
> Hmm. Do you think that would make a difference for the power controller drivers?
> 
> I am thinking that genpd might perhaps benefit from being able to use
> the device pointer for other purposes as well!?
> Giving a void *, will prevent that, won't it?

Yes it will. Ok, let's stick with struct device for now.

Cheers
Jon
(Continue reading)

Jon Hunter | 10 Feb 19:01 2016

Re: [PATCH V5 11/14] soc: tegra: pmc: Add generic PM domain support


On 04/02/16 15:44, Ulf Hansson wrote:
> On 28 January 2016 at 17:33, Jon Hunter <jonathanh <at> nvidia.com> wrote:
>> Adds generic PM support to the PMC driver where the PM domains are
>> populated from device-tree and the PM domain consumer devices are
>> bound to their relevant PM domains via device-tree as well.
>>
>> Update the tegra_powergate_sequence_power_up() API so that internally
>> it calls the same tegra_powergate_xxx functions that are used by the
>> tegra generic power domain code for consistency.
>>
>> This is based upon work by Thierry Reding <treding <at> nvidia.com>
>> and Vince Hsu <vinceh <at> nvidia.com>.
>>
>> Signed-off-by: Jon Hunter <jonathanh <at> nvidia.com>
>> ---
>>  drivers/soc/tegra/pmc.c                     | 470 ++++++++++++++++++++++++++--
>>  include/dt-bindings/power/tegra-powergate.h |  36 +++
>>  include/soc/tegra/pmc.h                     |  39 +--
> 
> I suggest you split the header changes into a separate patch.
> 
> Moreover, these new DT definitions should be documented in the patch
> describing the new powergate DT bindings. At least a simple list
> providing the available options.

Ok.

> [...]
> 
(Continue reading)

Ulf Hansson | 10 Feb 09:08 2016

Re: [RFC v11 1/3] PM / Domains: Support for multiple states

[...]

Hi Axel,

Please make sure to send emails in plain text.

>> > +static int genpd_alloc_default_state(struct generic_pm_domain *genpd)
>> > +{
>> > +       int ret;
>> > +
>> > +       if (IS_ERR_OR_NULL(genpd)) {
>> > +               ret = -EINVAL;
>> > +               goto err;
>> > +       }
>>
>> No need for this check. It's a static function called by
>> pm_genpd_init(), which already done this.
>>
>> > +
>> > +       genpd->states = kcalloc(1, sizeof(struct genpd_power_state),
>> > +                               GFP_KERNEL);
>> > +       if (!genpd->states) {
>> > +               ret = -ENOMEM;
>> > +               goto err;
>>
>> I just realized that this won't play well, mainly because
>> pm_genpd_init() don't return any error codes.
>>
>> I suggest to not allocate the data for "states" on the heap, but
>> instead use a static struct.
(Continue reading)

Stephane Gasparini | 9 Feb 17:07 2016
Picon

[PATCH 0/1] account I/O Wait during synchronous write

From: Stephane Gasparini <stephane.gasparini <at> linux.intel.com>

This patch allow to take into account I/O wait for synchronous write

Stephane Gasparini (1):
  kernel/fs: fix I/O wait not accounted for RW O_DSYNC

 block/bio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
Stephane Gasparini<stephane.gasparini <at> linux.intel.com>

---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Hubert Chrzaniuk | 9 Feb 15:41 2016
Picon

[PATCH] tools/power turbostat: Fixed turbo ratio stats for Intel Xeon x200 family

Algorithm for calculating turbo ratio limits for Intel Xeon x200 family
has some minor bugs. This patch fixes the routine.

Signed-off-by: Hubert Chrzaniuk <hubert.chrzaniuk <at> intel.com>
---
 tools/power/x86/turbostat/turbostat.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 0dac7e0..3a59aec 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
 <at>  <at>  -1330,12 +1330,13  <at>  <at>  dump_knl_turbo_ratio_limits(void)

 	get_msr(base_cpu, MSR_NHM_TURBO_RATIO_LIMIT, &msr);

-	fprintf(stderr, "cpu%d: MSR_NHM_TURBO_RATIO_LIMIT: 0x%08llx\n",
+	fprintf(stderr, "cpu%d: MSR_TURBO_RATIO_LIMIT: 0x%08llx\n",
 		base_cpu, msr);

 	/**
 	 * Turbo encoding in KNL is as follows:
-	 * [7:0] -- Base value of number of active cores of bucket 1.
+	 * [0] -- Reserved
+	 * [7:1] -- Base value of number of active cores of bucket 1.
 	 * [15:8] -- Base value of freq ratio of bucket 1.
 	 * [20:16] -- +ve delta of number of active cores of bucket 2.
 	 * i.e. active cores of bucket 2 =
 <at>  <at>  -1354,8 +1355,8  <at>  <at>  dump_knl_turbo_ratio_limits(void)
 	 * [60:56]-- +ve delta of number of active cores of bucket 7.
(Continue reading)

ahaslam | 9 Feb 14:15 2016

[RFC v11 0/3] Multiple intermediate states for genpd

From: Axel Haslam <ahaslam+renesas <at> baylibre.com>

Some architectures may have intermediate power levels between on and off.

This patch set adds the ability to declare multiple states for a given
generic power domain, the idea is that the deepest state will be entered
which does not violate any of the device or sub-domain latency constraints.

Changes since v10
* Several reworks after Ulf Hansson's comments:
 - merge the governor changes and core changes into a single patch
 - remove the "name" of the state.
 - add a default state allocation function
 - convert governor power done ok function to while loop.
 - reword commit message

Changes since v9
*rebased on linux-next

Changes since v8
* rebased to linux-pm next

Changes since v7:
* rebase to 4.3-rc5

* add genpd_init_simple (Lina's suggestion) for platforms that don't have
multiple states and don't declare initial latencies. A default OFF
state with initial 0 latencies will be used in this case.

* Append Mark's patch to add "states" and "timings" to the genpd
(Continue reading)

Viresh Kumar | 9 Feb 06:00 2016
Gravatar

[PATCH V3 00/16] PM / OPP: Introduce APIs to transition OPPs

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
(Continue reading)


Gmane