aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dmi.h
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2018-03-12 14:24:29 -0400
committerBorislav Petkov <bp@suse.de>2018-03-14 07:49:53 -0400
commit6deae96b42eb1fa84938088087de0bd748f53093 (patch)
tree99e1f531833a9d88655196e02d24e320788085b5 /include/linux/dmi.h
parent23222f8f8dce6a6d014bc5b7107a83ebe2a9c022 (diff)
firmware, DMI: Add function to look up a handle and return DIMM size
When we first scan the SMBIOS table, save the size of the DIMM. Provide a function for other code (EDAC driver) to look up the size of a DIMM from its SMBIOS handle. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Tony Luck <tony.luck@intel.com> Cc: Aristeu Rozanski <aris@redhat.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Len Brown <lenb@kernel.org> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: linux-acpi@vger.kernel.org Cc: linux-nvdimm@lists.01.org Link: http://lkml.kernel.org/r/20180312182430.10335-5-tony.luck@intel.com Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'include/linux/dmi.h')
-rw-r--r--include/linux/dmi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/dmi.h b/include/linux/dmi.h
index 46e151172d95..7f5929123b69 100644
--- a/include/linux/dmi.h
+++ b/include/linux/dmi.h
@@ -113,6 +113,7 @@ extern int dmi_walk(void (*decode)(const struct dmi_header *, void *),
113 void *private_data); 113 void *private_data);
114extern bool dmi_match(enum dmi_field f, const char *str); 114extern bool dmi_match(enum dmi_field f, const char *str);
115extern void dmi_memdev_name(u16 handle, const char **bank, const char **device); 115extern void dmi_memdev_name(u16 handle, const char **bank, const char **device);
116extern u64 dmi_memdev_size(u16 handle);
116 117
117#else 118#else
118 119
@@ -142,6 +143,7 @@ static inline bool dmi_match(enum dmi_field f, const char *str)
142 { return false; } 143 { return false; }
143static inline void dmi_memdev_name(u16 handle, const char **bank, 144static inline void dmi_memdev_name(u16 handle, const char **bank,
144 const char **device) { } 145 const char **device) { }
146static inline u64 dmi_memdev_size(u16 handle) { return ~0ul; }
145static inline const struct dmi_system_id * 147static inline const struct dmi_system_id *
146 dmi_first_match(const struct dmi_system_id *list) { return NULL; } 148 dmi_first_match(const struct dmi_system_id *list) { return NULL; }
147 149