<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/acpi, branch v4.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.2</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-08-28T00:46:06Z</updated>
<entry>
<title>Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm</title>
<updated>2015-08-28T00:46:06Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-08-28T00:46:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5c98bcce6497c55947f1fc22e51b41849d9ad3fe'/>
<id>urn:sha1:5c98bcce6497c55947f1fc22e51b41849d9ad3fe</id>
<content type='text'>
Pull nvdimm fixlet from Dan Williams:
 "This is a libnvdimm ABI fixup.

  I pushed back on this change quite hard given the late date, that it
  appears to be purely cosmetic, sysfs is not necessarily meant to be a
  user friendly UI, and the kernel interprets the reversed polarity of
  the ACPI_NFIT_MEM_ARMED flag correctly.  When this flag is set, the
  energy source of an NVDIMM is not armed and any new writes to the DIMM
  may not be preserved.

  However, Bob Moore warned me that it is important to get these things
  named correctly wherever they appear otherwise we run the risk of a
  less than cautious firmware engineer implementing the polarity the
  wrong way.  Once a mistake like that escapes into production platforms
  the flag becomes useless and we need to move to a new bit position.

  Bob has agreed to take a change through ACPICA to rename
  ACPI_NFIT_MEM_ARMED to ACPI_NFIT_MEM_NOT_ARMED, and the patch below
  from Toshi brings the sysfs representation of these flags in line with
  their respective polarities.

  Please pull for 4.2 as this is the first kernel to expose the ACPI
  NFIT sysfs representation, and this is likely a kernel that firmware
  developers will be using for checking out their NVDIMM enabling"

* 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
  nfit: Clarify memory device state flags strings
</content>
</entry>
<entry>
<title>nfit: Clarify memory device state flags strings</title>
<updated>2015-08-27T18:35:58Z</updated>
<author>
<name>Toshi Kani</name>
<email>toshi.kani@hp.com</email>
</author>
<published>2015-08-26T16:20:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=402bae597ec68b84498432f5a0069f28bfb807d6'/>
<id>urn:sha1:402bae597ec68b84498432f5a0069f28bfb807d6</id>
<content type='text'>
ACPI 6.0 NFIT Memory Device State Flags in Table 5-129 defines
NVDIMM status as follows.  These bits indicate multiple info,
such as failures, pending event, and capability.

  Bit [0] set to 1 to indicate that the previous SAVE to the
  Memory Device failed.
  Bit [1] set to 1 to indicate that the last RESTORE from the
  Memory Device failed.
  Bit [2] set to 1 to indicate that platform flush of data to
  Memory Device failed. As a result, the restored data content
  may be inconsistent even if SAVE and RESTORE do not indicate
  failure.
  Bit [3] set to 1 to indicate that the Memory Device is observed
  to be not armed prior to OSPM hand off. A Memory Device is
  considered armed if it is able to accept persistent writes.
  Bit [4] set to 1 to indicate that the Memory Device observed
  SMART and health events prior to OSPM handoff.

/sys/bus/nd/devices/nmemX/nfit/flags shows this flags info.
The output strings associated with the bits are "save", "restore",
"smart", etc., which can be confusing as they may be interpreted
as positive status, i.e. save succeeded.

Change also the dev_info() message in acpi_nfit_register_dimms()
to be consistent with the sysfs flags strings.

Reported-by: Robert Elliott &lt;elliott@hp.com&gt;
Signed-off-by: Toshi Kani &lt;toshi.kani@hp.com&gt;
[ross: rename 'not_arm' to 'not_armed']
Cc: Ross Zwisler &lt;ross.zwisler@linux.intel.com&gt;
[djbw: defer adding bit5, HEALTH_ENABLED, for now]
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm</title>
<updated>2015-08-26T00:26:00Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-08-26T00:26:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f045fd755fe9ba2b15265cd237d6ae5d924689d3'/>
<id>urn:sha1:f045fd755fe9ba2b15265cd237d6ae5d924689d3</id>
<content type='text'>
Pull nvdimm fix from Dan Williams:
 "A single fix for status register read size in the nd_blk driver.

  The effect of getting the width of this register read wrong is that
  all I/O fails when the read returns non-zero.  Given the availability
  of ACPI 6 NFIT enabled platforms, this could reasonably wait to come
  in during the 4.3 merge window with a tag for 4.2-stable.  Otherwise,
  this makes the 4.2 kernel fully functional with devices that conform
  to the mmio-block-apertures defined in the ACPI 6 NFIT (NVDIMM
  Firmware Interface Table)"

* 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
  nfit, nd_blk: BLK status register is only 32 bits
