Sinan Kaya | 29 May 00:01 2016

[PATCH V6 0/8] vfio, platform: add ACPI support

The device tree code checks for the presence of a reset driver and calls
the of_reset function pointer by looking up the reset driver as a module.

ACPI defines _RST method to perform device level reset. After the _RST
method is executed, the OS can resume using the device.

This patch checks the presence of _RST method and calls the _RST
method when reset is requested.

Changes from V5:
1. Handle reset function call failures in open and release (new patch).
2. Bring out extra debug information when failure happens (new patch).
3. Address review comments from Eric in ACPI _RST patch.

Sinan Kaya (8):
  vfio: platform: move reset call to a common function
  vfio: platform: determine reset capability
  vfio: platform: add support for ACPI probe
  vfio: platform: add extra debug info argument to call reset
  vfio: platform: call _RST method when using ACPI
  vfio, platform: make reset driver a requirement by default
  vfio: platform: check reset call return code during open
  vfio: platform: check reset call return code during release

 drivers/vfio/platform/vfio_amba.c             |   5 +
 drivers/vfio/platform/vfio_platform.c         |   5 +
 drivers/vfio/platform/vfio_platform_common.c  | 169 ++++++++++++++++++++++----
 drivers/vfio/platform/vfio_platform_private.h |   2 +
 4 files changed, 159 insertions(+), 22 deletions(-)

(Continue reading)

Linus Torvalds | 27 May 22:15 2016

IS_ERR_VALUE misuses

This is just a heads-up: for some reason the acpi layer and nvdimm use
the IS_ERR_VALUE() macro, and they use it incorrectly.

To see warnings about it, change the macro from

#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)

to do a cast to a pointer and back (ie make the "(x)" part be
"(unsigned long)(void *)(x)" instead, which then will cause warnings

  warning: cast to pointer from integer of different size

when passed an "int" argument.

The reason "int" arguments are wrong is that the macro really is
designed to test the upper range of a pointer value. It happens to
work for signed integers too, but looking at the users, pretty much
none of them are right. The ACPI and nvdimm users are all about the
perfectly standard "zero for success, negative error code for
failure", and so using

    if (IS_ERROR_VALUE(rc))
        return rc;

is just plain garbage. The code generally should just do

    if (rc)
        return rc;
(Continue reading)

Alex Hung | 27 May 09:47 2016

[PATCH] ACPI:video: skip evaluating _DOD when it does not exist

Some system supports hybrid graphics and its discrete VGA
does not have any connectors and therefore has no _DOD method.

Signed-off-by: Alex Hung <alex.hung <at>>
 drivers/acpi/acpi_video.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index 5fdac39..549cdbe 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
 <at>  <at>  -1211,6 +1211,9  <at>  <at>  static int acpi_video_device_enumerate(struct acpi_video_bus *video)
 	union acpi_object *dod = NULL;
 	union acpi_object *obj;

+	if (!video->cap._DOD)
+		return AE_NOT_EXIST;
 	status = acpi_evaluate_object(video->device->handle, "_DOD", NULL, &buffer);
 	if (!ACPI_SUCCESS(status)) {
 		ACPI_EXCEPTION((AE_INFO, status, "Evaluating _DOD"));


To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo <at>
More majordomo info at

(Continue reading)

Stuart Hayes | 26 May 18:38 2016

[PATCH] nfit: add Microsoft NVDIMM DSM command set to white list

Add the Microsoft _DSM command set to the white list of NVDIMM command sets.

This command set is documented at

Signed-off-by: Stuart Hayes <stuart.w.hayes <at>>
  drivers/acpi/nfit.c        | 9 ++++++---
  drivers/acpi/nfit.h        | 4 ++++
  include/uapi/linux/ndctl.h | 1 +
  3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
index 2215fc8..48fc575 100644
--- a/drivers/acpi/nfit.c
+++ b/drivers/acpi/nfit.c
 <at>  <at>  -1130,11 +1130,11  <at>  <at>  static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,

-	 * Until standardization materializes we need to consider up to 3
+	 * Until standardization materializes we need to consider several
  	 * different command sets.  Note, that checking for function0 (bit0)
  	 * tells us if any commands are reachable through this uuid.
  		if (acpi_check_dsm(adev_dimm->handle, to_nfit_uuid(i), 1, 1))

 <at>  <at>  -1150,7 +1150,9  <at>  <at>  static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
(Continue reading)

Hoan Tran | 25 May 21:09 2016

[PATCH] acpi: cppc: Prevent cpc_desc_ptr points to the invalid data

When CPPC fails to request PCC channel, the CPC data is freed
and cpc_desc_ptr points to the invalid data. This change prevents
this issue by moving cpc_desc_ptr assignment after PCC channel

Signed-off-by: Hoan Tran <hotran <at>>
 drivers/acpi/cppc_acpi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index 8adac69..85fd8f7 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
 <at>  <at>  -595,9 +595,6  <at>  <at>  int acpi_cppc_processor_probe(struct acpi_processor *pr)
 	/* Store CPU Logical ID */
 	cpc_ptr->cpu_id = pr->id;

-	/* Plug it into this CPUs CPC descriptor. */
-	per_cpu(cpc_desc_ptr, pr->id) = cpc_ptr;
 	/* Parse PSD data for this CPU */
 	ret = acpi_get_psd(cpc_ptr, handle);
 	if (ret)
 <at>  <at>  -610,6 +607,9  <at>  <at>  int acpi_cppc_processor_probe(struct acpi_processor *pr)
 			goto out_free;

+	/* Plug PSD data into this CPUs CPC descriptor. */
+	per_cpu(cpc_desc_ptr, pr->id) = cpc_ptr;
(Continue reading)

fu.wei | 24 May 15:30 2016

[PATCH v5 0/6] acpi, clocksource: add GTDT driver and GTDT support in arm_arch_timer

From: Fu Wei <fu.wei <at>>

This patchset:
    (1)Preparation for adding GTDT support in arm_arch_timer
        1. Move some enums and marcos to header file
        2. Add a new enum for spi type.
        3. Improve printk relevant code

    (2)Introduce ACPI GTDT parser: drivers/acpi/gtdt.c
    Parse all kinds of timer in GTDT table of ACPI:arch timer,
    memory-mapped timer and SBSA Generic Watchdog timer.
    This driver can help to simplify all the relevant timer drivers,
    and separate all the ACPI GTDT knowledge from them.

    (3)Simplify ACPI code for arm_arch_timer

    (4)Add GTDT support for ARM memory-mapped timer

This patchset has been tested on the following platforms:
    (1)ARM Foundation v8 model

v5: Sorting out all patches, simplify the API of GTDT driver:
    GTDT driver just fills the data struct for arm_arch_timer driver.

    Delete the kvm relevant patches
    Separate two patches for sorting out the code for arm_arch_timer.
    Improve irq info export code to allow missing irq info in GTDT table.

(Continue reading)

Ralf Gerbig | 22 May 19:23 2016

Patch Thinkpad X201T backlight


the X201 Tablet needs the same treatmant as the X201s,
otherwise you can't change levels.

The patch is against 4.5.5 stable, but should apply to all recent

Please be gentle, I am neither a programmer nor a developer.

If you have questions, feel free to ask, but don't expect an answer in
the next 10 to 20 days (going to hospital).


Ralf Gerbig

commit a10b5a05eae1a990682ce238b8e0ac6ad791a8a9
Author: Ralf Gerbig <rge <at>>
Date:   Sun May 22 18:56:22 2016 +0200

    The Thinkpad X201 Tablet also needs video_detect_force_video

    Signed-off-by: Ralf Gerbig <rge <at>>

diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 1316ddd..d8d7bd3 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
(Continue reading)

Borislav Petkov | 23 May 10:28 2016

[PATCH 1/2] acpi/einj: Convert EINJ_PFX to proper pr_fmt

From: Borislav Petkov <bp <at>>

... and remove it from the pr_* calls.

Signed-off-by: Borislav Petkov <bp <at>>
 drivers/acpi/apei/einj.c | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
index 559c1173de1c..4ba41855799f 100644
--- a/drivers/acpi/apei/einj.c
+++ b/drivers/acpi/apei/einj.c
 <at>  <at>  -33,7 +33,8  <at>  <at> 

 #include "apei-internal.h"

-#define EINJ_PFX "EINJ: "
+#undef pr_fmt
+#define pr_fmt(fmt) "EINJ: " fmt

 #define SPIN_UNIT		100			/* 100ns */
 /* Firmware should respond within 1 milliseconds */
 <at>  <at>  -179,8 +180,7  <at>  <at>  static int einj_get_available_error_type(u32 *type)
 static int einj_timedout(u64 *t)
 	if ((s64)*t < SPIN_UNIT) {
-		pr_warning(FW_WARN EINJ_PFX
-			   "Firmware does not respond in time\n");
+		pr_warning(FW_WARN "Firmware does not respond in time\n");
(Continue reading)

Williams, Dan J | 23 May 02:01 2016

[GIT PULL] libnvdimm for 4.7

Hi Linus, please pull from:

  git:// tags/libnvdimm-for-4.7 receive the device driver related nvdimm topic branches for 4.7.

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

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

The following changes since commit 1b8d2afde54fade94339f573c4e05644f9ae9866:

  libnvdimm, pfn: fix ARCH=alpha allmodconfig build failure (2016-05-06 10:20:10 -0700)

are available in the git repository at:

  git:// tags/libnvdimm-for-4.7

for you to fetch changes up to 36092ee8ba695fce023b2118ececa6c2a56b1331:
(Continue reading)

Andrea Gelmini | 21 May 13:36 2016

[PATCH 0008/1529] Fix typo

Signed-off-by: Andrea Gelmini <andrea.gelmini <at>>
 Documentation/acpi/namespace.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/acpi/namespace.txt b/Documentation/acpi/namespace.txt
index 1860cb3..fa84300 100644
--- a/Documentation/acpi/namespace.txt
+++ b/Documentation/acpi/namespace.txt
 <at>  <at>  -28,7 +28,7  <at>  <at>  Wysocki <rafael.j.wysocki <at>>.
    Description Table) using its first entry, the data within the FADT
    includes various fixed-length entries that describe fixed ACPI features
    of the hardware.  The FADT contains a pointer to the DSDT
-   (Differentiated System Descripition Table).  The XSDT also contains
+   (Differentiated System Description Table).  The XSDT also contains
    entries pointing to possibly multiple SSDTs (Secondary System
    Description Table).



To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo <at>
More majordomo info at

Aleksey Makarov | 20 May 15:03 2016

[PATCH v8 0/4] ACPI: parse the SPCR table

'ARM Server Base Boot Requirements' [1] mentions SPCR (Serial Port Console
Redirection Table) [2] as a mandatory ACPI table that specifies the
configuration of serial console.

Move "earlycon" early_param handling to earlycon.c to parse this option once

Parse SPCR table, setup earlycon and register specified console.

Enable parsing this table on ARM64.  Earlycon should be set up as early as
possible.  ACPI boot tables are mapped in
arch/arm64/kernel/acpi.c:acpi_boot_table_init() called from setup_arch() and
that's where we parse spcr.  So it has to be opted-in per-arch. When
ACPI_SPCR_TABLE is defined initialization of DT earlycon is deferred until the
DT/ACPI decision is done.

Implement console_match() for pl011.

Based on the work by Leif Lindholm [3]
Thanks to Peter Hurley for explaining how this should work.

Should be applied to next-20160520
Tested on QEMU and ThunderX.
SPCR support is included in QEMU's ARM64 mach-virt since 2.4 release.

- rebase to next-20160520
- remove the patch "ACPICA: Headers: Add new constants for the DBG2 ACPI table"
  as it have got to linux-next
- add Acked-by: Greg Kroah-Hartman <gregkh <at>>, Reviewed-by:
  Peter Hurley <peter <at>> (but see below)
(Continue reading)