diff options
author | Borislav Petkov <bp@suse.de> | 2020-12-14 20:47:11 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2020-12-28 19:36:17 +0100 |
commit | 2a28ceef00bac65d6bb1757002f742806837e100 (patch) | |
tree | ab005fe2aec0cfc4ed5aa1313db5fb82898b7b2d /drivers/edac/amd64_edac_dbg.c | |
parent | EDAC/amd64: Tone down messages about missing PCI IDs (diff) | |
download | linux-2a28ceef00bac65d6bb1757002f742806837e100.tar.xz linux-2a28ceef00bac65d6bb1757002f742806837e100.zip |
EDAC/amd64: Merge sysfs debugging attributes setup code
There's no need for them to be in a separate file so merge them into the
main driver compilation unit like the other EDAC drivers do.
Drop now-unneeded function export, make the function static and shorten
static function names.
No functional changes.
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
Link: https://lkml.kernel.org/r/20201215110517.5215-1-bp@alien8.de
Diffstat (limited to 'drivers/edac/amd64_edac_dbg.c')
-rw-r--r-- | drivers/edac/amd64_edac_dbg.c | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/drivers/edac/amd64_edac_dbg.c b/drivers/edac/amd64_edac_dbg.c deleted file mode 100644 index 393be3351493..000000000000 --- a/drivers/edac/amd64_edac_dbg.c +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -#include "amd64_edac.h" - -#define EDAC_DCT_ATTR_SHOW(reg) \ -static ssize_t amd64_##reg##_show(struct device *dev, \ - struct device_attribute *mattr, \ - char *data) \ -{ \ - struct mem_ctl_info *mci = to_mci(dev); \ - struct amd64_pvt *pvt = mci->pvt_info; \ - return sprintf(data, "0x%016llx\n", (u64)pvt->reg); \ -} - -EDAC_DCT_ATTR_SHOW(dhar); -EDAC_DCT_ATTR_SHOW(dbam0); -EDAC_DCT_ATTR_SHOW(top_mem); -EDAC_DCT_ATTR_SHOW(top_mem2); - -static ssize_t amd64_hole_show(struct device *dev, - struct device_attribute *mattr, - char *data) -{ - struct mem_ctl_info *mci = to_mci(dev); - - u64 hole_base = 0; - u64 hole_offset = 0; - u64 hole_size = 0; - - amd64_get_dram_hole_info(mci, &hole_base, &hole_offset, &hole_size); - - return sprintf(data, "%llx %llx %llx\n", hole_base, hole_offset, - hole_size); -} - -/* - * update NUM_DBG_ATTRS in case you add new members - */ -static DEVICE_ATTR(dhar, S_IRUGO, amd64_dhar_show, NULL); -static DEVICE_ATTR(dbam, S_IRUGO, amd64_dbam0_show, NULL); -static DEVICE_ATTR(topmem, S_IRUGO, amd64_top_mem_show, NULL); -static DEVICE_ATTR(topmem2, S_IRUGO, amd64_top_mem2_show, NULL); -static DEVICE_ATTR(dram_hole, S_IRUGO, amd64_hole_show, NULL); - -static struct attribute *amd64_edac_dbg_attrs[] = { - &dev_attr_dhar.attr, - &dev_attr_dbam.attr, - &dev_attr_topmem.attr, - &dev_attr_topmem2.attr, - &dev_attr_dram_hole.attr, - NULL -}; - -const struct attribute_group amd64_edac_dbg_group = { - .attrs = amd64_edac_dbg_attrs, -}; |