<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/acpi/utils.c, branch v4.9</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.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-07-19T19:32:39Z</updated>
<entry>
<title>nfit: make DIMM DSMs optional</title>
<updated>2016-07-19T19:32:39Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2016-07-19T19:32:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a72255983f12f31f0c8d8275fb1a781546cfacb7'/>
<id>urn:sha1:a72255983f12f31f0c8d8275fb1a781546cfacb7</id>
<content type='text'>
Commit 4995734e973a "acpi, nfit: fix acpi_check_dsm() vs zero functions
implemented" attempted to fix a QEMU regression by supporting its usage
of a zero-mask as a valid response to a DSM-family probe request.
However, this behavior breaks HP platforms that return a zero-mask by
default causing the probe to misidentify the DSM-family.

Instead, the QEMU regression can be fixed by simply not requiring the DSM
family to be identified.

This effectively reverts commit 4995734e973a, and removes the DSM
requirement from the init path.

Cc: "Rafael J. Wysocki" &lt;rafael@kernel.org&gt;
Cc: Xiao Guangrong &lt;guangrong.xiao@linux.intel.com&gt;
Cc: Linda Knippers &lt;linda.knippers@hpe.com&gt;
Fixes: 4995734e973a ("acpi, nfit: fix acpi_check_dsm() vs zero functions implemented")
Reported-by: Jerry Hoemann &lt;jerry.hoemann@hpe.com&gt;
Tested-by: Jerry Hoemann &lt;jerry.hoemann@hpe.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>acpi, nfit: fix acpi_check_dsm() vs zero functions implemented</title>
<updated>2016-06-24T16:07:39Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2016-06-24T16:07:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4995734e973a2c2e9c6f6413cbad9913fc4df0dc'/>
<id>urn:sha1:4995734e973a2c2e9c6f6413cbad9913fc4df0dc</id>
<content type='text'>
QEMU 2.6 implements nascent support for nvdimm DSMs. Depending on
configuration it may only implement the function0 dsm to indicate that
no other DSMs are available. Commit 31eca76ba2fc "nfit, libnvdimm:
limited/whitelisted dimm command marshaling mechanism" breaks QEMU, but
QEMU is spec compliant.  Per the spec the way to indicate that no
functions are supported is:

    If Function Index is zero, the return is a buffer containing one bit
    for each function index, starting with zero. Bit 0 indicates whether
    there is support for any functions other than function 0 for the
    specified UUID and Revision ID. If set to zero, no functions are
    supported (other than function zero) for the specified UUID and
    Revision ID.

Update the nfit driver to determine the family (interface UUID) without
requiring the implementation to define any other functions, i.e.
short-circuit acpi_check_dsm() to succeed per the spec.  The nfit driver
appears to be the only user passing funcs==0 to acpi_check_dsm(), so
this behavior change of the common routine should be limited to the
probing done by the nfit driver.

Cc: Len Brown &lt;lenb@kernel.org&gt;
Cc: Jerry Hoemann &lt;jerry.hoemann@hpe.com&gt;
Acked-by: "Rafael J. Wysocki" &lt;rafael@kernel.org&gt;
Fixes: 31eca76ba2fc ("nfit, libnvdimm: limited/whitelisted dimm command marshaling mechanism")
Reported-by: Xiao Guangrong &lt;guangrong.xiao@linux.intel.com&gt;
Tested-by: Xiao Guangrong &lt;guangrong.xiao@linux.intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'libnvdimm-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm</title>
<updated>2016-05-23T18:18:01Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-05-23T18:18:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1f40c49570eb01436786a9b5845c4469a9a1f362'/>
<id>urn:sha1:1f40c49570eb01436786a9b5845c4469a9a1f362</id>
<content type='text'>
Pull libnvdimm updates from Dan Williams:
 "The bulk of this update was stabilized before the merge window and
  appeared in -next.  The "device dax" implementation was revised this
  week in response to review feedback, and to address failures detected
  by the recently expanded ndctl unit test suite.

  Not included in this pull request are two dax topic branches (dax
  error handling, and dax radix-tree locking).  These topics were
  deferred to get a few more days of -next integration testing, and to
  coordinate a branch baseline with Ted and the ext4 tree.  Vishal and
  Ross will send the error handling and locking topics respectively in
  the next few days.

  This branch has received a positive build result from the kbuild robot
  across 226 configs.

  Summary:

   - Device DAX for persistent memory: Device DAX is the device-centric
     analogue of Filesystem DAX (CONFIG_FS_DAX).  It allows memory
     ranges to be allocated and mapped without need of an intervening
     file system.  Device DAX is strict, precise and predictable.
     Specifically this interface:

      a) Guarantees fault granularity with respect to a given page size
         (pte, pmd, or pud) set at configuration time.

      b) Enforces deterministic behavior by being strict about what
         fault scenarios are supported.

     Persistent memory is the first target, but the mechanism is also
     targeted for exclusive allocations of performance/feature
     differentiated memory ranges.

   - Support for the HPE DSM (device specific method) command formats.
     This enables management of these first generation devices until a
     unified DSM specification materializes.

   - Further ACPI 6.1 compliance with support for the common dimm
     identifier format.

   - Various fixes and cleanups across the subsystem"

