[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240214111555.GHZcyg6y_CdpA42a91@fat_crate.local>
Date: Wed, 14 Feb 2024 12:15:55 +0100
From: Borislav Petkov <bp@...en8.de>
To: Yazen Ghannam <yazen.ghannam@....com>
Cc: tony.luck@...el.com, linux-edac@...r.kernel.org,
linux-kernel@...r.kernel.org, avadhut.naik@....com,
john.allen@....com, muralidhara.mk@....com,
naveenkrishna.chatradhi@....com, sathyapriya.k@....com
Subject: Re: [PATCH 2/2] RAS: Introduce the FRU Memory Poison Manager
On Tue, Feb 13, 2024 at 09:35:16PM -0600, Yazen Ghannam wrote:
> +static bool has_valid_entries(u64 valid_bits)
> +{
> + if (!(valid_bits & FMP_VALID_LIST_ENTRIES))
> + return false;
> +
> + if (!(valid_bits & FMP_VALID_LIST))
> + return false;
> +
> + return true;
> +}
Rename:
diff --git a/drivers/ras/amd/fmpm.c b/drivers/ras/amd/fmpm.c
index 090b60d269e7..3da3f40f1efe 100644
--- a/drivers/ras/amd/fmpm.c
+++ b/drivers/ras/amd/fmpm.c
@@ -221,7 +221,7 @@ static int update_record_on_storage(struct fru_rec *rec)
return ret;
}
-static bool has_valid_entries(struct fru_rec *rec)
+static bool rec_has_valid_entries(struct fru_rec *rec)
{
if (!(rec->fmp.validation_bits & FMP_VALID_LIST_ENTRIES))
return false;
@@ -286,7 +286,7 @@ static void update_fru_record(struct fru_rec *rec, struct mce *m)
fpd.addr = m->addr;
/* This is the first entry, so just save it. */
- if (!has_valid_entries(rec))
+ if (!rec_has_valid_entries(rec))
goto save_fpd;
/* Ignore already recorded errors. */
@@ -397,7 +397,7 @@ static void retire_mem_records(void)
for_each_fru(i, rec) {
fmp = &rec->fmp;
- if (!has_valid_entries(rec))
+ if (!rec_has_valid_entries(rec))
continue;
cpu = get_cpu_from_fru_id(fmp->fru_id);
---
and this one:
---
diff --git a/drivers/ras/amd/fmpm.c b/drivers/ras/amd/fmpm.c
index 3da3f40f1efe..813cc6a4f435 100644
--- a/drivers/ras/amd/fmpm.c
+++ b/drivers/ras/amd/fmpm.c
@@ -255,12 +255,12 @@ static bool same_fpd(struct cper_fru_poison_desc *old, struct cper_fru_poison_de
return true;
}
-static bool is_dup_fpd(struct fru_rec *rec, struct cper_fru_poison_desc *new)
+static bool rec_has_fpd(struct fru_rec *rec, struct cper_fru_poison_desc *fpd)
{
unsigned int i;
for (i = 0; i < rec->fmp.nr_entries; i++) {
- if (same_fpd(get_fpd(rec, i), new)) {
+ if (same_fpd(get_fpd(rec, i), fpd)) {
pr_debug("Found duplicate record");
return true;
}
@@ -290,7 +290,7 @@ static void update_fru_record(struct fru_rec *rec, struct mce *m)
goto save_fpd;
/* Ignore already recorded errors. */
- if (is_dup_fpd(rec, &fpd))
+ if (rec_has_fpd(rec, &fpd))
goto out_unlock;
if (rec->fmp.nr_entries >= max_nr_entries) {
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists