summaryrefslogtreecommitdiffstats
path: root/drivers/edac/ghes_edac.c
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2020-09-11 15:54:30 +0100
committerMarc Zyngier <maz@kernel.org>2020-09-11 15:54:30 +0100
commitae8bd85ca8a4a812721388ab85b3d67077951f52 (patch)
treeb01af045e7352464aa5ede530dc772dc52e5907e /drivers/edac/ghes_edac.c
parent7b75cd5128421c673153efb1236705696a1a9812 (diff)
parentc9b69a0cf0b4336fe7d2e35c46273debc68910fd (diff)
downloadlinux-ae8bd85ca8a4a812721388ab85b3d67077951f52.tar.gz
linux-ae8bd85ca8a4a812721388ab85b3d67077951f52.tar.bz2
linux-ae8bd85ca8a4a812721388ab85b3d67077951f52.zip
Merge branch 'kvm-arm64/pt-new' into kvmarm-master/next
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'drivers/edac/ghes_edac.c')
-rw-r--r--drivers/edac/ghes_edac.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
index da60c29468a7..54ebc8afc6b1 100644
--- a/drivers/edac/ghes_edac.c
+++ b/drivers/edac/ghes_edac.c
@@ -55,6 +55,8 @@ static DEFINE_SPINLOCK(ghes_lock);
static bool __read_mostly force_load;
module_param(force_load, bool, 0);
+static bool system_scanned;
+
/* Memory Device - Type 17 of SMBIOS spec */
struct memdev_dmi_entry {
u8 type;
@@ -225,14 +227,12 @@ static void enumerate_dimms(const struct dmi_header *dh, void *arg)
static void ghes_scan_system(void)
{
- static bool scanned;
-
- if (scanned)
+ if (system_scanned)
return;
dmi_walk(enumerate_dimms, &ghes_hw);
- scanned = true;
+ system_scanned = true;
}
void ghes_edac_report_mem_error(int sev, struct cper_sec_mem_err *mem_err)
@@ -631,6 +631,8 @@ void ghes_edac_unregister(struct ghes *ghes)
mutex_lock(&ghes_reg_mutex);
+ system_scanned = false;
+
if (!refcount_dec_and_test(&ghes_refcount))
goto unlock;