From 23222f8f8dce6a6d014bc5b7107a83ebe2a9c022 Mon Sep 17 00:00:00 2001 From: Tony Luck Date: Mon, 12 Mar 2018 11:24:28 -0700 Subject: acpi, nfit: Add function to look up nvdimm device and provide SMBIOS handle EDAC driver needs to look up attributes of NVDIMMs provided in SMBIOS. Provide a function that looks up an acpi_nfit_memory_map from a device handle (node/socket/mc/channel/dimm) and returns the SMBIOS handle. Also pass back the "flags" so we can see if the NVDIMM is OK. Acked-by: Dan Williams Signed-off-by: Tony Luck Cc: "Rafael J. Wysocki" Cc: Aristeu Rozanski Cc: Dan Williams Cc: Erik Schmauss Cc: Jean Delvare Cc: Len Brown Cc: Mauro Carvalho Chehab Cc: Qiuxu Zhuo Cc: Robert Moore Cc: devel@acpica.org Cc: linux-acpi@vger.kernel.org Cc: linux-nvdimm@lists.01.org Link: http://lkml.kernel.org/r/20180312182430.10335-4-tony.luck@intel.com Signed-off-by: Borislav Petkov --- include/acpi/nfit.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 include/acpi/nfit.h (limited to 'include/acpi/nfit.h') diff --git a/include/acpi/nfit.h b/include/acpi/nfit.h new file mode 100644 index 000000000000..86ed07c1200d --- /dev/null +++ b/include/acpi/nfit.h @@ -0,0 +1,18 @@ +/* + * SPDX-License-Identifier: GPL-2.0 + * Copyright (C) 2018 Intel Corporation + */ + +#ifndef __ACPI_NFIT_H +#define __ACPI_NFIT_H + +#if IS_ENABLED(CONFIG_ACPI_NFIT) +int nfit_get_smbios_id(u32 device_handle, u16 *flags); +#else +static inline int nfit_get_smbios_id(u32 device_handle, u16 *flags) +{ + return -EOPNOTSUPP; +} +#endif + +#endif /* __ACPI_NFIT_H */ -- cgit v1.2.3-59-g8ed1b