Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752516AbdFQArk (ORCPT ); Fri, 16 Jun 2017 20:47:40 -0400 Received: from g2t2352.austin.hpe.com ([15.233.44.25]:21603 "EHLO g2t2352.austin.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752323AbdFQArh (ORCPT ); Fri, 16 Jun 2017 20:47:37 -0400 From: "Kani, Toshimitsu" To: Dan Williams CC: "Rafael J. Wysocki" , "Verma, Vishal L" , "Knippers, Linda" , "linux-nvdimm@lists.01.org" , Linux ACPI , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v2 2/2] acpi/nfit: Issue Start ARS to retrieve existing records Thread-Topic: [PATCH v2 2/2] acpi/nfit: Issue Start ARS to retrieve existing records Thread-Index: AQHS4IZRMg43qIj9PEqfNzKR8/MwJKImhfEAgAGvE8CAAAYRgIAACa0A Date: Sat, 17 Jun 2017 00:47:03 +0000 Message-ID: References: <20170608183658.24731-1-toshi.kani@hpe.com> <20170608183658.24731-3-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: [106.143.130.118] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CS1PR84MB0069;7:w3qB0c9hmiloxj5W/XeqrcdhJotnCy21rCK7Ux1V2nj1haGrU39jLzK5FdpXiqPOAfTjTUqDKr3Y1XJFQkVdsm98Y7xreoNj1RRj4wzRQLldb6fVSiAP39vBzPbZ+/3lpC90k2f4c0dNL/Ow72E+qRV1+E/PI/Ea39i01tzz+9BXbkGlPMUr2cj5Sm/ATthp+CIhBEr7KOCDTUWqtgy66065h854/DBUuZZjHec6JeFch0vFXFteQO4zXmlseH5Rmds0p7mtGp+gH0KuYfw/pqZ3SfjjSlOuChi8f7Ryp8Xkgu+abc+QxqXvKk8Vt1mrmAELeUMA2+k3z1EH3jMDdDxVuXdjuBUT7dDzCUP1VuTu85pSUXfvwLGB4eFNBKZkOS23aL6qf65OjX+msv9ucve0w9HQ9L92wguXZAjPTJUXJ75jOkJXoqyDu55NeWHYhchS0JV1Mr1sU+1jpz306ojAwxWRckAWRasiUirWSdxpPJBwsSHCazb1tOfNaWhjW6BpCpk1k7rkrkdpT+mmtoHWiNKFfYClNuTtLZh9xMChDiJzCth/fRCVlWhrhZ3FMz9duZbvNKlhvt5stsvvlN5Ez1r0UHL49x8SZDmbUhO4yQKdl2f4bVvxzrpSjddOtGMp8cNvOpxlO9QKlnnotB5zvl47gb9lhzhfn7bdo55N9IDsDtLJZ/1mnV48bw+VuShHh4bBIa25/0+EFJJwcNfcQp50eBUtU5uUKHnEdKRj2J4whyO8ncs9axFd8Oi9LNQ4iWG6GfV1e0jwb1dBE9oFyW+lMS1PvKMifhFQapA= x-forefront-antispam-report: SFV:SKI;SCL:-1SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(39850400002)(39410400002)(39400400002)(39450400003)(39840400002)(377454003)(24454002)(6116002)(8676002)(229853002)(93886004)(6506006)(81166006)(2950100002)(3846002)(102836003)(2900100001)(7696004)(478600001)(6916009)(122556002)(14454004)(50986999)(54356999)(76176999)(2906002)(53546009)(25786009)(5660300001)(33656002)(66066001)(77096006)(8936002)(305945005)(4326008)(3660700001)(3280700002)(38730400002)(110136004)(7736002)(86362001)(55016002)(9686003)(54906002)(74316002)(6246003)(53936002)(6436002)(189998001);DIR:OUT;SFP:1102;SCL:1;SRVR:CS1PR84MB0069;H:CS1PR84MB0104.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;MLV:sfv;LANG:en; x-ms-office365-filtering-correlation-id: 02d94e21-4b5f-4e9c-fe82-08d4b51a5f12 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081);SRVR:CS1PR84MB0069; x-ms-traffictypediagnostic: CS1PR84MB0069: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6055026)(6041248)(20161123558100)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CS1PR84MB0069;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CS1PR84MB0069; x-forefront-prvs: 034119E4F6 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jun 2017 00:47:03.4002 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR84MB0069 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 v5H0lk0I018341 Content-Length: 1775 Lines: 42 > On Fri, Jun 16, 2017 at 5:01 PM, Kani, Toshimitsu wrote: > >> > --- 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) > >> > @@ -2057,6 +2057,10 @@ static int ars_start(struct acpi_nfit_desc > >> *acpi_desc, struct nfit_spa *nfit_spa > >> > ars_start.type = ND_ARS_VOLATILE; > >> > else > >> > return -ENOTTY; > >> > + if (nfit_spa->ars_prev_data) { > >> > + ars_start.flags |= ND_ARS_RETURN_PREV_DATA; > >> > + nfit_spa->ars_prev_data = 0; > >> > + } > >> > >> I'd rather you plumb a new 'flags' parameter all the way through from > >> acpi_nfit_ars_rescan() to ars_start() rather than carrying this as a > >> property of nfit_spa. > > > > Yes, I wanted to carry 'flags' all the way, but since acpi_nfit_ars_rescan() > > calls acpi_nfit_scrub() via acpi_desc->work, all info needs to be marshalled > > into struct acpi_nfit_desc. Using nfit_spa allows a request to be carried as > > per-spa basis... > > Ah ok, but I still think it does not belong to a spa. This is control > / context information for the workqueue and that belongs with > acpi_nfit_desc. It think it's fine if all spas get re-scrubbed with > the "prev_data" flag in the the notification case. Sounds good. I will add the flags info to acpi_nfit_desc and update this patch. Thanks! -Toshi