Wei Yongjun | 26 Jul 16:49 2016
Picon

[PATCH] power_supply: tps65217-charger: fix missing platform_set_drvdata()

Add missing platform_set_drvdata() in tps65217_charger_probe(), otherwise
calling platform_get_drvdata() in remove returns NULL.

This is detected by Coccinelle semantic patch.

Signed-off-by: Wei Yongjun <weiyj.lk <at> gmail.com>
---
 drivers/power/tps65217_charger.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/power/tps65217_charger.c b/drivers/power/tps65217_charger.c
index 73dfae4..4c56e54 100644
--- a/drivers/power/tps65217_charger.c
+++ b/drivers/power/tps65217_charger.c
 <at>  <at>  -206,6 +206,7  <at>  <at>  static int tps65217_charger_probe(struct platform_device *pdev)
 	if (!charger)
 		return -ENOMEM;

+	platform_set_drvdata(pdev, charger);
 	charger->tps = tps;
 	charger->dev = &pdev->dev;

--
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

Rafael J. Wysocki | 26 Jul 13:32 2016
Picon
Gravatar

Fwd: [Bug 150021] New: kernel panic: "kernel tried to execute NX-protected page" when resuming from hibernate to disk

Hi,

The following commit:

commit 13523309495cdbd57a0d344c0d5d574987af007f
Author: Josh Poimboeuf <jpoimboe <at> redhat.com>
Date:   Thu Jan 21 16:49:21 2016 -0600

    x86/asm/acpi: Create a stack frame in do_suspend_lowlevel()

    do_suspend_lowlevel() is a callable non-leaf function which doesn't
    honor CONFIG_FRAME_POINTER, which can result in bad stack traces.

    Create a stack frame for it when CONFIG_FRAME_POINTER is enabled.

