diff options
author | Mark Brown <broonie@kernel.org> | 2020-10-06 17:19:24 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-10-06 17:19:24 +0200 |
commit | fd6b519a30a7179026d22c98d6bf10bb5ca8ca27 (patch) | |
tree | e4a6bc4d8548a5b8db7148a18eb257b84e72d48b /drivers/edac/ghes_edac.c | |
parent | Merge series "ASoC: Intel: Remove obsolete solutions and components" from Cez... (diff) | |
parent | Linux 5.9-rc5 (diff) | |
download | linux-fd6b519a30a7179026d22c98d6bf10bb5ca8ca27.tar.xz linux-fd6b519a30a7179026d22c98d6bf10bb5ca8ca27.zip |
Merge tag 'v5.9-rc5' into asoc-5.10
Linux 5.9-rc5
Diffstat (limited to 'drivers/edac/ghes_edac.c')
-rw-r--r-- | drivers/edac/ghes_edac.c | 10 |
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; |