From patchwork Thu Sep 27 04:24:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 10617203 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 867C914BD for ; Thu, 27 Sep 2018 04:36:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7427E2B245 for ; Thu, 27 Sep 2018 04:36:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67D412B248; Thu, 27 Sep 2018 04:36:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 201332B246 for ; Thu, 27 Sep 2018 04:36:09 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C0ED22115990F; Wed, 26 Sep 2018 21:36:09 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=dan.j.williams@intel.com; receiver=linux-nvdimm@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 36C9321159902 for ; Wed, 26 Sep 2018 21:36:08 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2018 21:36:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,308,1534834800"; d="scan'208";a="76269216" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga007.jf.intel.com with ESMTP; 26 Sep 2018 21:36:08 -0700 Subject: [PATCH 0/3] acpi, nfit: Add dirty shutdown count to sysfs From: Dan Williams To: linux-nvdimm@lists.01.org Date: Wed, 26 Sep 2018 21:24:20 -0700 Message-ID: <153802226065.833068.11943510429252969385.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-2-gc94f MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-acpi@vger.kernel.org Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP The Intel NVDIMM command specification publishes a dirty-shutdown-count in addition to the dirty-shutdown / flush-failed indication that comes from the ACPI NFIT. This is expected to be a common property of NVDIMMs and is a static hardware health detail to be cached / exported via sysfs. Add plumbing for retrieving this data at driver load time, publish the count, and use the dynamically retrieved dirty-shutdown indicator to augment the existing 'flush_failed' flag. --- Dan Williams (3): acpi, nfit: Introduce nfit_mem flags acpi, nfit: Collect shutdown status tools/testing/nvdimm: Populate dirty shutdown data drivers/acpi/nfit/core.c | 115 ++++++++++++++++++++++++++++----- drivers/acpi/nfit/intel.h | 34 ++++++++++ drivers/acpi/nfit/nfit.h | 11 +++ tools/testing/nvdimm/Kbuild | 1 tools/testing/nvdimm/acpi_nfit_test.c | 8 ++ tools/testing/nvdimm/test/nfit.c | 3 + tools/testing/nvdimm/test/nfit_test.h | 24 ------- 7 files changed, 152 insertions(+), 44 deletions(-)