<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-obmc-linux/drivers/base, branch v4.4.16</title>
<subtitle>Talos™ II Linux sources for OpenBMC</subtitle>
<id>https://git.raptorcs.com/git/talos-obmc-linux/atom?h=v4.4.16</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-obmc-linux/atom?h=v4.4.16'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/'/>
<updated>2016-07-27T16:47:32+00:00</updated>
<entry>
<title>base: make module_create_drivers_dir race-free</title>
<updated>2016-07-27T16:47:32+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2016-06-10T08:54:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=c705db27ed4e65574afac58cd7a696282db9131e'/>
<id>urn:sha1:c705db27ed4e65574afac58cd7a696282db9131e</id>
<content type='text'>
commit 7e1b1fc4dabd6ec8e28baa0708866e13fa93c9b3 upstream.

Modules which register drivers via standard path (driver_register) in
parallel can cause a warning:
WARNING: CPU: 2 PID: 3492 at ../fs/sysfs/dir.c:31 sysfs_warn_dup+0x62/0x80
sysfs: cannot create duplicate filename '/module/saa7146/drivers'
Modules linked in: hexium_gemini(+) mxb(+) ...
...
Call Trace:
...
 [&lt;ffffffff812e63a2&gt;] sysfs_warn_dup+0x62/0x80
 [&lt;ffffffff812e6487&gt;] sysfs_create_dir_ns+0x77/0x90
 [&lt;ffffffff8140f2c4&gt;] kobject_add_internal+0xb4/0x340
 [&lt;ffffffff8140f5b8&gt;] kobject_add+0x68/0xb0
 [&lt;ffffffff8140f631&gt;] kobject_create_and_add+0x31/0x70
 [&lt;ffffffff8157a703&gt;] module_add_driver+0xc3/0xd0
 [&lt;ffffffff8155e5d4&gt;] bus_add_driver+0x154/0x280
 [&lt;ffffffff815604c0&gt;] driver_register+0x60/0xe0
 [&lt;ffffffff8145bed0&gt;] __pci_register_driver+0x60/0x70
 [&lt;ffffffffa0273e14&gt;] saa7146_register_extension+0x64/0x90 [saa7146]
 [&lt;ffffffffa0033011&gt;] hexium_init_module+0x11/0x1000 [hexium_gemini]
...

As can be (mostly) seen, driver_register causes this call sequence:
  -&gt; bus_add_driver
    -&gt; module_add_driver
      -&gt; module_create_drivers_dir
The last one creates "drivers" directory in /sys/module/&lt;...&gt;. When
this is done in parallel, the directory is attempted to be created
twice at the same time.

This can be easily reproduced by loading mxb and hexium_gemini in
parallel:
while :; do
  modprobe mxb &amp;
  modprobe hexium_gemini
  wait
  rmmod mxb hexium_gemini saa7146_vv saa7146
done

saa7146 calls pci_register_driver for both mxb and hexium_gemini,
which means /sys/module/saa7146/drivers is to be created for both of
them.

Fix this by a new mutex in module_create_drivers_dir which makes the
test-and-create "drivers" dir atomic.

I inverted the condition and removed 'return' to avoid multiple
unlocks or a goto.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Fixes: fe480a2675ed (Modules: only add drivers/ direcory if needed)
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / sleep: Handle failures in device_suspend_late() consistently</title>
<updated>2016-06-08T01:14:37+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-05-20T21:09:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=98c28450538d0a191d031cce8852e568b62a1127'/>
<id>urn:sha1:98c28450538d0a191d031cce8852e568b62a1127</id>
<content type='text'>
commit 3a17fb329da68cb00558721aff876a80bba2fdb9 upstream.

Grygorii Strashko reports:

 The PM runtime will be left disabled for the device if its
 .suspend_late() callback fails and async suspend is not allowed
 for this device. In this case device will not be added in
 dpm_late_early_list and dpm_resume_early() will ignore this
 device, as result PM runtime will be disabled for it forever
 (side effect: after 8 subsequent failures for the same device
 the PM runtime will be reenabled due to disable_depth overflow).

To fix this problem, add devices to dpm_late_early_list regardless
of whether or not device_suspend_late() returns errors for them.

That will ensure failures in there to be handled consistently for
all devices regardless of their async suspend/resume status.

Reported-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Tested-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / Runtime: Fix error path in pm_runtime_force_resume()</title>
<updated>2016-06-08T01:14:34+00:00</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2016-04-08T11:10:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=a1e15f5ae6d69e834b751b719d007b380f4a42fb'/>
<id>urn:sha1:a1e15f5ae6d69e834b751b719d007b380f4a42fb</id>
<content type='text'>
commit 0ae3aeefabbeef26294e7a349b51f1c761d46c9f upstream.

As pm_runtime_set_active() may fail because the device's parent isn't
active, we can end up executing the -&gt;runtime_resume() callback for the
device when it isn't allowed.

Fix this by invoking pm_runtime_set_active() before running the callback
and let's also deal with the error code.

Fixes: 37f204164dfb (PM: Add pm_runtime_suspend|resume_force functions)
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case</title>
<updated>2016-05-19T00:06:48+00:00</updated>
<author>
<name>Jack Pham</name>
<email>jackp@codeaurora.org</email>
</author>
<published>2016-04-15T06:37:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=4e7e3f54cae7a6ea567c09d18c35bcc468b564c3'/>
<id>urn:sha1:4e7e3f54cae7a6ea567c09d18c35bcc468b564c3</id>
<content type='text'>
commit dec8e8f6e6504aa3496c0f7cc10c756bb0e10f44 upstream.

Specifically for the case of reads that use the Extended Register
Read Long command, a multi-byte read operation is broken up into
8-byte chunks.  However the call to spmi_ext_register_readl() is
incorrectly passing 'val_size', which if greater than 8 will
always fail.  The argument should instead be 'len'.

Fixes: c9afbb05a9ff ("regmap: spmi: support base and extended register spaces")
Signed-off-by: Jack Pham &lt;jackp@codeaurora.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / Domains: Fix removal of a subdomain</title>
<updated>2016-05-04T21:48:51+00:00</updated>
<author>
<name>Jon Hunter</name>
<email>jonathanh@nvidia.com</email>
</author>
<published>2016-03-04T10:55:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=cab4c949ade11ac67f69bc05124c9d6ffef31917'/>
<id>urn:sha1:cab4c949ade11ac67f69bc05124c9d6ffef31917</id>
<content type='text'>
commit beda5fc1ff9b527059290a97b672d2ee0eb7b92f upstream.

Commit 30e7a65b3fdb (PM / Domains: Ensure subdomain is not in use
before removing) added a test to ensure that a subdomain is not a
master to another subdomain or if any devices are using the subdomain
before removing. This change incorrectly used the "slave_links" list to
determine if the subdomain is a master to another subdomain, where it
should have been using the "master_links" list instead. The
"slave_links" list will never be empty for a subdomain and so a
subdomain can never be removed. Fix this by testing if the
"master_links" list is empty instead.

Fixes: 30e7a65b3fdb (PM / Domains: Ensure subdomain is not in use before removing)
Signed-off-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Reviewed-by: Thierry Reding &lt;treding@nvidia.com&gt;
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Acked-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / OPP: Initialize u_volt_min/max to a valid value</title>
<updated>2016-05-04T21:48:51+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2016-02-15T04:51:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=dabe14168a929839b4757f496ad6886489078997'/>
<id>urn:sha1:dabe14168a929839b4757f496ad6886489078997</id>
<content type='text'>
commit c88c395f4a6485f23f81e385c79945d68bcd5c5d upstream.

We kept u_volt_min/max initialized to 0, when only the target voltage is
present in DT, instead of the target/min/max triplet.

This didn't go well with the regulator framework, as on few calls the
min voltage was set to target and max was set to 0 and so resulted in a
kernel crash like below:

kernel BUG at ../drivers/regulator/core.c:216!

