aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/nfit/core.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2018-03-22 00:22:34 -0400
committerDan Williams <dan.j.williams@intel.com>2018-03-22 00:39:27 -0400
commit0731de476a37c33485af82d64041c9d193208df8 (patch)
tree994289334020ae59a90f9d62aef6202558a47ea3 /drivers/acpi/nfit/core.c
parent9e694d9c18dde0fa57ec067043b581bd57c9fb65 (diff)
nfit: skip region registration for incomplete control regions
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. Cc: <stable@vger.kernel.org> Fixes: 1f7df6f88b92 ("libnvdimm, nfit: regions (block-data-window...)") Reviewed-by: Toshi Kani <toshi.kani@hpe.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/acpi/nfit/core.c')
-rw-r--r--drivers/acpi/nfit/core.c13
1 files 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,
2578 struct acpi_nfit_system_address *spa = nfit_spa->spa; 2578 struct acpi_nfit_system_address *spa = nfit_spa->spa;
2579 struct nd_blk_region_desc *ndbr_desc; 2579 struct nd_blk_region_desc *ndbr_desc;
2580 struct nfit_mem *nfit_mem; 2580 struct nfit_mem *nfit_mem;
2581 int blk_valid = 0, rc; 2581 int rc;
2582 2582
2583 if (!nvdimm) { 2583 if (!nvdimm) {
2584 dev_err(acpi_desc->dev, "spa%d dimm: %#x not found\n", 2584 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,
2598 if (!nfit_mem || !nfit_mem->bdw) { 2598 if (!nfit_mem || !nfit_mem->bdw) {
2599 dev_dbg(acpi_desc->dev, "spa%d %s missing bdw\n", 2599 dev_dbg(acpi_desc->dev, "spa%d %s missing bdw\n",
2600 spa->range_index, nvdimm_name(nvdimm)); 2600 spa->range_index, nvdimm_name(nvdimm));
2601 } else { 2601 break;
2602 mapping->size = nfit_mem->bdw->capacity;
2603 mapping->start = nfit_mem->bdw->start_address;
2604 ndr_desc->num_lanes = nfit_mem->bdw->windows;
2605 blk_valid = 1;
2606 } 2602 }
2607 2603
2604 mapping->size = nfit_mem->bdw->capacity;
2605 mapping->start = nfit_mem->bdw->start_address;
2606 ndr_desc->num_lanes = nfit_mem->bdw->windows;
2608 ndr_desc->mapping = mapping; 2607 ndr_desc->mapping = mapping;
2609 ndr_desc->num_mappings = blk_valid; 2608 ndr_desc->num_mappings = 1;
2610 ndbr_desc = to_blk_region_desc(ndr_desc); 2609 ndbr_desc = to_blk_region_desc(ndr_desc);
2611 ndbr_desc->enable = acpi_nfit_blk_region_enable; 2610 ndbr_desc->enable = acpi_nfit_blk_region_enable;
2612 ndbr_desc->do_io = acpi_desc->blk_do_io; 2611 ndbr_desc->do_io = acpi_desc->blk_do_io;