Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp361917ybl; Tue, 28 Jan 2020 04:40:54 -0800 (PST) X-Google-Smtp-Source: APXvYqxlFkf2uZpaZhmj0ljWoo4kv2yHAN5xkYuPcjq2/W58ci5GLNTQHesmR2hDz5LfVbgYFdBm X-Received: by 2002:aca:59c2:: with SMTP id n185mr2703642oib.170.1580215254685; Tue, 28 Jan 2020 04:40:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580215254; cv=none; d=google.com; s=arc-20160816; b=0c0QrQ5nx+wH3sTkzhcFzkhuU6YMb0/h+UmQkK/a9p3LW/9v96JTyUyztywEjdOadO LRg5NKTKVbNQMk9a1GE1Lvj5TuUYbZB1M+tMbQZDTAoQWyDmvjbIt2JPdgTjFoZgJAGq eV8cnbkRMGiGvWVfVJijlMUTIz1hrwEs0fIuKRVVhchS7d9GAEIomi3MrerklhkylJd7 IpYA51PNJHmQy1xgFCHbV8byHevtd8o0OezP9EK03hy3mw76LY6fQfm60JO6FSm7BQbb 3cqUoz21x+TITgsF5Ygfn4Ebk38SAN7Eijptrf+anT7dn141c4mqXJwXc2UlV5KbIg+L 7wFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=IM8uFFjktw/ArRQY4pKtPtCAfjrzN2zD/tu6+11y5yg=; b=cZVubap/YutBEgkRKxhnoRKEO4doCSPCppMyBNNkUjXkUO9080ebmYgjbEuJSDPsE0 /fvcAM9jY0N48FwpwwzlZGIJzeGhXhRYBs9Xmne27gbH51epDWo1SI8+kD69Yj/eTNeM o7GNRddvBq77Tt/aAspqENHZvQWwHTHOpODrdOf23VQ99LVYeU406NemWCtvufMFti9Q klozy9pwtqkO/9kZIw/BB8MDiZ/UqBr7hKQ/NnFB44NlmhUyH87FGJ4p0hXqpYhckB/R zl31sJ+w583MK5dLz1QhnOeoBywxTcUq9aaTd5J1YwtOE07Pr2SwUvSx839aXfVUGYCb WkxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g72si2878246oib.157.2020.01.28.04.40.43; Tue, 28 Jan 2020 04:40:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726281AbgA1Mjn (ORCPT + 99 others); Tue, 28 Jan 2020 07:39:43 -0500 Received: from foss.arm.com ([217.140.110.172]:56266 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725852AbgA1Mjm (ORCPT ); Tue, 28 Jan 2020 07:39:42 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C9A35101E; Tue, 28 Jan 2020 04:39:41 -0800 (PST) Received: from p8cg001049571a15.arm.com (unknown [10.163.1.151]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 70C0B3F52E; Tue, 28 Jan 2020 04:39:39 -0800 (PST) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org Cc: Anshuman Khandual , Catalin Marinas , Will Deacon , Suzuki K Poulose , linux-kernel@vger.kernel.org Subject: [PATCH 3/6] arm64/cpufeature: Add remaining feature bits in ID_MMFR4 register Date: Tue, 28 Jan 2020 18:09:06 +0530 Message-Id: <1580215149-21492-4-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1580215149-21492-1-git-send-email-anshuman.khandual@arm.com> References: <1580215149-21492-1-git-send-email-anshuman.khandual@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enable all remaining feature bits like EVT, CCIDX, LSM, HPDS, CnP, XNX, SpecSEI in ID_MMFR4 register per ARM DDI 0487E.a. Cc: Catalin Marinas Cc: Will Deacon Cc: Suzuki K Poulose Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/arm64/include/asm/sysreg.h | 8 ++++++++ arch/arm64/kernel/cpufeature.c | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 469d61c8fabf..fcbbf287478e 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -718,6 +718,14 @@ #define ID_ISAR6_DP_SHIFT 4 #define ID_ISAR6_JSCVT_SHIFT 0 +#define ID_MMFR4_EVT_SHIFT 28 +#define ID_MMFR4_CCIDX_SHIFT 24 +#define ID_MMFR4_LSM_SHIFT 20 +#define ID_MMFR4_HPDS_SHIFT 16 +#define ID_MMFR4_CNP_SHIFT 12 +#define ID_MMFR4_XNX_SHIFT 8 +#define ID_MMFR4_SPECSEI_SHIFT 0 + #define ID_PFR0_DIT_SHIFT 24 #define ID_PFR0_CSV2_SHIFT 16 diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 9e4dab15c608..73fc8e02ed99 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -325,7 +325,14 @@ static const struct arm64_ftr_bits ftr_id_isar5[] = { }; static const struct arm64_ftr_bits ftr_id_mmfr4[] = { + ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, ID_MMFR4_EVT_SHIFT, 4, 0), + ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, ID_MMFR4_CCIDX_SHIFT, 4, 0), + ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, ID_MMFR4_LSM_SHIFT, 4, 0), + ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, ID_MMFR4_HPDS_SHIFT, 4, 0), + ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, ID_MMFR4_CNP_SHIFT, 4, 0), + ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, ID_MMFR4_XNX_SHIFT, 4, 0), ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, 4, 4, 0), /* ac2 */ + ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_HIGHER_SAFE, ID_MMFR4_SPECSEI_SHIFT, 4, 0), ARM64_FTR_END, }; -- 2.20.1