From patchwork Fri Feb 15 19:43:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 10815779 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 E3C9314E1 for ; Fri, 15 Feb 2019 20:03:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3DCB30426 for ; Fri, 15 Feb 2019 20:03:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D204C3042A; Fri, 15 Feb 2019 20:03:20 +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 3E6D030426 for ; Fri, 15 Feb 2019 20:03:20 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B6927201B0457; Fri, 15 Feb 2019 12:03:19 -0800 (PST) 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=192.55.52.120; helo=mga04.intel.com; envelope-from=dan.j.williams@intel.com; receiver=linux-nvdimm@lists.01.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 100722194EB78 for ; Fri, 15 Feb 2019 11:56:25 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Feb 2019 11:56:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,373,1544515200"; d="scan'208";a="300096946" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga005.jf.intel.com with ESMTP; 15 Feb 2019 11:56:25 -0800 Subject: [PATCH v2 0/6] nfit/ars: Improve polling and short-ARS execution From: Dan Williams To: linux-nvdimm@lists.01.org Date: Fri, 15 Feb 2019 11:43:47 -0800 Message-ID: <155025982726.1043225.15436410616433285475.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: Erwin Tsaur , Krzysztof Rusocki , linux-kernel@vger.kernel.org Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP Changes since v1: [1] * Fix the root poll interval support to avoid a infinite loop condition when the polling is faster than the ARS completion. * Move the introduction of scrub_flags earlier in the series and introduce ARS_POLL to fix the above issue. [1]: https://lists.01.org/pipermail/linux-nvdimm/2019-February/019964.html Reviewed-by: Toshi Kani --- Here is a small pile of updates to better coordinate the Linux ARS state machine with platform-BIOS implementations. Specifically, take advantage of opportunities to run short-ARS whenever the ARS interface is found to be idle at init, always run short-ARS even if no_init_ars is specified, allow root to reset the exponential backoff polling interval for ARS completion, and protect the kernel against the consumption of stale ARS results. --- Dan Williams (6): nfit/ars: Attempt a short-ARS whenever the ARS state is idle at boot nfit/ars: Attempt short-ARS even in the no_init_ars case nfit/ars: Remove ars_start_flags nfit/ars: Introduce scrub_flags nfit/ars: Allow root to busy-poll the ARS state machine nfit/ars: Avoid stale ARS results drivers/acpi/nfit/core.c | 70 ++++++++++++++++++++++++++++++++-------------- drivers/acpi/nfit/nfit.h | 11 +++++-- 2 files changed, 57 insertions(+), 24 deletions(-)