From: David Gibson <david@gibson.dropbear.id.au>
To: Paul Mackerras <paulus@ozlabs.org>
Cc: linuxppc-dev@ozlabs.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Subject: Re: [RFC PATCH 1/2] powerpc: Add a CPU feature bit for TM bug workarounds on POWER9 DD2.2
Date: Tue, 12 Dec 2017 03:55:44 +0000 [thread overview]
Message-ID: <20171212035544.GL2226@umbus.fritz.box> (raw)
In-Reply-To: <20171208060924.fthehkna7bsnjowx@rohan>
[-- Attachment #1: Type: text/plain, Size: 3473 bytes --]
On Fri, Dec 08, 2017 at 05:09:24PM +1100, Paul Mackerras wrote:
> This adds a CPU feature bit which is set for POWER9 DD2.2 processors
> which will be used to enable software emulation for some transactional
> memory instructions, in order to work around hardware bugs.
>
> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> arch/powerpc/include/asm/cputable.h | 5 ++++-
> arch/powerpc/kernel/cputable.c | 20 ++++++++++++++++++++
> 2 files changed, 24 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h
> index 53b31c2bcdf4..70cee46c046c 100644
> --- a/arch/powerpc/include/asm/cputable.h
> +++ b/arch/powerpc/include/asm/cputable.h
> @@ -215,6 +215,7 @@ enum {
> #define CPU_FTR_DAWR LONG_ASM_CONST(0x0400000000000000)
> #define CPU_FTR_DABRX LONG_ASM_CONST(0x0800000000000000)
> #define CPU_FTR_PMAO_BUG LONG_ASM_CONST(0x1000000000000000)
> +#define CPU_FTR_P9_TM_EMUL LONG_ASM_CONST(0x2000000000000000)
> #define CPU_FTR_POWER9_DD1 LONG_ASM_CONST(0x4000000000000000)
>
> #ifndef __ASSEMBLY__
> @@ -478,6 +479,7 @@ enum {
> CPU_FTR_ARCH_207S | CPU_FTR_TM_COMP | CPU_FTR_ARCH_300)
> #define CPU_FTRS_POWER9_DD1 ((CPU_FTRS_POWER9 | CPU_FTR_POWER9_DD1) & \
> (~CPU_FTR_SAO))
> +#define CPU_FTRS_POWER9_DD2_2 (CPU_FTRS_POWER9 | CPU_FTR_P9_TM_EMUL)
> #define CPU_FTRS_CELL (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \
> CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
> CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \
> @@ -496,7 +498,8 @@ enum {
> (CPU_FTRS_POWER4 | CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | \
> CPU_FTRS_POWER6 | CPU_FTRS_POWER7 | CPU_FTRS_POWER8E | \
> CPU_FTRS_POWER8 | CPU_FTRS_POWER8_DD1 | CPU_FTRS_CELL | \
> - CPU_FTRS_PA6T | CPU_FTR_VSX | CPU_FTRS_POWER9 | CPU_FTRS_POWER9_DD1)
> + CPU_FTRS_PA6T | CPU_FTR_VSX | CPU_FTRS_POWER9 | \
> + CPU_FTRS_POWER9_DD1 | CPU_FTRS_POWER9_DD2_2)
> #endif
> #else
> enum {
> diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
> index 760872916013..bb94bb6d9e4d 100644
> --- a/arch/powerpc/kernel/cputable.c
> +++ b/arch/powerpc/kernel/cputable.c
> @@ -547,6 +547,26 @@ static struct cpu_spec __initdata cpu_specs[] = {
> .machine_check_early = __machine_check_early_realmode_p9,
> .platform = "power9",
> },
> + { /* Power9 DD2.2 */
> + .pvr_mask = 0xffffffff,
> + .pvr_value = 0x004e1202,
> + .cpu_name = "POWER9 (raw)",
> + .cpu_features = CPU_FTRS_POWER9_DD2_2,
> + .cpu_user_features = COMMON_USER_POWER9,
> + .cpu_user_features2 = COMMON_USER2_POWER9,
> + .mmu_features = MMU_FTRS_POWER9,
> + .icache_bsize = 128,
> + .dcache_bsize = 128,
> + .num_pmcs = 6,
> + .pmc_type = PPC_PMC_IBM,
> + .oprofile_cpu_type = "ppc64/power9",
> + .oprofile_type = PPC_OPROFILE_INVALID,
> + .cpu_setup = __setup_cpu_power9,
> + .cpu_restore = __restore_cpu_power9,
> + .flush_tlb = __flush_tlb_power9,
> + .machine_check_early = __machine_check_early_realmode_p9,
> + .platform = "power9",
> + },
> { /* Power9 */
> .pvr_mask = 0xffff0000,
> .pvr_value = 0x004e0000,
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: David Gibson <david@gibson.dropbear.id.au>
To: Paul Mackerras <paulus@ozlabs.org>
Cc: linuxppc-dev@ozlabs.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Subject: Re: [RFC PATCH 1/2] powerpc: Add a CPU feature bit for TM bug workarounds on POWER9 DD2.2
Date: Tue, 12 Dec 2017 14:55:44 +1100 [thread overview]
Message-ID: <20171212035544.GL2226@umbus.fritz.box> (raw)
In-Reply-To: <20171208060924.fthehkna7bsnjowx@rohan>
[-- Attachment #1: Type: text/plain, Size: 3473 bytes --]
On Fri, Dec 08, 2017 at 05:09:24PM +1100, Paul Mackerras wrote:
> This adds a CPU feature bit which is set for POWER9 DD2.2 processors
> which will be used to enable software emulation for some transactional
> memory instructions, in order to work around hardware bugs.
>
> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> arch/powerpc/include/asm/cputable.h | 5 ++++-
> arch/powerpc/kernel/cputable.c | 20 ++++++++++++++++++++
> 2 files changed, 24 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h
> index 53b31c2bcdf4..70cee46c046c 100644
> --- a/arch/powerpc/include/asm/cputable.h
> +++ b/arch/powerpc/include/asm/cputable.h
> @@ -215,6 +215,7 @@ enum {
> #define CPU_FTR_DAWR LONG_ASM_CONST(0x0400000000000000)
> #define CPU_FTR_DABRX LONG_ASM_CONST(0x0800000000000000)
> #define CPU_FTR_PMAO_BUG LONG_ASM_CONST(0x1000000000000000)
> +#define CPU_FTR_P9_TM_EMUL LONG_ASM_CONST(0x2000000000000000)
> #define CPU_FTR_POWER9_DD1 LONG_ASM_CONST(0x4000000000000000)
>
> #ifndef __ASSEMBLY__
> @@ -478,6 +479,7 @@ enum {
> CPU_FTR_ARCH_207S | CPU_FTR_TM_COMP | CPU_FTR_ARCH_300)
> #define CPU_FTRS_POWER9_DD1 ((CPU_FTRS_POWER9 | CPU_FTR_POWER9_DD1) & \
> (~CPU_FTR_SAO))
> +#define CPU_FTRS_POWER9_DD2_2 (CPU_FTRS_POWER9 | CPU_FTR_P9_TM_EMUL)
> #define CPU_FTRS_CELL (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \
> CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
> CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \
> @@ -496,7 +498,8 @@ enum {
> (CPU_FTRS_POWER4 | CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | \
> CPU_FTRS_POWER6 | CPU_FTRS_POWER7 | CPU_FTRS_POWER8E | \
> CPU_FTRS_POWER8 | CPU_FTRS_POWER8_DD1 | CPU_FTRS_CELL | \
> - CPU_FTRS_PA6T | CPU_FTR_VSX | CPU_FTRS_POWER9 | CPU_FTRS_POWER9_DD1)
> + CPU_FTRS_PA6T | CPU_FTR_VSX | CPU_FTRS_POWER9 | \
> + CPU_FTRS_POWER9_DD1 | CPU_FTRS_POWER9_DD2_2)
> #endif
> #else
> enum {
> diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
> index 760872916013..bb94bb6d9e4d 100644
> --- a/arch/powerpc/kernel/cputable.c
> +++ b/arch/powerpc/kernel/cputable.c
> @@ -547,6 +547,26 @@ static struct cpu_spec __initdata cpu_specs[] = {
> .machine_check_early = __machine_check_early_realmode_p9,
> .platform = "power9",
> },
> + { /* Power9 DD2.2 */
> + .pvr_mask = 0xffffffff,
> + .pvr_value = 0x004e1202,
> + .cpu_name = "POWER9 (raw)",
> + .cpu_features = CPU_FTRS_POWER9_DD2_2,
> + .cpu_user_features = COMMON_USER_POWER9,
> + .cpu_user_features2 = COMMON_USER2_POWER9,
> + .mmu_features = MMU_FTRS_POWER9,
> + .icache_bsize = 128,
> + .dcache_bsize = 128,
> + .num_pmcs = 6,
> + .pmc_type = PPC_PMC_IBM,
> + .oprofile_cpu_type = "ppc64/power9",
> + .oprofile_type = PPC_OPROFILE_INVALID,
> + .cpu_setup = __setup_cpu_power9,
> + .cpu_restore = __restore_cpu_power9,
> + .flush_tlb = __flush_tlb_power9,
> + .machine_check_early = __machine_check_early_realmode_p9,
> + .platform = "power9",
> + },
> { /* Power9 */
> .pvr_mask = 0xffff0000,
> .pvr_value = 0x004e0000,
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-12-12 3:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-08 6:08 [RFC PATCH 0/2] KVM: PPC: Book3S HV: Transactional memory bug workarounds for POWER9 Paul Mackerras
2017-12-08 6:08 ` Paul Mackerras
2017-12-08 6:09 ` [RFC PATCH 1/2] powerpc: Add a CPU feature bit for TM bug workarounds on POWER9 DD2.2 Paul Mackerras
2017-12-08 6:09 ` Paul Mackerras
2017-12-08 15:15 ` Benjamin Herrenschmidt
2017-12-08 15:15 ` Benjamin Herrenschmidt
2017-12-12 3:55 ` David Gibson [this message]
2017-12-12 3:55 ` David Gibson
2017-12-08 6:11 ` [RFC PATCH 2/2] KVM: PPC: Book3S HV: Work around transactional memory bugs in POWER9 Paul Mackerras
2017-12-08 6:11 ` Paul Mackerras
2017-12-12 5:40 ` David Gibson
2017-12-12 5:40 ` David Gibson
2018-01-02 23:15 ` Suraj Jitindar Singh
2018-01-02 23:15 ` Suraj Jitindar Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171212035544.GL2226@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.