[&lt;c0684af4&gt;] (regulator_check_voltage) from [&lt;c06857ac&gt;] (regulator_set_voltage_unlocked+0x58/0x230)
[&lt;c06857ac&gt;] (regulator_set_voltage_unlocked) from [&lt;c06859ac&gt;] (regulator_set_voltage+0x28/0x54)
[&lt;c06859ac&gt;] (regulator_set_voltage) from [&lt;c0775b28&gt;] (_set_opp_voltage+0x30/0x98)
[&lt;c0775b28&gt;] (_set_opp_voltage) from [&lt;c0776630&gt;] (dev_pm_opp_set_rate+0xf0/0x28c)
[&lt;c0776630&gt;] (dev_pm_opp_set_rate) from [&lt;c096f784&gt;] (__cpufreq_driver_target+0x184/0x2b4)
[&lt;c096f784&gt;] (__cpufreq_driver_target) from [&lt;c0973760&gt;] (dbs_check_cpu+0x1b0/0x1f4)
[&lt;c0973760&gt;] (dbs_check_cpu) from [&lt;c0973f30&gt;] (cpufreq_governor_dbs+0x324/0x5c4)
[&lt;c0973f30&gt;] (cpufreq_governor_dbs) from [&lt;c0970958&gt;] (__cpufreq_governor+0xe4/0x1ec)
[&lt;c0970958&gt;] (__cpufreq_governor) from [&lt;c09711e0&gt;] (cpufreq_init_policy+0x64/0x8c)
[&lt;c09711e0&gt;] (cpufreq_init_policy) from [&lt;c09718cc&gt;] (cpufreq_online+0x2fc/0x708)
[&lt;c09718cc&gt;] (cpufreq_online) from [&lt;c0765ff0&gt;] (subsys_interface_register+0x94/0xd8)
[&lt;c0765ff0&gt;] (subsys_interface_register) from [&lt;c0970530&gt;] (cpufreq_register_driver+0x14c/0x19c)
[&lt;c0970530&gt;] (cpufreq_register_driver) from [&lt;c09746dc&gt;] (dt_cpufreq_probe+0x70/0xec)
[&lt;c09746dc&gt;] (dt_cpufreq_probe) from [&lt;c076907c&gt;] (platform_drv_probe+0x4c/0xb0)
[&lt;c076907c&gt;] (platform_drv_probe) from [&lt;c07678e0&gt;] (driver_probe_device+0x214/0x2c0)
[&lt;c07678e0&gt;] (driver_probe_device) from [&lt;c0767a18&gt;] (__driver_attach+0x8c/0x90)
[&lt;c0767a18&gt;] (__driver_attach) from [&lt;c0765c2c&gt;] (bus_for_each_dev+0x68/0x9c)
[&lt;c0765c2c&gt;] (bus_for_each_dev) from [&lt;c0766d78&gt;] (bus_add_driver+0x1a0/0x218)
[&lt;c0766d78&gt;] (bus_add_driver) from [&lt;c076810c&gt;] (driver_register+0x78/0xf8)
[&lt;c076810c&gt;] (driver_register) from [&lt;c0301d74&gt;] (do_one_initcall+0x90/0x1d8)
[&lt;c0301d74&gt;] (do_one_initcall) from [&lt;c1100e14&gt;] (kernel_init_freeable+0x15c/0x1fc)
[&lt;c1100e14&gt;] (kernel_init_freeable) from [&lt;c0b27a0c&gt;] (kernel_init+0x8/0xf0)
[&lt;c0b27a0c&gt;] (kernel_init) from [&lt;c0307d78&gt;] (ret_from_fork+0x14/0x3c)
Code: e1550004 baffffeb e3a00000 e8bd8070 (e7f001f2)

Fix that by initializing u_volt_min/max to the target voltage in such cases.

Reported-and-tested-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Fixes: 274659029c9d (PM / OPP: Add support to parse "operating-points-v2" bindings)
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>base/platform: Fix platform drivers with no probe callback</title>
<updated>2016-02-17T20:30:55+00:00</updated>
<author>
<name>Martin Wilck</name>
<email>Martin.Wilck@ts.fujitsu.com</email>
</author>
<published>2015-11-30T11:50:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=9e5d4a6c799565346b677484f7348effd6f2d877'/>
<id>urn:sha1:9e5d4a6c799565346b677484f7348effd6f2d877</id>
<content type='text'>
commit 25cad69f21f5532d99e2ee73c8ab6512bcab614c upstream.

Since b8b2c7d845d5, platform_drv_probe() is called for all platform
devices. If drv-&gt;probe is NULL, and dev_pm_domain_attach() fails,
platform_drv_probe() will return the error code from dev_pm_domain_attach().

This causes real_probe() to enter the "probe_failed" path and set
dev-&gt;driver to NULL. Before b8b2c7d845d5, real_probe() would assume
success if both dev-&gt;bus-&gt;probe and drv-&gt;probe were missing. As a result,
a device and driver could be "bound" together just by matching their names;
this doesn't work any more after b8b2c7d845d5.

