Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751912AbdF3Br2 (ORCPT ); Thu, 29 Jun 2017 21:47:28 -0400 Received: from g9t5008.houston.hpe.com ([15.241.48.72]:57157 "EHLO g9t5008.houston.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751333AbdF3Br0 (ORCPT ); Thu, 29 Jun 2017 21:47:26 -0400 From: "Kani, Toshimitsu" To: Dan Williams CC: "Rafael J. Wysocki" , Vishal L Verma , "Knippers, Linda" , "linux-nvdimm@lists.01.org" , Linux ACPI , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v3] acpi/nfit: Issue Start ARS to retrieve existing records Thread-Topic: [PATCH v3] acpi/nfit: Issue Start ARS to retrieve existing records Thread-Index: AQHS50L3HSVE8J+HeUuX5s62QAHN2aI6290AgAHae4A= Date: Fri, 30 Jun 2017 01:47:21 +0000 Message-ID: References: <20170617082218.8955-1-toshi.kani@hpe.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=hpe.com; x-originating-ip: [202.216.21.108] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CS1PR84MB0072;7:wAM2xRbspLIjPsQKCG+zI9yTAqoxjoZ9GPPdWE7GX5Xoafg35d6ehyL2BsiIAZwkGxEpY5yd14blsS/gzOsTwx4Psh+ajfDbrQ1feoYRfQU/b4eYy1/nkE1JLqkhUqsinWJgPom7zaF964xrlzhbx65U8n4Hti4SCRCrhEJ6+0CA7WRO5/lH3VTr+sQoBfJS21kHvO9eGDubGDupXfEfVBmo77bSP+99bstZJfchecqnGtEoRiHXQQJf+DgjRpkiwMNxy69y02JXv1gp3e4X8OWQEP1RQC40HXo1q5rpQmTNUg372RfxGH6O6ffxQT8vVQcbrPTGFYWwc9aXKHvGrpAEDYEi2kPEaefA/0lFDxZGIDpUFnOcTqkyqWWy/jnjasjC4vZgP8MMttGVPGgxgV9i4seT26j58hFqCGmY1YjxVYc+Tfx4hLr3xjRsFsJ3GKu8Q1/Pl8LPV/Fbekp3nKCQAKDjD4n3JQY+/lLW23sORUHCuKKXd6XgEOMFrFScuW+8ftgPCygenI+CNAEOfq/07aRq9jgg28+YMXqgYlcn4raAyMngP5NE61vedpcfn1uGB0SMzX6g1rnwAS2EkxYq+4fgAFLb7yDJf8l/jxsrHyCqEI3y9yRseSA6HANwcv5LGesaBUIA9apxGIQ1GRoNgU5zFsQ5WQdZnrFhHDgXYZHzYW5E+mro5d6HIF4KqqKSjs/qKlrb4vGXWEVNA6hhdEZeDsB2AUbUhPoYfXWsiiYaXPhBWmiRUAD5acLdBod9IFNL/KWkTrVSgPc4vXNCR8xn8xacW5isPYgDTq8= x-forefront-antispam-report: SFV:SKI;SCL:-1SFV:NSPM;SFS:(10019020)(6009001)(39840400002)(39400400002)(39450400003)(39410400002)(39860400002)(39850400002)(478600001)(189998001)(14454004)(7736002)(2900100001)(8676002)(33656002)(81166006)(6916009)(5660300001)(76176999)(54356999)(50986999)(25786009)(4326008)(966005)(77096006)(6116002)(102836003)(74316002)(305945005)(3846002)(2950100002)(6306002)(8936002)(86362001)(2906002)(9686003)(7696004)(38730400002)(54906002)(3660700001)(110136004)(6506006)(55016002)(53936002)(3280700002)(6436002)(66066001)(6246003);DIR:OUT;SFP:1102;SCL:1;SRVR:CS1PR84MB0072;H:CS1PR84MB0104.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;MLV:sfv;LANG:en; x-ms-office365-filtering-correlation-id: c886c9e6-ea29-49c5-b5ec-08d4bf59f367 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(48565401081)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CS1PR84MB0072; x-ms-traffictypediagnostic: CS1PR84MB0072: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(133145235818549)(236129657087228)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123555025)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CS1PR84MB0072;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CS1PR84MB0072; x-forefront-prvs: 0354B4BED2 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jun 2017 01:47:22.0254 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR84MB0072 X-OriginatorOrg: hpe.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v5U1lXqh007807 Content-Length: 2728 Lines: 70 > > ACPI 6.2 defines in section 9.20.7.2 that the OSPM may call a Start > > ARS with Flags Bit [1] set upon receiving the 0x81 notification. > > > > Upon receiving the notification, the OSPM may decide to issue > > a Start ARS with Flags Bit [1] set to prepare for the retrieval > > of existing records and issue the Query ARS Status function to > > retrieve the records. > > > > Add support to call a Start ARS from acpi_nfit_uc_error_notify() > > with ND_ARS_RETURN_PREV_DATA set when HW_ERROR_SCRUB_ON is not > set. > > > > Link: http://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf > > Signed-off-by: Toshi Kani > > Cc: Dan Williams > > Cc: Rafael J. Wysocki > > Cc: Vishal Verma > > Cc: Linda Knippers > > --- > > v3 (2/2): Add flags info to acpi_nfit_desc (Dan Williams) > > --- > > drivers/acpi/nfit/core.c | 11 ++++++++--- > > drivers/acpi/nfit/mce.c | 2 +- > > drivers/acpi/nfit/nfit.h | 3 ++- > > include/uapi/linux/ndctl.h | 1 + > > 4 files changed, 12 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c > > index cc22778..7e08ee0 100644 > > --- a/drivers/acpi/nfit/core.c > > +++ b/drivers/acpi/nfit/core.c > > @@ -1031,7 +1031,7 @@ static ssize_t scrub_store(struct device *dev, > > if (nd_desc) { > > struct acpi_nfit_desc *acpi_desc = to_acpi_desc(nd_desc); > > > > - rc = acpi_nfit_ars_rescan(acpi_desc); > > + rc = acpi_nfit_ars_rescan(acpi_desc, 0); > > } > > device_unlock(dev); > > if (rc) > > @@ -2051,6 +2051,7 @@ static int ars_start(struct acpi_nfit_desc *acpi_desc, > struct nfit_spa *nfit_spa > > memset(&ars_start, 0, sizeof(ars_start)); > > ars_start.address = spa->address; > > ars_start.length = spa->length; > > + ars_start.flags = acpi_desc->ars_start_flags; > > Hmm don't we also need a statement like this in ars_continue()? Good point. Will set flags in ars_continue(). > > if (nfit_spa_type(spa) == NFIT_SPA_PM) > > ars_start.type = ND_ARS_PERSISTENT; > > else if (nfit_spa_type(spa) == NFIT_SPA_VOLATILE) > > @@ -2613,6 +2614,7 @@ static int acpi_nfit_register_regions(struct > acpi_nfit_desc *acpi_desc) > > return rc; > > } > > > > + acpi_desc->ars_start_flags = 0; > > ...and I would think the ND_ARS_RETURN_PREV_DATA context would only be > valid for the duration of the current scrub, so we should clear the > flags at the end of acpi_nfit_scrub(). Agreed. Thanks! -Toshi