From patchwork Mon Jan 4 22:34:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Verma, Vishal L" X-Patchwork-Id: 7951891 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0A6BB9F1C0 for ; Mon, 4 Jan 2016 22:35:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4387D20303 for ; Mon, 4 Jan 2016 22:35:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6984820320 for ; Mon, 4 Jan 2016 22:35:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752265AbcADWfH (ORCPT ); Mon, 4 Jan 2016 17:35:07 -0500 Received: from mga01.intel.com ([192.55.52.88]:33291 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752012AbcADWfF (ORCPT ); Mon, 4 Jan 2016 17:35:05 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 04 Jan 2016 14:35:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,522,1444719600"; d="scan'208";a="883735430" Received: from omniknight.lm.intel.com ([10.232.112.62]) by orsmga002.jf.intel.com with ESMTP; 04 Jan 2016 14:35:04 -0800 From: Vishal Verma To: linux-nvdimm@lists.01.org Cc: Vishal Verma , linux-acpi@vger.kernel.org, Dan Williams , Jeff Moyer , Linda Knippers Subject: [PATCH] nfit: add a module parameter to ignore ars errors Date: Mon, 4 Jan 2016 15:34:43 -0700 Message-Id: <1451946883-28092-1-git-send-email-vishal.l.verma@intel.com> X-Mailer: git-send-email 2.5.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Normally, if a platform does not advertise support for Address Range Scrub (ARS), we skip it. But if ARS is advertised, it is expected to always succeed. If it fails, we normally fail initialization at that point. Add a module parameter to nfit that lets it ignore ARS failures and continue with initialization for debugging. Signed-off-by: Vishal Verma --- This applies on top of both of the previous error handling series (badblocks and libnvdimm poison list). The tree at: https://git.kernel.org/cgit/linux/kernel/git/vishal/nvdimm.git/log/?h=err_handling_latest has been updated with this patch. drivers/acpi/nfit.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c index ad6d8c6..0a152f1 100644 --- a/drivers/acpi/nfit.c +++ b/drivers/acpi/nfit.c @@ -34,6 +34,10 @@ static bool force_enable_dimms; module_param(force_enable_dimms, bool, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(force_enable_dimms, "Ignore _STA (ACPI DIMM device) status"); +static bool ignore_ars; +module_param(ignore_ars, bool, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(ignore_ars, "Ignore ARS (Address Range Scrub) failures"); + struct nfit_table_prev { struct list_head spas; struct list_head memdevs; @@ -1786,7 +1790,10 @@ static int acpi_nfit_register_region(struct acpi_nfit_desc *acpi_desc, dev_err(acpi_desc->dev, "error while performing ARS to find poison: %d\n", rc); - return rc; + if (ignore_ars) + ; /* continue initialization */ + else + return rc; } if (!nvdimm_pmem_region_create(nvdimm_bus, ndr_desc)) return -ENOMEM;