drivers/edac/Kconfig | 1 + drivers/edac/ghes_edac.c | 200 +++++++----------------------------- drivers/firmware/efi/cper.c | 64 ++++++++---- include/linux/cper.h | 3 + 4 files changed, 87 insertions(+), 181 deletions(-)
ghes_edac_report_mem_error() in ghes_edac.c is a Long Method and have
Duplicated Code with cper_mem_err_location(), cper_dimm_err_location(), and
cper_mem_err_type_str() in drivers/firmware/efi/cper.c. In addition, the
cper_print_mem() in drivers/firmware/efi/cper.c only reports the error
status and misses its description.
This patch set is to refactor ghes_edac_report_mem_error with:
- Patch 01 is to wrap up error status decoding logics and reuse it in
cper_print_mem().
- Patch 02 is to introduces cper_*(), into ghes_edac_report_mem_error(),
this can avoid bunch of duplicate code lines;
- Patch 03 is to improve report format
Changes since v6:
- Rework patch 02 by Borislav Petkov
- add patch 03 to improve format
- Link: https://lore.kernel.org/r/20220303122626.99740-3-xueshuai@linux.alibaba.com
Changes since v5:
- Delete change summary in commit log
- Link: https://lore.kernel.org/all/20220126081702.55167-1-xueshuai@linux.alibaba.com/
- Thanks Borislav Petkov for review comments.
Changes since v4:
- Fix alignment and format problem
- Link: https://lore.kernel.org/all/20220125024939.30635-1-xueshuai@linux.alibaba.com/
Changes since v3:
- make cper_mem_err_status_str table a lot more compact
- Fix alignment and format problem
- Link: https://lore.kernel.org/all/20220124024759.19176-1-xueshuai@linux.alibaba.com/
Changes since v2:
- delete the unified patch
- adjusted the order of patches
- Link: https://lore.kernel.org/all/20211210134019.28536-1-xueshuai@linux.alibaba.com/
Changes since v1:
- add a new patch to unify ghes and cper before removing duplication.
- document the changes in patch description
- add EXPORT_SYMBOL_GPL()s for cper_*()
- document and the dependency and add UEFI_CPER dependency explicitly
- Link: https://lore.kernel.org/all/20211207031905.61906-2-xueshuai@linux.alibaba.com/
Shuai Xue (3):
efi/cper: add cper_mem_err_status_str to decode error description
EDAC/ghes: Unify CPER memory error location reporting
efi/cper: reformat CPER memory error location to more readable
drivers/edac/Kconfig | 1 +
drivers/edac/ghes_edac.c | 200 +++++++-----------------------------
drivers/firmware/efi/cper.c | 64 ++++++++----
include/linux/cper.h | 3 +
4 files changed, 87 insertions(+), 181 deletions(-)
--
2.20.1.12.g72788fdb
Gentle ping. 在 2022/3/8 PM10:40, Shuai Xue 写道: > ghes_edac_report_mem_error() in ghes_edac.c is a Long Method and have > Duplicated Code with cper_mem_err_location(), cper_dimm_err_location(), and > cper_mem_err_type_str() in drivers/firmware/efi/cper.c. In addition, the > cper_print_mem() in drivers/firmware/efi/cper.c only reports the error > status and misses its description. > > This patch set is to refactor ghes_edac_report_mem_error with: > > - Patch 01 is to wrap up error status decoding logics and reuse it in > cper_print_mem(). > - Patch 02 is to introduces cper_*(), into ghes_edac_report_mem_error(), > this can avoid bunch of duplicate code lines; > - Patch 03 is to improve report format > > Changes since v6: > - Rework patch 02 by Borislav Petkov > - add patch 03 to improve format > - Link: https://lore.kernel.org/r/20220303122626.99740-3-xueshuai@linux.alibaba.com > > Changes since v5: > - Delete change summary in commit log > - Link: https://lore.kernel.org/all/20220126081702.55167-1-xueshuai@linux.alibaba.com/ > - Thanks Borislav Petkov for review comments. > > Changes since v4: > - Fix alignment and format problem > - Link: https://lore.kernel.org/all/20220125024939.30635-1-xueshuai@linux.alibaba.com/ > > Changes since v3: > > - make cper_mem_err_status_str table a lot more compact > - Fix alignment and format problem > - Link: https://lore.kernel.org/all/20220124024759.19176-1-xueshuai@linux.alibaba.com/ > > Changes since v2: > > - delete the unified patch > - adjusted the order of patches > - Link: https://lore.kernel.org/all/20211210134019.28536-1-xueshuai@linux.alibaba.com/ > > Changes since v1: > > - add a new patch to unify ghes and cper before removing duplication. > - document the changes in patch description > - add EXPORT_SYMBOL_GPL()s for cper_*() > - document and the dependency and add UEFI_CPER dependency explicitly > - Link: https://lore.kernel.org/all/20211207031905.61906-2-xueshuai@linux.alibaba.com/ > > Shuai Xue (3): > efi/cper: add cper_mem_err_status_str to decode error description > EDAC/ghes: Unify CPER memory error location reporting > efi/cper: reformat CPER memory error location to more readable > > drivers/edac/Kconfig | 1 + > drivers/edac/ghes_edac.c | 200 +++++++----------------------------- > drivers/firmware/efi/cper.c | 64 ++++++++---- > include/linux/cper.h | 3 + > 4 files changed, 87 insertions(+), 181 deletions(-)
Hi, Borislav, 在 2022/3/8 PM10:40, Shuai Xue 写道: > ghes_edac_report_mem_error() in ghes_edac.c is a Long Method and have > Duplicated Code with cper_mem_err_location(), cper_dimm_err_location(), and > cper_mem_err_type_str() in drivers/firmware/efi/cper.c. In addition, the > cper_print_mem() in drivers/firmware/efi/cper.c only reports the error > status and misses its description. > > This patch set is to refactor ghes_edac_report_mem_error with: > > - Patch 01 is to wrap up error status decoding logics and reuse it in > cper_print_mem(). > - Patch 02 is to introduces cper_*(), into ghes_edac_report_mem_error(), > this can avoid bunch of duplicate code lines; > - Patch 03 is to improve report format > > Changes since v6: > - Rework patch 02 by Borislav Petkov > - add patch 03 to improve format > - Link: https://lore.kernel.org/r/20220303122626.99740-3-xueshuai@linux.alibaba.com > > Changes since v5: > - Delete change summary in commit log > - Link: https://lore.kernel.org/all/20220126081702.55167-1-xueshuai@linux.alibaba.com/ > - Thanks Borislav Petkov for review comments. > > Changes since v4: > - Fix alignment and format problem > - Link: https://lore.kernel.org/all/20220125024939.30635-1-xueshuai@linux.alibaba.com/ > > Changes since v3: > > - make cper_mem_err_status_str table a lot more compact > - Fix alignment and format problem > - Link: https://lore.kernel.org/all/20220124024759.19176-1-xueshuai@linux.alibaba.com/ > > Changes since v2: > > - delete the unified patch > - adjusted the order of patches > - Link: https://lore.kernel.org/all/20211210134019.28536-1-xueshuai@linux.alibaba.com/ > > Changes since v1: > > - add a new patch to unify ghes and cper before removing duplication. > - document the changes in patch description > - add EXPORT_SYMBOL_GPL()s for cper_*() > - document and the dependency and add UEFI_CPER dependency explicitly > - Link: https://lore.kernel.org/all/20211207031905.61906-2-xueshuai@linux.alibaba.com/ > > Shuai Xue (3): > efi/cper: add cper_mem_err_status_str to decode error description > EDAC/ghes: Unify CPER memory error location reporting > efi/cper: reformat CPER memory error location to more readable > > drivers/edac/Kconfig | 1 + > drivers/edac/ghes_edac.c | 200 +++++++----------------------------- > drivers/firmware/efi/cper.c | 64 ++++++++---- > include/linux/cper.h | 3 + > 4 files changed, 87 insertions(+), 181 deletions(-) Ping. I am wondering if you have any comments on this series of patches? Best Regards, Shuai
On Tue, Mar 08, 2022 at 10:40:50PM +0800, Shuai Xue wrote:
> Shuai Xue (3):
> efi/cper: add cper_mem_err_status_str to decode error description
> EDAC/ghes: Unify CPER memory error location reporting
> efi/cper: reformat CPER memory error location to more readable
>
> drivers/edac/Kconfig | 1 +
> drivers/edac/ghes_edac.c | 200 +++++++-----------------------------
> drivers/firmware/efi/cper.c | 64 ++++++++----
> include/linux/cper.h | 3 +
> 4 files changed, 87 insertions(+), 181 deletions(-)
Applied, thanks.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
© 2016 - 2026 Red Hat, Inc.