From 209851649dc4f7900a6bfe1de5e2640ab2c7d931 Mon Sep 17 00:00:00 2001 From: Vishal Verma Date: Tue, 27 Oct 2015 16:58:27 -0600 Subject: acpi: nfit: Add support for hot-add Add a .notify callback to the acpi_nfit_driver that gets called on a hotplug event. From this, evaluate the _FIT ACPI method which returns the updated NFIT with handles for the hot-plugged NVDIMM. Iterate over the new NFIT, and add any new tables found, and register/enable the corresponding regions. In the nfit test framework, after normal initialization, update the NFIT with a new hot-plugged NVDIMM, and directly call into the driver to update its view of the available regions. Cc: Dan Williams Cc: Rafael J. Wysocki Cc: Toshi Kani Cc: Elliott, Robert Cc: Jeff Moyer Cc: Cc: Signed-off-by: Vishal Verma Signed-off-by: Dan Williams --- drivers/acpi/nfit.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/acpi/nfit.h') diff --git a/drivers/acpi/nfit.h b/drivers/acpi/nfit.h index 7e740156b9c2..beb4632fe874 100644 --- a/drivers/acpi/nfit.h +++ b/drivers/acpi/nfit.h @@ -48,6 +48,7 @@ enum { struct nfit_spa { struct acpi_nfit_system_address *spa; struct list_head list; + int is_registered; }; struct nfit_dcr { @@ -97,6 +98,7 @@ struct acpi_nfit_desc { struct nvdimm_bus_descriptor nd_desc; struct acpi_table_nfit *nfit; struct mutex spa_map_mutex; + struct mutex init_mutex; struct list_head spa_maps; struct list_head memdevs; struct list_head flushes; -- cgit v1.2.3