This may cause problems later for certain usage of platform_driver_register()
and platform_device_register_simple(). I observed a panic while loading
the tpm_tis driver with parameter "force=1" (i.e. registering tpm_tis as
a platform driver), because tpm_tis_init's assumption that the device
returned by platform_device_register_simple() was bound didn't hold any more
(tpmm_chip_alloc() dereferences chip-&gt;pdev-&gt;driver, causing panic).

This patch restores the previous (4.3.0 and earlier) behavior of
platform_drv_probe() in the case when the associated platform driver has
no "probe" function.

Fixes: b8b2c7d845d5 ("base/platform: assert that dev_pm_domain callbacks are called unconditionally")
Signed-off-by: Martin Wilck &lt;Martin.Wilck@ts.fujitsu.com&gt;
Cc: Martin Fuzzey &lt;mfuzzey@parkeon.com&gt;
Acked-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge branches 'powercap', 'pm-cpufreq' and 'pm-domains'</title>
<updated>2015-12-14T21:58:57+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2015-12-14T21:58:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=f1b9fc591e437ec07626ba84e1d81be19cb00eb6'/>
<id>urn:sha1:f1b9fc591e437ec07626ba84e1d81be19cb00eb6</id>
<content type='text'>
* powercap:
  powercap / RAPL: fix BIOS lock check

* pm-cpufreq:
  cpufreq: intel_pstate: Minor cleanup for FRAC_BITS
  cpufreq: tegra: add regulator dependency for T124

* pm-domains:
  PM / Domains: Allow runtime PM callbacks to be re-used during system PM
</content>
</entry>
<entry>
<title>drivers/base/memory.c: prohibit offlining of memory blocks with missing sections</title>
<updated>2015-12-12T18:15:34+00:00</updated>
<author>
<name>Seth Jennings</name>
<email>sjennings@variantweb.net</email>
</author>
<published>2015-12-11T21:40:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=26bbe7ef6d5cdc7ec08cba6d433fca4060f258f3'/>
<id>urn:sha1:26bbe7ef6d5cdc7ec08cba6d433fca4060f258f3</id>
<content type='text'>
Commit bdee237c0343 ("x86: mm: Use 2GB memory block size on large-memory
x86-64 systems") and 982792c782ef ("x86, mm: probe memory block size for
generic x86 64bit") introduced large block sizes for x86.  This made it
possible to have multiple sections per memory block where previously,
there was a only every one section per block.

Since blocks consist of contiguous ranges of section, there can be holes
in the blocks where sections are not present.  If one attempts to
offline such a block, a crash occurs since the code is not designed to
deal with this.

This patch is a quick fix to gaurd against the crash by not allowing
blocks with non-present sections to be offlined.

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=107781

Signed-off-by: Seth Jennings &lt;sjennings@variantweb.net&gt;
Reported-by: Andrew Banman &lt;abanman@sgi.com&gt;
Cc: Daniel J Blueman &lt;daniel@numascale.com&gt;
Cc: Yinghai Lu &lt;yinghai@kernel.org&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Russ Anderson &lt;rja@sgi.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Allow runtime PM callbacks to be re-used during system PM</title>
<updated>2015-12-10T00:37:34+00:00</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2015-11-30T15:21:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=ffe12855a5f7f195589130197558e6a5c276caa4'/>
<id>urn:sha1:ffe12855a5f7f195589130197558e6a5c276caa4</id>
<content type='text'>
A runtime PM centric subsystem/driver may typically use the runtime PM
helpers, pm_runtime_force_suspend|resume() in the system PM path. This
means the genpd's runtime PM callbacks might be invoked even when runtime
PM has been disabled for the device.

To properly cope with these and similar scenarios when these helper
functions are used, change genpd to skip validating and measuring the
device PM QOS latency.

This is needed because otherwise genpd may prevent the device to be put
into low power state. If this occurs during system PM, it causes the
sequence to be aborted as a device's system PM callback returns -EBUSY.

Fixes: ba2bbfbf6307 (PM / Domains: Remove intermediate states from the power off sequence)
Reported-by: Cao Minh Hiep &lt;cm-hiep@jinso.co.jp&gt;
Reported-by: Harunaga &lt;nx-truong@jinso.co.jp&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Cc: 4.3+ &lt;stable@vger.kernel.org&gt; # 4.3+
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
