diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-5.15/0034-x86-MCE-AMD-Export-smca_get_bank_type-symbol.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-5.15/0034-x86-MCE-AMD-Export-smca_get_bank_type-symbol.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-5.15/0034-x86-MCE-AMD-Export-smca_get_bank_type-symbol.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-5.15/0034-x86-MCE-AMD-Export-smca_get_bank_type-symbol.patch new file mode 100644 index 00000000..97911cda --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-5.15/0034-x86-MCE-AMD-Export-smca_get_bank_type-symbol.patch @@ -0,0 +1,57 @@ +From 134df742d5931a219033b89ff29a28d1ae09e818 Mon Sep 17 00:00:00 2001 +From: Mukul Joshi <mukul.joshi@amd.com> +Date: Sat, 27 Mar 2021 22:54:04 -0400 +Subject: [PATCH 34/86] x86/MCE/AMD: Export smca_get_bank_type symbol + +commit f38ce910d8dfb7da439d0578d4b97259168306cd upstream + +Export smca_get_bank_type for use in the AMD GPU +driver to determine MCA bank while handling correctable +and uncorrectable errors in GPU UMC. + +Signed-off-by: Mukul Joshi <mukul.joshi@amd.com> +Acked-by: Borislav Petkov <bp@suse.de> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +Signed-off-by: Zhaolong Zhang <zhaolong.zhang@windriver.com> +--- + arch/x86/include/asm/mce.h | 2 +- + arch/x86/kernel/cpu/mce/amd.c | 3 ++- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h +index da9321548f6f..d69f716d8bc5 100644 +--- a/arch/x86/include/asm/mce.h ++++ b/arch/x86/include/asm/mce.h +@@ -358,7 +358,7 @@ extern int mce_threshold_remove_device(unsigned int cpu); + + void mce_amd_feature_init(struct cpuinfo_x86 *c); + int umc_normaddr_to_sysaddr(u64 norm_addr, u16 nid, u8 umc, u64 *sys_addr); +- ++enum smca_bank_types smca_get_bank_type(unsigned int bank); + #else + + static inline int mce_threshold_create_device(unsigned int cpu) { return 0; }; +diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c +index a873577e49dc..9f517009fd19 100644 +--- a/arch/x86/kernel/cpu/mce/amd.c ++++ b/arch/x86/kernel/cpu/mce/amd.c +@@ -119,7 +119,7 @@ const char *smca_get_long_name(enum smca_bank_types t) + } + EXPORT_SYMBOL_GPL(smca_get_long_name); + +-static enum smca_bank_types smca_get_bank_type(unsigned int bank) ++enum smca_bank_types smca_get_bank_type(unsigned int bank) + { + struct smca_bank *b; + +@@ -132,6 +132,7 @@ static enum smca_bank_types smca_get_bank_type(unsigned int bank) + + return b->hwid->bank_type; + } ++EXPORT_SYMBOL_GPL(smca_get_bank_type); + + static struct smca_hwid smca_hwid_mcatypes[] = { + /* { bank_type, hwid_mcatype } */ +-- +2.37.3 + |