From patchwork Wed Apr 3 10:56:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Murray X-Patchwork-Id: 10883483 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 46321922 for ; Wed, 3 Apr 2019 11:11:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F09B2887E for ; Wed, 3 Apr 2019 11:11:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F75C28989; Wed, 3 Apr 2019 11:11:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 85D822887E for ; Wed, 3 Apr 2019 11:11:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/MbCHBFkLVWQxOokWN4eCOD/+I0pfVutgrLH29PGY18=; b=I3E2/b0O+SMG7x 4VBAdA/OJDJleKItQUhlNnhn5vvCV1LxdSnjxHE6m50Pmqy1BvKyuAnYzijJXmd+4hKf4pOyFQ9HA pSGIbWdaQdPPAHTPsPcdh6aqjwm+j60U1ifb5oDyKDWFOZ/UJ1FyyOD4QdZSBrAzO+Kx1sVv6Hh7F xJzHruRvYNaKKzUdPVqzgYJSc1iVM/2ppiIDXt701+U0OLYCCeRJA+ogQESPy8NIIrDeAPDwRewQG r5LKm4hfKOYBbbpB27W/JXpeXxH+YS+ULztjMUt0nsZ5Xchml0/dCYmoPh/mHoypxPQ6/jLNDDcIT lMXCou7Qk20mbNSm2HBw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBdo1-0008TU-1Y; Wed, 03 Apr 2019 11:11:45 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBdny-0008Pk-VV for linux-arm-kernel@bombadil.infradead.org; Wed, 03 Apr 2019 11:11:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=wusXFNkYI+pMVAuUxD6D0Icf+pp+eGBglvAPyLDQY4U=; b=CokUi+FYopJ+3CEFDXPqeWm6PH Xwuid7Hy9Y6mI4nPjVOKtr0kX7R0ZZc865fkkJM0E/lh9U3y4xY+ABijmXFCMEvCqaSVmEojYcMES 2/oPSbJh73Q7aNqiVsYRG06sFIlC7xhh5SpMJoZzBK0PhH8CtIIQR6q5/VwOEAqcCEPHXYc0LfEQ1 r5L7eWXess4F8W0yfRMdpuiUDDYR0dOYlue15QO6/7Khd0fPy17JsavTwz2qj8a+XJeEU6BIo5GIK tvyUKXCC44w240F6W2RbbbGaeazzEtz7fulFMi75QVL9hA+d4bxACddyDMAZ21gINfoMd0SLql2Ko zKQGV2ow==; Received: from foss.arm.com ([217.140.101.70]) by casper.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBdZd-0000kD-Jj for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2019 10:56:55 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3B4971993; Wed, 3 Apr 2019 03:56:51 -0700 (PDT) Received: from e119886-lin.cambridge.arm.com (unknown [10.37.6.20]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 228623F59C; Wed, 3 Apr 2019 03:56:48 -0700 (PDT) From: Andrew Murray To: Catalin Marinas , Will Deacon Subject: [PATCH v4 6/6] arm64: Advertise ARM64_HAS_DCPODP cpu feature Date: Wed, 3 Apr 2019 11:56:28 +0100 Message-Id: <20190403105628.39798-7-andrew.murray@arm.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190403105628.39798-1-andrew.murray@arm.com> References: <20190403105628.39798-1-andrew.murray@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190403_115653_834833_A725CDB4 X-CRM114-Status: GOOD ( 12.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , libc-alpha@sourceware.org, Suzuki K Poulose , Szabolcs Nagy , linux-api@vger.kernel.org, Phil Blundell , dave.martin@arm.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Advertise ARM64_HAS_DCPODP when both DC CVAP and DC CVADP are supported. Even though we don't use this feature now, we provide it for consistency with DCPOP and anticipate it being used in the future. Signed-off-by: Andrew Murray Reviewed-by: Dave Martin Reviewed-by: Suzuki K Poulose --- arch/arm64/include/asm/cpucaps.h | 3 ++- arch/arm64/kernel/cpufeature.c | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/cpucaps.h b/arch/arm64/include/asm/cpucaps.h index f6a76e43f39e..defdc67d9ab4 100644 --- a/arch/arm64/include/asm/cpucaps.h +++ b/arch/arm64/include/asm/cpucaps.h @@ -61,7 +61,8 @@ #define ARM64_HAS_GENERIC_AUTH_ARCH 40 #define ARM64_HAS_GENERIC_AUTH_IMP_DEF 41 #define ARM64_HAS_IRQ_PRIO_MASKING 42 +#define ARM64_HAS_DCPODP 43 -#define ARM64_NCAPS 43 +#define ARM64_NCAPS 44 #endif /* __ASM_CPUCAPS_H */ diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index f8b682a3a9f4..4ee5d63281ae 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1340,6 +1340,15 @@ static const struct arm64_cpu_capabilities arm64_features[] = { .field_pos = ID_AA64ISAR1_DPB_SHIFT, .min_field_value = 1, }, + { + .desc = "Data cache clean to Point of Deep Persistence", + .capability = ARM64_HAS_DCPODP, + .type = ARM64_CPUCAP_SYSTEM_FEATURE, + .matches = has_cpuid_feature, + .sys_reg = SYS_ID_AA64ISAR1_EL1, + .field_pos = ID_AA64ISAR1_DPB_SHIFT, + .min_field_value = 2, + }, #endif #ifdef CONFIG_ARM64_SVE {