* [PATCH] nfit: skip region registration for incomplete control regions
@ 2018-03-22 4:42 Dan Williams
2018-03-22 19:58 ` Kani, Toshi
0 siblings, 1 reply; 2+ messages in thread
From: Dan Williams @ 2018-03-22 4:42 UTC (permalink / raw)
To: linux-nvdimm; +Cc: linux-acpi, linux-kernel
Per the ACPI specification the only functional purpose for a DIMM
Control Region to be mapped into the system physical address space, from
an OSPM perspective, is to support block-apertures. However, there are
some BIOSen that publish DIMM Control Region SPA entries for pre-boot
environment consumption. Undo the kernel policy of generating disabled
'ndblk' regions when this configuration is detected.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
drivers/acpi/nfit/core.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
index 39ad06143e78..4530d89044db 100644
--- a/drivers/acpi/nfit/core.c
+++ b/drivers/acpi/nfit/core.c
@@ -2578,7 +2578,7 @@ static int acpi_nfit_init_mapping(struct acpi_nfit_desc *acpi_desc,
struct acpi_nfit_system_address *spa = nfit_spa->spa;
struct nd_blk_region_desc *ndbr_desc;
struct nfit_mem *nfit_mem;
- int blk_valid = 0, rc;
+ int rc;
if (!nvdimm) {
dev_err(acpi_desc->dev, "spa%d dimm: %#x not found\n",
@@ -2598,15 +2598,14 @@ static int acpi_nfit_init_mapping(struct acpi_nfit_desc *acpi_desc,
if (!nfit_mem || !nfit_mem->bdw) {
dev_dbg(acpi_desc->dev, "spa%d %s missing bdw\n",
spa->range_index, nvdimm_name(nvdimm));
- } else {
- mapping->size = nfit_mem->bdw->capacity;
- mapping->start = nfit_mem->bdw->start_address;
- ndr_desc->num_lanes = nfit_mem->bdw->windows;
- blk_valid = 1;
+ break;
}
+ mapping->size = nfit_mem->bdw->capacity;
+ mapping->start = nfit_mem->bdw->start_address;
+ ndr_desc->num_lanes = nfit_mem->bdw->windows;
ndr_desc->mapping = mapping;
- ndr_desc->num_mappings = blk_valid;
+ ndr_desc->num_mappings = 1;
ndbr_desc = to_blk_region_desc(ndr_desc);
ndbr_desc->enable = acpi_nfit_blk_region_enable;
ndbr_desc->do_io = acpi_desc->blk_do_io;
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nfit: skip region registration for incomplete control regions
2018-03-22 4:42 [PATCH] nfit: skip region registration for incomplete control regions Dan Williams
@ 2018-03-22 19:58 ` Kani, Toshi
0 siblings, 0 replies; 2+ messages in thread
From: Kani, Toshi @ 2018-03-22 19:58 UTC (permalink / raw)
To: dan.j.williams, linux-nvdimm; +Cc: linux-acpi, linux-kernel
On Wed, 2018-03-21 at 21:42 -0700, Dan Williams wrote:
> Per the ACPI specification the only functional purpose for a DIMM
> Control Region to be mapped into the system physical address space, from
> an OSPM perspective, is to support block-apertures. However, there are
> some BIOSen that publish DIMM Control Region SPA entries for pre-boot
> environment consumption. Undo the kernel policy of generating disabled
> 'ndblk' regions when this configuration is detected.
>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
The change looks good.
Reviewed-by: Toshi Kani <toshi.kani@hpe.com>
Thanks!
-Toshi
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-22 19:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-22 4:42 [PATCH] nfit: skip region registration for incomplete control regions Dan Williams
2018-03-22 19:58 ` Kani, Toshi
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).