Skip to content

Commit 09ce98c

Browse files
kvaneeshmpe
authored andcommitted
powerpc/book3s64/radix: Rename CPU_FTR_P9_TLBIE_BUG feature flag
Rename the #define to indicate this is related to store vs tlbie ordering issue. In the next patch, we will be adding another feature flag that is used to handles ERAT flush vs tlbie ordering issue. Fixes: a5d4b58 ("powerpc/mm: Fixup tlbie vs store ordering issue on POWER9") Cc: [email protected] # v4.16+ Signed-off-by: Aneesh Kumar K.V <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 677733e commit 09ce98c

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

arch/powerpc/include/asm/cputable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ static inline void cpu_feature_keys_init(void) { }
209209
#define CPU_FTR_POWER9_DD2_1 LONG_ASM_CONST(0x0000080000000000)
210210
#define CPU_FTR_P9_TM_HV_ASSIST LONG_ASM_CONST(0x0000100000000000)
211211
#define CPU_FTR_P9_TM_XER_SO_BUG LONG_ASM_CONST(0x0000200000000000)
212-
#define CPU_FTR_P9_TLBIE_BUG LONG_ASM_CONST(0x0000400000000000)
212+
#define CPU_FTR_P9_TLBIE_STQ_BUG LONG_ASM_CONST(0x0000400000000000)
213213
#define CPU_FTR_P9_TIDR LONG_ASM_CONST(0x0000800000000000)
214214

215215
#ifndef __ASSEMBLY__
@@ -457,7 +457,7 @@ static inline void cpu_feature_keys_init(void) { }
457457
CPU_FTR_CFAR | CPU_FTR_HVMODE | CPU_FTR_VMX_COPY | \
458458
CPU_FTR_DBELL | CPU_FTR_HAS_PPR | CPU_FTR_ARCH_207S | \
459459
CPU_FTR_TM_COMP | CPU_FTR_ARCH_300 | CPU_FTR_PKEY | \
460-
CPU_FTR_P9_TLBIE_BUG | CPU_FTR_P9_TIDR)
460+
CPU_FTR_P9_TLBIE_STQ_BUG | CPU_FTR_P9_TIDR)
461461
#define CPU_FTRS_POWER9_DD2_0 CPU_FTRS_POWER9
462462
#define CPU_FTRS_POWER9_DD2_1 (CPU_FTRS_POWER9 | CPU_FTR_POWER9_DD2_1)
463463
#define CPU_FTRS_POWER9_DD2_2 (CPU_FTRS_POWER9 | CPU_FTR_POWER9_DD2_1 | \

arch/powerpc/kernel/dt_cpu_ftrs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -706,14 +706,14 @@ static __init void update_tlbie_feature_flag(unsigned long pvr)
706706
if ((pvr & 0xe000) == 0) {
707707
/* Nimbus */
708708
if ((pvr & 0xfff) < 0x203)
709-
cur_cpu_spec->cpu_features |= CPU_FTR_P9_TLBIE_BUG;
709+
cur_cpu_spec->cpu_features |= CPU_FTR_P9_TLBIE_STQ_BUG;
710710
} else if ((pvr & 0xc000) == 0) {
711711
/* Cumulus */
712712
if ((pvr & 0xfff) < 0x103)
713-
cur_cpu_spec->cpu_features |= CPU_FTR_P9_TLBIE_BUG;
713+
cur_cpu_spec->cpu_features |= CPU_FTR_P9_TLBIE_STQ_BUG;
714714
} else {
715715
WARN_ONCE(1, "Unknown PVR");
716-
cur_cpu_spec->cpu_features |= CPU_FTR_P9_TLBIE_BUG;
716+
cur_cpu_spec->cpu_features |= CPU_FTR_P9_TLBIE_STQ_BUG;
717717
}
718718
}
719719
}

arch/powerpc/kvm/book3s_hv_rm_mmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ static void do_tlbies(struct kvm *kvm, unsigned long *rbvalues,
451451
"r" (rbvalues[i]), "r" (kvm->arch.lpid));
452452
}
453453

454-
if (cpu_has_feature(CPU_FTR_P9_TLBIE_BUG)) {
454+
if (cpu_has_feature(CPU_FTR_P9_TLBIE_STQ_BUG)) {
455455
/*
456456
* Need the extra ptesync to make sure we don't
457457
* re-order the tlbie

arch/powerpc/mm/book3s64/hash_native.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ static inline unsigned long ___tlbie(unsigned long vpn, int psize,
199199

200200
static inline void fixup_tlbie(unsigned long vpn, int psize, int apsize, int ssize)
201201
{
202-
if (cpu_has_feature(CPU_FTR_P9_TLBIE_BUG)) {
202+
if (cpu_has_feature(CPU_FTR_P9_TLBIE_STQ_BUG)) {
203203
/* Need the extra ptesync to ensure we don't reorder tlbie*/
204204
asm volatile("ptesync": : :"memory");
205205
___tlbie(vpn, psize, apsize, ssize);

arch/powerpc/mm/book3s64/radix_tlb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ static inline void fixup_tlbie(void)
201201
unsigned long pid = 0;
202202
unsigned long va = ((1UL << 52) - 1);
203203

204-
if (cpu_has_feature(CPU_FTR_P9_TLBIE_BUG)) {
204+
if (cpu_has_feature(CPU_FTR_P9_TLBIE_STQ_BUG)) {
205205
asm volatile("ptesync": : :"memory");
206206
__tlbie_va(va, pid, mmu_get_ap(MMU_PAGE_64K), RIC_FLUSH_TLB);
207207
}
@@ -211,7 +211,7 @@ static inline void fixup_tlbie_lpid(unsigned long lpid)
211211
{
212212
unsigned long va = ((1UL << 52) - 1);
213213

214-
if (cpu_has_feature(CPU_FTR_P9_TLBIE_BUG)) {
214+
if (cpu_has_feature(CPU_FTR_P9_TLBIE_STQ_BUG)) {
215215
asm volatile("ptesync": : :"memory");
216216
__tlbie_lpid_va(va, lpid, mmu_get_ap(MMU_PAGE_64K), RIC_FLUSH_TLB);
217217
}

0 commit comments

Comments
 (0)