From: Dave Jiang <dave.jiang@intel.com>
To: Dan Williams <dan.j.williams@intel.com>, linux-nvdimm@lists.01.org
Cc: stable@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH 1/6] nfit: fix region registration vs block-data-window ranges
Date: Tue, 3 Apr 2018 08:30:46 -0700 [thread overview]
Message-ID: <1bda9083-5066-c577-ac2d-02eb518fcbbe@intel.com> (raw)
In-Reply-To: <152273076649.38372.8379231668189794225.stgit@dwillia2-desk3.amr.corp.intel.com>
On 4/2/2018 9:46 PM, Dan Williams wrote:
> Commit 1cf03c00e7c1 "nfit: scrub and register regions in a workqueue"
> mistakenly attempts to register a region per BLK aperture. There is
> nothing to register for individual apertures as they belong as a set to
> a BLK aperture group that are registered with a corresponding
> DIMM-control-region. Filter them for registration to prevent some
> needless devm_kzalloc() allocations.
>
> Cc: <stable@vger.kernel.org>
> Fixes: 1cf03c00e7c1 ("nfit: scrub and register regions in a workqueue")
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/acpi/nfit/core.c | 22 ++++++++++++++--------
> 1 file changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
> index 12fb414fa678..ea9f3e727fef 100644
> --- a/drivers/acpi/nfit/core.c
> +++ b/drivers/acpi/nfit/core.c
> @@ -3018,15 +3018,21 @@ static void acpi_nfit_scrub(struct work_struct *work)
> static int acpi_nfit_register_regions(struct acpi_nfit_desc *acpi_desc)
> {
> struct nfit_spa *nfit_spa;
> - int rc;
>
> - list_for_each_entry(nfit_spa, &acpi_desc->spas, list)
> - if (nfit_spa_type(nfit_spa->spa) == NFIT_SPA_DCR) {
> - /* BLK regions don't need to wait for ars results */
> - rc = acpi_nfit_register_region(acpi_desc, nfit_spa);
> - if (rc)
> - return rc;
> - }
> + list_for_each_entry(nfit_spa, &acpi_desc->spas, list) {
> + int rc, type = nfit_spa_type(nfit_spa->spa);
> +
> + /* PMEM and VMEM will be registered by the ARS workqueue */
> + if (type == NFIT_SPA_PM || type == NFIT_SPA_VOLATILE)
> + continue;
> + /* BLK apertures belong to BLK region registration below */
> + if (type == NFIT_SPA_BDW)
> + continue;
> + /* BLK regions don't need to wait for ARS results */
> + rc = acpi_nfit_register_region(acpi_desc, nfit_spa);
> + if (rc)
> + return rc;
> + }
>
> acpi_desc->ars_start_flags = 0;
> if (!acpi_desc->cancel)
>
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
next prev parent reply other threads:[~2018-04-03 15:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 4:46 [PATCH 0/6] nfit, address-range-scrub: rework and fixes Dan Williams
2018-04-03 4:46 ` [PATCH 1/6] nfit: fix region registration vs block-data-window ranges Dan Williams
2018-04-03 15:30 ` Dave Jiang [this message]
[not found] ` <152273076649.38372.8379231668189794225.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-04-06 20:05 ` Sasha Levin
2018-04-03 4:46 ` [PATCH 2/6] nfit, address-range-scrub: fix scrub in-progress reporting Dan Williams
2018-04-03 15:31 ` Dave Jiang
[not found] ` <152273077198.38372.11857145045474104173.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-04-06 20:05 ` Sasha Levin
2018-04-03 4:46 ` [PATCH 3/6] libnvdimm: add an api to cast a 'struct nd_region' to its 'struct device' Dan Williams
2018-04-03 15:31 ` Dave Jiang
2018-04-03 4:46 ` [PATCH 4/6] nfit, address-range-scrub: introduce nfit_spa->ars_state Dan Williams
2018-04-03 15:31 ` Dave Jiang
2018-04-03 4:46 ` [PATCH 5/6] nfit, address-range-scrub: rework and simplify ARS state machine Dan Williams
2018-04-03 15:29 ` Dave Jiang
2018-04-03 15:33 ` Dan Williams
2018-04-04 16:26 ` Kani, Toshi
2018-04-04 17:08 ` Dan Williams
2018-04-03 4:46 ` [PATCH 6/6] nfit, address-range-scrub: add module option to skip initial ars Dan Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1bda9083-5066-c577-ac2d-02eb518fcbbe@intel.com \
--to=dave.jiang@intel.com \
--cc=dan.j.williams@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).