* tag 'libnvdimm-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (40 commits)
  libnvdimm, dax: fix deletion
  libnvdimm, dax: fix alignment validation
  libnvdimm, dax: autodetect support
  libnvdimm: release ida resources
  Revert "block: enable dax for raw block devices"
  /dev/dax, core: file operations and dax-mmap
  /dev/dax, pmem: direct access to persistent memory
  libnvdimm: stop requiring a driver -&gt;remove() method
  libnvdimm, dax: record the specified alignment of a dax-device instance
  libnvdimm, dax: reserve space to store labels for device-dax
  libnvdimm, dax: introduce device-dax infrastructure
  nfit: add sysfs dimm 'family' and 'dsm_mask' attributes
  tools/testing/nvdimm: ND_CMD_CALL support
  nfit: disable vendor specific commands
  nfit: export subsystem ids as attributes
  nfit: fix format interface code byte order per ACPI6.1
  nfit, libnvdimm: limited/whitelisted dimm command marshaling mechanism
  nfit, libnvdimm: clarify "commands" vs "_DSMs"
  libnvdimm: increase max envelope size for ioctl
  acpi/nfit: Add sysfs "id" for NVDIMM ID
  ...
</content>
</entry>
<entry>
<title>acpi: widen acpi_evaluate_dsm() revision and function-index arguments</title>
<updated>2016-04-11T22:02:26Z</updated>
<author>
<name>Jerry Hoemann</name>
<email>jerry.hoemann@hpe.com</email>
</author>
<published>2016-04-11T22:02:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c7e16e5257ec46530e3e874af38191746c137c83'/>
<id>urn:sha1:c7e16e5257ec46530e3e874af38191746c137c83</id>
<content type='text'>
The ACPI specification states that arguments "Revision ID" and "Function
Index" to a _DSM are type "Integer."  Type Integers are 64 bit
quantities.

The function evaluate_dsm specifies these types as simple "int" which
are 32 bits.  Widen type passed to acpi_evaluate_dsm and its callers and
derived callers to pass correct type.

acpi_check_dsm and acpi_evaluate_dsm_typed had similar issue and were
corrected as well.

This is in preparation for libnvdimm implementing a generic _DSM
passthrough facility to have the capacity to pass 64-bit values as the
ACPI specification allows.

[djbw: clarify the changelog, add rationale]
Signed-off-by: Jerry Hoemann &lt;jerry.hoemann@hpe.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>ACPI / utils: Rename acpi_dev_present()</title>
<updated>2016-04-09T01:12:58Z</updated>
<author>
<name>Lukas Wunner</name>
<email>lukas@wunner.de</email>
</author>
<published>2016-03-24T12:15:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c68ae33e7fb4a010f9a48af3e4b87089dca96551'/>
<id>urn:sha1:c68ae33e7fb4a010f9a48af3e4b87089dca96551</id>
<content type='text'>
acpi_dev_present() was originally named after pci_dev_present()
to signify the similarity of the two functions.

However Rafael J. Wysocki pointed out that the exported function
acpi_dev_present() is easily confused with the non-exported
acpi_device_is_present(). Additionally in ACPI parlance the term
"present" usually refers to the "device is present" bit returned
by the _STA control method, yet acpi_dev_present() merely checks
presence in the namespace. It does not invoke _STA at all, let
alone check the "device is present" bit.

As suggested by Rafael, rename the function to acpi_dev_found()
and adjust all existing call sites.

