Skip to content

Commit 40f39f0

Browse files
leoliu-ocopsiff
authored andcommitted
x86/split_lock: Add support for Zhaoxin
zhaoxin inclusion category: feature -------------------- Add Split Lock Detect support for Zhaoxin platforms. Signed-off-by: LeoLiu-oc <[email protected]>
1 parent e7d21be commit 40f39f0

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

Documentation/arch/x86/buslock.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ Detection
2727

2828
Intel processors may support either or both of the following hardware
2929
mechanisms to detect split locks and bus locks. Some AMD processors also
30-
support bus lock detect.
30+
support bus lock detect. Some Zhaoxin processors also support split lock
31+
detect.
3132

3233
#AC exception for split lock detection
3334
--------------------------------------

arch/x86/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2488,7 +2488,7 @@ source "kernel/livepatch/Kconfig"
24882488

24892489
config X86_BUS_LOCK_DETECT
24902490
bool "Split Lock Detect and Bus Lock Detect support"
2491-
depends on CPU_SUP_INTEL || CPU_SUP_AMD
2491+
depends on CPU_SUP_INTEL || CPU_SUP_AMD || CPU_SUP_ZHAOXIN || CPU_SUP_CENTAUR
24922492
default y
24932493
help
24942494
Enable Split Lock Detect and Bus Lock Detect functionalities.

arch/x86/kernel/cpu/centaur.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ static void init_centaur(struct cpuinfo_x86 *c)
224224
#endif
225225

226226
init_ia32_feat_ctl(c);
227+
228+
split_lock_init();
227229
}
228230

229231
#ifdef CONFIG_X86_32

arch/x86/kernel/cpu/zhaoxin.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ static void init_zhaoxin(struct cpuinfo_x86 *c)
101101
#endif
102102

103103
init_ia32_feat_ctl(c);
104+
105+
split_lock_init();
104106
}
105107

106108
#ifdef CONFIG_X86_32

0 commit comments

Comments
 (0)