</content>
</entry>
<entry>
<title>nfit, nd_blk: BLK status register is only 32 bits</title>
<updated>2015-08-25T23:42:01Z</updated>
<author>
<name>Ross Zwisler</name>
<email>ross.zwisler@linux.intel.com</email>
</author>
<published>2015-08-20T22:27:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=de4a196c02a2a2631b516d90da6e8d052ccb07e8'/>
<id>urn:sha1:de4a196c02a2a2631b516d90da6e8d052ccb07e8</id>
<content type='text'>
Only read 32 bits for the BLK status register in read_blk_stat().

The format and size of this register is defined in the
"NVDIMM Driver Writer's guide":

http://pmem.io/documents/NVDIMM_Driver_Writers_Guide.pdf

Signed-off-by: Ross Zwisler &lt;ross.zwisler@linux.intel.com&gt;
Reported-by: Nicholas Moulin &lt;nicholas.w.moulin@linux.intel.com&gt;
Tested-by: Nicholas Moulin &lt;nicholas.w.moulin@linux.intel.com&gt;
Reviewed-by: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / video: Fix circular lock dependency issue in the video-detect code</title>
<updated>2015-08-14T09:20:20Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2015-08-13T16:53:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7231ed1a813e0a9d249bbbe58e66ca058aee83e1'/>
<id>urn:sha1:7231ed1a813e0a9d249bbbe58e66ca058aee83e1</id>
<content type='text'>
Before this commit, the following would happen:

 a) acpi_video_get_backlight_type() gets called
 b) acpi_video_get_backlight_type() calls acpi_video_init_backlight_type()
 c) acpi_video_init_backlight_type() locks its function static init_mutex
 d) acpi_video_init_backlight_type() calls backlight_register_notifier()
 e) backlight_register_notifier() takes its notifier-chain lock

And when the backlight notifier chain gets called we've:

 1) blocking_notifier_call_chain() gets called
 2) blocking_notifier_call_chain() takes the notifier-chain lock
 3) blocking_notifier_call_chain() calls acpi_video_backlight_notify()
 4) acpi_video_backlight_notify() calls acpi_video_get_backlight_type()
 5) acpi_video_get_backlight_type() calls acpi_video_init_backlight_type()
 6) acpi_video_init_backlight_type() locks its function static init_mutex

So in the first call sequence we have:

 a) init_mutex gets locked
 b) notifier-chain gets locked

and in the second call sequence we have:

 1) notifier-chain gets locked
 2) init_mutex gets locked

And we've a circular locking dependency. This specific locking dependency
is fixable without using the big hammer otherwise known as a workqueue,
but further analysis shows a similar problem with the backlight notifier
chain lock vs register_count_mutex from drivers/acpi/acpi_video.c,
and fixing that becomes problematic.

So this commit simply fixes this with the big hammer, performance
wise this is a non issue as we expect the work to get scheduled
exactly zero or one times during normal system use.

