-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/amdkcl: Test whether smca_get_bank_type() has two arguments
It's caused by 91f75eb "x86/MCE/AMD, EDAC/mce_amd: Support non-uniform MCA bank type enumeration" Signed-off-by: Asher Song <Asher.Song@amd.com> Reviewed-by: Leslie Shi <Yuliang.Shi@amd.com> (cherry picked from commit 1ad3ae0) Change-Id: If23944476229e6b7a4c48f8855cef7c05d70ef4b
- Loading branch information
Asher Song
authored and
Alexandru Tudor
committed
Sep 19, 2022
1 parent
802e978
commit 93cd6ba
Showing
5 changed files
with
70 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,49 @@ | ||
dnl # | ||
dnl # | ||
dnl # v5.15-rc2-452-gf38ce910d8df x86/MCE/AMD: Export smca_get_bank_type symbol | ||
dnl # v5.16-rc1-22-g91f75eb481cf x86/MCE/AMD, EDAC/mce_amd: Support non-uniform MCA bank type enumeration | ||
dnl # | ||
AC_DEFUN([AC_AMDGPU_SMCA_GET_BANK_TYPE], [ | ||
AC_KERNEL_DO_BACKGROUND([ | ||
AC_KERNEL_CHECK_SYMBOL_EXPORT([smca_get_bank_type], | ||
[arch/x86/kernel/cpu/mce/amd.c], [ | ||
AC_DEFINE(HAVE_SMCA_GET_BANK_TYPE, 1, | ||
[smca_get_bank_type() is available]) | ||
], [ | ||
dnl # | ||
AC_KERNEL_TRY_COMPILE([ | ||
#include <linux/limits.h> | ||
#include <asm/mce.h> | ||
],[ | ||
unsigned int a = 0, b = 0; | ||
enum smca_bank_types bank_type; | ||
bank_type = smca_get_bank_type(a, b); | ||
],[ | ||
AC_DEFINE(HAVE_SMCA_GET_BANK_TYPE_WITH_TWO_ARGUMENTS, 1, | ||
[whether smca_get_bank_type(x, x) is available]) | ||
],[ | ||
dnl # | ||
dnl # v4.9-rc4-4-g79349f529ab1 x86/RAS: Simplify SMCA bank descriptor struct | ||
dnl # v5.15-rc2-452-gf38ce910d8df x86/MCE/AMD: Export smca_get_bank_type symbol | ||
dnl # | ||
AC_KERNEL_TRY_COMPILE([ | ||
#include <linux/limits.h> | ||
#include <asm/mce.h> | ||
], [ | ||
struct smca_bank *b = NULL; | ||
b->id = 0; | ||
], [ | ||
AC_DEFINE(HAVE_STRUCT_SMCA_BANK, 1, | ||
[struct smca_bank is available]) | ||
],[ | ||
unsigned int a = 0; | ||
enum smca_bank_types bank_type; | ||
bank_type = smca_get_bank_type(a); | ||
],[ | ||
AC_DEFINE(HAVE_SMCA_GET_BANK_TYPE_WITH_ONE_ARGUMENT, 1, | ||
[smca_get_bank_type(x) is available]) | ||
],[ | ||
dnl # | ||
dnl # v4.9-rc4-4-g79349f529ab1 x86/RAS: Simplify SMCA bank descriptor struct | ||
dnl # | ||
AC_KERNEL_TRY_COMPILE([ | ||
#include <linux/limits.h> | ||
#include <asm/mce.h> | ||
],[ | ||
struct smca_bank *b = NULL; | ||
b->id = 0; | ||
], [ | ||
AC_DEFINE(HAVE_STRUCT_SMCA_BANK, 1, | ||
[struct smca_bank is available]) | ||
]) | ||
]) | ||
]) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters