Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp241214ybt; Tue, 7 Jul 2020 21:52:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxN8j7Dle06DhQorrT5ISDx/cCo4lv36xbGaqlp6761q3xeW+UAW8kgbbUhJSloW2c5yOcd X-Received: by 2002:a05:6402:1a4b:: with SMTP id bf11mr49511907edb.191.1594183945523; Tue, 07 Jul 2020 21:52:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594183945; cv=none; d=google.com; s=arc-20160816; b=P7GcL1jjj4zhjS5Kc147h2S4C6zQK0vxwJ8fSk22ONoRDUfVUnLNSTw8JSUw3tDibc YM6UjvsmNlOH+FA0rsJR2ra1lnsFZn0n9vTnuUSvKeVBlJGyvWZfvBmZ0Cym+iLlLILe XYTxhqjM8RL7pK5blmIl6fGtzsQK+5JaMhuvhuaDKOftEvPpAVDgNytb8A5bGRALpNM0 QHKEdMLIWg8Pye8UNxgIdEjYLYdfwW2Vpjto6qe7S7Ao/6GpwKZCQs/GLZdj9H/t3iF7 6uP1dp3FhAbAXeu6KLOVBtlAkI7NRje867xPFweN3wu9KcqwUFtSfDRHIc3ILyIfBdJ/ a4YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=zjyU3iJ7qiDnAxlthepnKFJYSOdxMGYvHjcC83MYe7M=; b=MN0KhGxTZCtqYJVpUdQsrLDISwm6ZXpYP0E9FIWUfm6M9CxXy48WddhBgMZGy1YvtS 4ZP1HRIIYb3edA59lJHd2eePgTjoUNCj4mfJrca/jQkegDkWLAnAqhvrifzWVKxC7NW0 sbbjj4fZ6oZO1rPl+ZPHMzNc0idA6XIOIIAsaQsOz9qBJpQjNaOveI5tJNUGbAXc54zL GwrbBdffpWS1FXC/ydTTqgCB+55uRIw9nI1B7EqIqGYrGje8foJizg7fF3Ih47bMkmrR aGCAYTplZmhDhr2fm7EJdJwzrc29/VKE3jcEcB9mRgGusZiAvoJtxYgUNYTynOWGfxm1 PzdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f2si15798822edq.124.2020.07.07.21.52.02; Tue, 07 Jul 2020 21:52:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729461AbgGHEvj (ORCPT + 99 others); Wed, 8 Jul 2020 00:51:39 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:33712 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729406AbgGHEvi (ORCPT ); Wed, 8 Jul 2020 00:51:38 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0684hS1i018781; Wed, 8 Jul 2020 00:51:20 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3257c5848p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 00:51:19 -0400 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0684ihPD020483; Wed, 8 Jul 2020 00:51:19 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 3257c5847r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 00:51:19 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0684kTrW005737; Wed, 8 Jul 2020 04:51:17 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma04ams.nl.ibm.com with ESMTP id 322hd7v4bj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 04:51:16 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0684pDbD49545370 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 Jul 2020 04:51:13 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 76D4AAE053; Wed, 8 Jul 2020 04:51:13 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B6946AE051; Wed, 8 Jul 2020 04:51:09 +0000 (GMT) Received: from bangoria.ibmuc.com (unknown [9.199.51.84]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 8 Jul 2020 04:51:09 +0000 (GMT) From: Ravi Bangoria To: mpe@ellerman.id.au, mikey@neuling.org Cc: ravi.bangoria@linux.ibm.com, apopple@linux.ibm.com, paulus@samba.org, npiggin@gmail.com, christophe.leroy@c-s.fr, naveen.n.rao@linux.vnet.ibm.com, peterz@infradead.org, jolsa@kernel.org, oleg@redhat.com, fweisbec@gmail.com, mingo@kernel.org, pedromfc@br.ibm.com, miltonm@us.ibm.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 4/9] powerpc/dt_cpu_ftrs: Add feature for 2nd DAWR Date: Wed, 8 Jul 2020 10:20:41 +0530 Message-Id: <20200708045046.135702-5-ravi.bangoria@linux.ibm.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200708045046.135702-1-ravi.bangoria@linux.ibm.com> References: <20200708045046.135702-1-ravi.bangoria@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-08_01:2020-07-08,2020-07-08 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxlogscore=999 phishscore=0 impostorscore=0 suspectscore=0 priorityscore=1501 mlxscore=0 bulkscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 cotscore=-2147483648 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2007080029 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add new device-tree feature for 2nd DAWR. If this feature is present, 2nd DAWR is supported, otherwise not. Signed-off-by: Ravi Bangoria --- arch/powerpc/include/asm/cputable.h | 7 +++++-- arch/powerpc/kernel/dt_cpu_ftrs.c | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index e506d429b1af..3445c86e1f6f 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h @@ -214,6 +214,7 @@ static inline void cpu_feature_keys_init(void) { } #define CPU_FTR_P9_TLBIE_ERAT_BUG LONG_ASM_CONST(0x0001000000000000) #define CPU_FTR_P9_RADIX_PREFETCH_BUG LONG_ASM_CONST(0x0002000000000000) #define CPU_FTR_ARCH_31 LONG_ASM_CONST(0x0004000000000000) +#define CPU_FTR_DAWR1 LONG_ASM_CONST(0x0008000000000000) #ifndef __ASSEMBLY__ @@ -497,14 +498,16 @@ static inline void cpu_feature_keys_init(void) { } #define CPU_FTRS_POSSIBLE \ (CPU_FTRS_POWER7 | CPU_FTRS_POWER8E | CPU_FTRS_POWER8 | \ CPU_FTR_ALTIVEC_COMP | CPU_FTR_VSX_COMP | CPU_FTRS_POWER9 | \ - CPU_FTRS_POWER9_DD2_1 | CPU_FTRS_POWER9_DD2_2 | CPU_FTRS_POWER10) + CPU_FTRS_POWER9_DD2_1 | CPU_FTRS_POWER9_DD2_2 | CPU_FTRS_POWER10 | \ + CPU_FTR_DAWR1) #else #define CPU_FTRS_POSSIBLE \ (CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | \ CPU_FTRS_POWER6 | CPU_FTRS_POWER7 | CPU_FTRS_POWER8E | \ CPU_FTRS_POWER8 | CPU_FTRS_CELL | CPU_FTRS_PA6T | \ CPU_FTR_VSX_COMP | CPU_FTR_ALTIVEC_COMP | CPU_FTRS_POWER9 | \ - CPU_FTRS_POWER9_DD2_1 | CPU_FTRS_POWER9_DD2_2 | CPU_FTRS_POWER10) + CPU_FTRS_POWER9_DD2_1 | CPU_FTRS_POWER9_DD2_2 | CPU_FTRS_POWER10 | \ + CPU_FTR_DAWR1) #endif /* CONFIG_CPU_LITTLE_ENDIAN */ #endif #else diff --git a/arch/powerpc/kernel/dt_cpu_ftrs.c b/arch/powerpc/kernel/dt_cpu_ftrs.c index a0edeb391e3e..be694567cebd 100644 --- a/arch/powerpc/kernel/dt_cpu_ftrs.c +++ b/arch/powerpc/kernel/dt_cpu_ftrs.c @@ -573,6 +573,12 @@ static int __init feat_enable_mma(struct dt_cpu_feature *f) return 1; } +static int __init feat_enable_debug_facilities_v31(struct dt_cpu_feature *f) +{ + cur_cpu_spec->cpu_features |= CPU_FTR_DAWR1; + return 1; +} + struct dt_cpu_feature_match { const char *name; int (*enable)(struct dt_cpu_feature *f); @@ -648,6 +654,7 @@ static struct dt_cpu_feature_match __initdata {"wait-v3", feat_enable, 0}, {"prefix-instructions", feat_enable, 0}, {"matrix-multiply-assist", feat_enable_mma, 0}, + {"debug-facilities-v31", feat_enable_debug_facilities_v31, 0}, }; static bool __initdata using_dt_cpu_ftrs; -- 2.26.2