Skip to content

Commit dc7a6df

Browse files
committed
fixup! arm64: Implement Apple IMPDEF TSO memory model control
1 parent a955d75 commit dc7a6df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/arm64/kernel/process.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ static inline void actlr_thread_switch(struct task_struct *next)
544544
#ifdef CONFIG_ARM64_MEMORY_MODEL_CONTROL
545545
int arch_prctl_mem_model_get(struct task_struct *t)
546546
{
547-
if (cpus_have_const_cap(ARM64_HAS_TSO_APPLE) &&
547+
if (alternative_has_cap_unlikely(ARM64_HAS_TSO_APPLE) &&
548548
t->thread.actlr & ACTLR_APPLE_TSO)
549549
return PR_SET_MEM_MODEL_TSO;
550550

@@ -553,10 +553,10 @@ int arch_prctl_mem_model_get(struct task_struct *t)
553553

554554
int arch_prctl_mem_model_set(struct task_struct *t, unsigned long val)
555555
{
556-
if (cpus_have_const_cap(ARM64_HAS_TSO_FIXED) && val == PR_SET_MEM_MODEL_TSO)
556+
if (alternative_has_cap_unlikely(ARM64_HAS_TSO_FIXED) && val == PR_SET_MEM_MODEL_TSO)
557557
return 0;
558558

559-
if (cpus_have_const_cap(ARM64_HAS_TSO_APPLE)) {
559+
if (alternative_has_cap_unlikely(ARM64_HAS_TSO_APPLE)) {
560560
WARN_ON(!system_has_actlr_state());
561561

562562
switch (val) {

0 commit comments

Comments
 (0)