is reported to cause a resume-from-hibernation regression due to an attempt
to execute an NX page (we've seen quite a bit of that recently).

I'm asking the reporter to try 4.7, but if the problem is still there, we'll
need to revert the above I'm afraid.

Thanks,
Rafael
From: Hi, The following commit: (Continue reading)

Sebastian Reichel | 25 Jul 22:50 2016
Gravatar

[GIT PULL] power supply changes for 4.8

Hi Linus,

The following changes since commit 1a695a905c18548062509178b98bc91e67510864:

  Linux 4.7-rc1 (2016-05-29 09:29:24 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git tags/for-v4.8

for you to fetch changes up to 4fcd504edbf7c793325511c2df8dcd083958e28a:

  power: reset: add reboot mode driver (2016-07-06 17:16:27 +0200)

----------------------------------------------------------------
power supply and reset changes for the v4.8 series

 * introduce reboot mode driver
 * add DT support to max8903
 * add power supply support for axp221
 * misc. fixes

----------------------------------------------------------------
Andrew F. Davis (3):
      power_supply: bq27xxx_battery: Fix copy/paste error in header comment
      power_supply: bq27xxx_battery: Index register numbers by enum
      power_supply: bq27xxx_battery: Group register mappings into one table

Andy Yan (2):
      dt-bindings: power: reset: add document for reboot-mode driver
(Continue reading)

Phil Reid | 25 Jul 09:50 2016
Picon

[PATCH 0/1] power: sbs-manager: Add interrupt support and battery detect gpios

Adds SMBALERT interupt support fo AC present and battery insertation / removal.

This patch is dependent on karl-heinz <at> schneider-inet.de patch series:
[PATCH v3] Add support for Smart Battery System Manager

Tested with my patches to the sbs-battery driver applied:
[PATCH v2] power: sbs-battery fixup gpio detect irq handling

sbs-battery driver patch  can be applied before or after this series without
breaking anything.

Phil Reid (1):
  power: sbs-manager: Add interrupt support and battery detect gpios

 .../devicetree/bindings/power/sbs,sbs-manager.txt  |  29 ++++
 drivers/power/sbs-manager.c                        | 157 +++++++++++++++++++++
 2 files changed, 186 insertions(+)

--

-- 
1.8.3.1

--
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

Wei Yongjun | 25 Jul 09:01 2016
Picon

[PATCH -next] thermal: clock_cooling: Fix missing mutex_init()

The driver allocates the mutex but not initialize it.
Use mutex_init() on it to initialize it correctly.

This is detected by Coccinelle semantic patch.

Signed-off-by: Wei Yongjun <weiyj.lk <at> gmail.com>
---
 drivers/thermal/clock_cooling.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/thermal/clock_cooling.c b/drivers/thermal/clock_cooling.c
index 1b4ff0f..ed5dd0e 100644
--- a/drivers/thermal/clock_cooling.c
+++ b/drivers/thermal/clock_cooling.c
 <at>  <at>  -426,6 +426,7  <at>  <at>  clock_cooling_register(struct device *dev, const char *clock_name)
 	if (!ccdev)
 		return ERR_PTR(-ENOMEM);

+	mutex_init(&ccdev->lock);
 	ccdev->dev = dev;
 	ccdev->clk = devm_clk_get(dev, clock_name);
 	if (IS_ERR(ccdev->clk))

--
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

Jisheng Zhang | 25 Jul 08:11 2016

[PATCH v3] PM / OPP: optimize dev_pm_opp_set_rate() performance a bit

In dev_pm_opp_set_rate(), _find_opp_table() is called 4 times: once by
_get_opp_clk(), once by dev_pm_opp_set_rate() itself, and twice by
dev_pm_opp_find_freq_ceil(). If there are several opp_tables in the
system, three times of opp table finding is a big waste. This patch
reduced the call of _find_opp_table() to twice.

Signed-off-by: Jisheng Zhang <jszhang <at> marvell.com>
---
Since v2:
 - fix gcc warnings

Since v1:
 - avoid opp_table pointer usage after the rcu_read_unlock() as pointed
   out by Viresh, thus we can only reduced the call of _find_opp_table
   to twice.

 drivers/base/power/opp/core.c | 31 +++++++++++++++++++------------
 1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
index 7c04c87..df0c709 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
 <at>  <at>  -402,6 +402,22  <at>  <at>  struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
 }
 EXPORT_SYMBOL_GPL(dev_pm_opp_find_freq_exact);

+static noinline struct dev_pm_opp *_find_freq_ceil(struct opp_table *opp_table,
+						   unsigned long *freq)
+{
(Continue reading)

Jisheng Zhang | 25 Jul 07:11 2016

[PATCH v2] PM / OPP: optimize dev_pm_opp_set_rate() performance a bit

In dev_pm_opp_set_rate(), _find_opp_table() is called 4 times: once by
_get_opp_clk(), once by dev_pm_opp_set_rate() itself, and twice by
dev_pm_opp_find_freq_ceil(). If there are several opp_tables in the
system, three times of opp table finding is a big waste. This patch
reduced the call of _find_opp_table() to twice.

Signed-off-by: Jisheng Zhang <jszhang <at> marvell.com>
---
Since v1:
 - avoid opp_table pointer usage after the rcu_read_unlock() as pointed
   out by Viresh, thus we can only reduced the call of _find_opp_table
   to twice.

 drivers/base/power/opp/core.c | 31 +++++++++++++++++++------------
 1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
index 7c04c87..cde7514 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
 <at>  <at>  -402,6 +402,22  <at>  <at>  struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
 }
 EXPORT_SYMBOL_GPL(dev_pm_opp_find_freq_exact);

+static struct dev_pm_opp *_find_freq_ceil(struct opp_table *opp_table,
+					  unsigned long *freq)
+{
+	struct dev_pm_opp *temp_opp, *opp = ERR_PTR(-ERANGE);
+
+	list_for_each_entry_rcu(temp_opp, &opp_table->opp_list, node) {
(Continue reading)

Phil Reid | 25 Jul 04:42 2016
Picon

[PATCH v2 0/4] power: sbs-battery fixup gpio detect irq handling

This series switches the driver to using the devm series of calls for
resource allocation. 
Also the gpio detect and irq handling had a number of issue:
- gpio detection can now be used with gpios that don't support irqs.
- Fixup irq call back data, previously null pointer was used.

I've attempted to maintain the drivers platform_data interface. There doesn't
look to be a user of this and given the errors in there I doubt it's being used
by anyone. Code would be a bit cleaner if this could go and just rely on the
device tree. Comments?

Changes from V1:
- Fix sbs_of_populate_pdata params for non OF builds.
- Fix title of summary message.

Phil Reid (4):
  power: sbs-battery: Use devm_kzalloc to alloc data
  power: sbs-battery: Request threaded irq and fix dev callback cookie
  power: sbs-battery: Use devm_power_supply_register
  power: sbs-battery: Use gpio_desc and sleeping calls for battery
    detect

 drivers/power/sbs-battery.c | 147 ++++++++++++++++++++------------------------
 1 file changed, 65 insertions(+), 82 deletions(-)

--

-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
(Continue reading)

Srinivas Pandruvada | 24 Jul 00:12 2016
Picon

[PATCH] cpufreq: intel_pstate: Add additional OOB Ids

Add Skylake-X and Broadwell-X ids for out of band control of P-States.
If the MSR_MISC_PWR_MGMT BIT(8) == 1, then Intel P-State driver should
exit as OS can't control P-States.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada <at> linux.intel.com>
---
 drivers/cpufreq/intel_pstate.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index d15e29e..02bdf1d 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
 <at>  <at>  -1379,6 +1379,8  <at>  <at>  MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids);

 static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] = {
 	ICPU(INTEL_FAM6_BROADWELL_XEON_D, core_params),
+	ICPU(INTEL_FAM6_BROADWELL_X, core_params),
+	ICPU(INTEL_FAM6_SKYLAKE_X, core_params),
 	{}
 };

--

-- 
2.7.4

--
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)

Andreas Herrmann | 22 Jul 17:14 2016

[PATCH] Revert "cpufreq: pcc-cpufreq: update default value of cpuinfo_transition_latency"


This reverts commit 790d849bf811a8ab5d4cd2cce0f6fda92f6aebf2.

Using a v4.7-rc7 kernel on a HP ProLiant triggered following messages

 pcc-cpufreq: (v1.10.00) driver loaded with frequency limits: 1200 MHz, 2800 MHz
 cpufreq: ondemand governor failed, too long transition latency of HW, fallback to performance governor

The last line was shown for each CPU in the system.
Testing v4.5 (where commit 790d849b was integrated) triggered
similar messages. Same behaviour on a 2nd HP Proliant system.

So commit 790d849bf (cpufreq: pcc-cpufreq: update default value of
cpuinfo_transition_latency) causes the system to use performance
governor which, I guess, was not the intention of the patch.

Enabling debug output in pcc-cpufreq provides following verbose output:

 pcc-cpufreq: (v1.10.00) driver loaded with frequency limits: 1200 MHz, 2800 MHz
 pcc_get_offset: for CPU 0: pcc_cpu_data input_offset: 0x44, pcc_cpu_data output_offset: 0x48
 init: policy->max is 2800000, policy->min is 1200000
 get: get_freq for CPU 0
 get: SUCCESS: (virtual) output_offset for cpu 0 is 0xffffc9000d7c0048, contains a value of: 0xff06.
Speed is: 168000 MHz
 cpufreq: ondemand governor failed, too long transition latency of HW, fallback to performance governor
 target: CPU 0 should go to target freq: 2800000 (virtual) input_offset is 0xffffc9000d7c0044
 target: was SUCCESSFUL for cpu 0

I am asking to revert 790d849bf to re-enable usage of ondemand
governor with pcc-cpufreq.
(Continue reading)

Phil Reid | 22 Jul 10:42 2016
Picon

[PATCH 0/4] power: sbs-manager fixup gpio detect irq handling

This series switches the driver to using the devm series of calls for
resource allocation. 
Also the gpio detect and irq handling had a number of issue:
- gpio detection can now be used with gpios that don't support irqs.
- Fixup irq call back data, previously null pointer was used.

I've attempted to maintain the drivers platform_data interface. There doesn't
look to be a user of this and given the errors in there I doubt it's being used
by anyone. Code would be a bit cleaner if this could go and just rely on the
device tree. Comments?

Phil Reid (4):
  power: sbs-battery: Use devm_kzalloc to alloc data
  power: sbs-battery: Request threaded irq and fix dev callback cookie
  power: sbs-battery: Use devm_power_supply_register
  power: sbs-battery: Use gpio_desc and sleeping calls for battery
    detect

 drivers/power/sbs-battery.c | 143 +++++++++++++++++++-------------------------
 1 file changed, 63 insertions(+), 80 deletions(-)

--

-- 
1.8.3.1

--
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)


Gmane