Signed-off-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / util: cast data to u64 before shifting to fix sign extension</title>
<updated>2016-03-22T00:23:00Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2016-03-18T15:08:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4a798f508f5d0809f45c939e329e17b3eb0ffbc1'/>
<id>urn:sha1:4a798f508f5d0809f45c939e329e17b3eb0ffbc1</id>
<content type='text'>
obj-&gt;buffer.pointer[i] should be cast to u64 to prevent an unintentional
sign extension.  For example, if pointer[7] is 0x80, then the value
0xffffffffff000000 is or'd into mask rather than the intended value
0xff00000000000000

Detected with static analysis by CoverityScan

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / util: remove redundant check if element is NULL</title>
<updated>2016-03-09T22:47:35Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2016-02-28T20:31:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bea3c377c286f4f63f67f2e061c1d8851af76b7e'/>
<id>urn:sha1:bea3c377c286f4f63f67f2e061c1d8851af76b7e</id>
<content type='text'>
element is &amp;package-&gt;package.elements[i] which can never be NULL
so the check to see if it is NULL is redundant and can be removed.

Detected with static analysis by CoverityScan

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / utils: Add acpi_dev_present()</title>
<updated>2015-12-09T00:31:41Z</updated>
<author>
<name>Lukas Wunner</name>
<email>lukas@wunner.de</email>
</author>
<published>2015-11-25T20:19:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2d12b6b381ba059d5f92798f5ea739672a2f5fcf'/>
<id>urn:sha1:2d12b6b381ba059d5f92798f5ea739672a2f5fcf</id>
<content type='text'>
There's an idiom in use by 7 Linux drivers to detect the presence of a
particular ACPI HID by walking the namespace with acpi_get_devices().
The callback passed to acpi_get_devices() is mostly identical across
the drivers, leading to lots of duplicate code.

Add acpi_dev_present(), the ACPI equivalent to pci_dev_present(),
allowing us to deduplicate all that boilerplate in the drivers.

Signed-off-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Reviewed-by: Hanjun Guo &lt;hanjun.guo@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: Remove FSF mailing addresses</title>
<updated>2015-07-08T00:27:32Z</updated>
<author>
<name>Jarkko Nikula</name>
<email>jarkko.nikula@linux.intel.com</email>
</author>
<published>2015-06-26T08:27:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4c62dbbce902cf2afa88cac89ec67c828160f431'/>
<id>urn:sha1:4c62dbbce902cf2afa88cac89ec67c828160f431</id>
<content type='text'>
There is no need to carry potentially outdated Free Software Foundation
mailing address in file headers since the COPYING file includes it.

Signed-off-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>acpi-video-detect: video: Make video_detect code part of the video module</title>
<updated>2015-06-18T23:10:36Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2015-06-16T14:27:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=14ca7a47d0ab2a7a35faab130e6d9682f8ff1a46'/>
<id>urn:sha1:14ca7a47d0ab2a7a35faab130e6d9682f8ff1a46</id>
<content type='text'>
This is a preparation patch for the backlight interface selection logic
cleanup, there are 2 reasons to not always build the video_detect code
into the kernel:

1) In order for the video_detect.c to also deal with / select native
backlight interfaces on win8 systems, instead of doing this in video.c
where it does not belong, video_detect.c needs to call into the backlight
class code. Which cannot be done if it is builtin and the blacklight class
is not.

2) Currently all the platform/x86 drivers which have quirks to prefer
the vendor driver over acpi-video call acpi_video_unregister_backlight()
to remove the acpi-video backlight interface, this logic really belongs
in video_detect.c, which will cause video_detect.c to depend on symbols of
video.c and video.c already depends on video_detect.c symbols, so they
really need to be a single module.

Note that this commits make 2 changes so as to maintain 100% kernel
commandline compatibility:

1) The __setup call for the acpi_backlight= handling is moved to
   acpi/util.c as __setup may only be used by code which is alwasy builtin
2) video.c is renamed to acpi_video.c so that it can be combined with
   video_detect.c into video.ko

This commit also makes changes to drivers/platform/x86/Kconfig to ensure
that drivers which use acpi_video_backlight_support() from video_detect.c,
will not be built-in when acpi_video is not built in. This also changes
some "select" uses to "depends on" to avoid dependency loops.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Darren Hart &lt;dvhart@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