Fixes: 93a291dfaf9c (ACPI / video: Move backlight notifier to video_detect.c)
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reported-and-tested-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / PM: Use target_state to set the device power state</title>
<updated>2015-07-28T14:29:08Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2015-07-28T10:51:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=71b65445f0ed04c2afe3660f829779fddb2890c1'/>
<id>urn:sha1:71b65445f0ed04c2afe3660f829779fddb2890c1</id>
<content type='text'>
Commit 20dacb71ad28 ("ACPI / PM: Rework device power management to follow
ACPI 6") changed the device power management to use D3hot if the device
in question does not have _PR3 method even if D3cold was requested by the
caller.

However, if the device has _PR3 device-&gt;power.state is also set to D3hot
instead of D3Cold after power resources have been turned off because
device-&gt;power.state will be assigned from "state" instead of
"target_state".

Next time the device is transitioned to D0, acpi_power_transition() will
find that the current power state of the device is D3hot instead of D3cold
which causes it to power down all resources required for the current
(wrong) state D3hot.

Below is a simplified ASL example of a real touch panel device which
triggers the problem:

  Scope (TPL1)
  {
      Name (_PR0, Package (1) { \_SB.PCI0.I2C1.PXTC })
      Name (_PR3, Package (1) { \_SB.PCI0.I2C1.PXTC })
      ...
  }

In both D0 and D3hot the same power resource is required. However, when
acpi_power_transition() turns off power resources required for D3hot (as
the device is transitioned to D0) it powers down PXTC which then makes the
device to lose its power.

Fix this by assigning "target_state" to the device power state instead of
"state" that is always D3hot even for devices with valid _PR3.

Fixes: 20dacb71ad28 (ACPI / PM: Rework device power management to follow ACPI 6)
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'pm-cpuidle', 'pm-cpufreq' and 'acpi-resources'</title>
<updated>2015-07-16T21:47:19Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2015-07-16T21:47:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=17ffc8b083ac299ff798419d1887b7cdcd4ae4d2'/>
<id>urn:sha1:17ffc8b083ac299ff798419d1887b7cdcd4ae4d2</id>
<content type='text'>
* pm-cpuidle:
  suspend-to-idle: Prevent RCU from complaining about tick_freeze()

* pm-cpufreq:
  cpufreq: Allow freq_table to be obtained for offline CPUs
  cpufreq: Initialize the governor again while restoring policy

* acpi-resources:
  ACPI / PCI: Fix regressions caused by resource_size_t overflow with 32-bit kernel
</content>
</entry>
<entry>
<title>Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm</title>
<updated>2015-07-12T03:44:31Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-07-12T03:44:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=59c3cb553f5fc4ed6868eeaae6ffd8e1daf6d93e'/>
<id>urn:sha1:59c3cb553f5fc4ed6868eeaae6ffd8e1daf6d93e</id>
<content type='text'>
Pull libnvdimm fixes from Dan Williams:
 "1) Fixes for a handful of smatch reports (Thanks Dan C.!) and minor
     bug fixes (patches 1-6)

  2) Correctness fixes to the BLK-mode nvdimm driver (patches 7-10).

     Granted these are slightly large for a -rc update.  They have been
     out for review in one form or another since the end of May and were
     deferred from the merge window while we settled on the "PMEM API"
     for the PMEM-mode nvdimm driver (ie memremap_pmem, memcpy_to_pmem,
     and wmb_pmem).

     Now that those apis are merged we implement them in the BLK driver
     to guarantee that mmio aperture moves stay ordered with respect to
     incoming read/write requests, and that writes are flushed through
     those mmio-windows and platform-buffers to be persistent on media.

  These pass the sub-system unit tests with the updates to
  tools/testing/nvdimm, and have received a successful build-report from
  the kbuild robot (468 configs).

  With acks from Rafael for the touches to drivers/acpi/"

* 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm:
  nfit: add support for NVDIMM "latch" flag
  nfit: update block I/O path to use PMEM API
  tools/testing/nvdimm: add mock acpi_nfit_flush_address entries to nfit_test
  tools/testing/nvdimm: fix return code for unimplemented commands
  tools/testing/nvdimm: mock ioremap_wt
  pmem: add maintainer for include/linux/pmem.h
  nfit: fix smatch "use after null check" report
  nvdimm: Fix return value of nvdimm_bus_init() if class_create() fails
  libnvdimm: smatch cleanups in __nd_ioctl
  sparse: fix misplaced __pmem definition
</content>
</entry>
<entry>
<title>nfit: add support for NVDIMM "latch" flag</title>
<updated>2015-07-10T18:43:50Z</updated>
<author>
<name>Ross Zwisler</name>
<email>ross.zwisler@linux.intel.com</email>
</author>
<published>2015-07-10T17:06:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f0f2c072cf530d5b8890be5051cc8b36b0c54cce'/>
<id>urn:sha1:f0f2c072cf530d5b8890be5051cc8b36b0c54cce</id>
<content type='text'>
Add support in the NFIT BLK I/O path for the "latch" flag
defined in the "Get Block NVDIMM Flags" _DSM function:

http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf

This flag requires the driver to read back the command register after it
is written in the block I/O path.  This ensures that the hardware has
fully processed the new command and moved the aperture appropriately.

Signed-off-by: Ross Zwisler &lt;ross.zwisler@linux.intel.com&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>nfit: update block I/O path to use PMEM API</title>
<updated>2015-07-10T18:35:45Z</updated>
<author>
<name>Ross Zwisler</name>
<email>ross.zwisler@linux.intel.com</email>
</author>
<published>2015-07-10T17:06:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c2ad29540cb913bd9e526fae77c35c7fb45f24a3'/>
<id>urn:sha1:c2ad29540cb913bd9e526fae77c35c7fb45f24a3</id>
<content type='text'>
Update the nfit block I/O path to use the new PMEM API and to adhere to
the read/write flows outlined in the "NVDIMM Block Window Driver
Writer's Guide":

http://pmem.io/documents/NVDIMM_Driver_Writers_Guide.pdf

This includes adding support for targeted NVDIMM flushes called "flush
hints" in the ACPI 6.0 specification:

http://www.uefi.org/sites/default/files/resources/ACPI_6.0.pdf

For performance and media durability the mapping for a BLK aperture is
moved to a write-combining mapping which is consistent with
memcpy_to_pmem() and wmb_blk().

Signed-off-by: Ross Zwisler &lt;ross.zwisler@linux.intel.com&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
</feed>
