From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E723C4338F for ; Tue, 17 Aug 2021 16:35:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1546260FD9 for ; Tue, 17 Aug 2021 16:35:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1546260FD9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=XGvwzF8I0dSgYGaDJcQAYIeQRblqPViX0qE7GnG9Xuw=; b=qn9XdiJqf1U9e8 JpecYArtUKma5Ac9JErUx6gWdzluCnYFNGA4oPfjP03Cm2uHk9dE2HN9/d84ut4KEfva8D4mbAXi5 y574vOnHEkwj2VE4mI1AgASggSa3KH8jLMwoP4+ELy/LDq+Y2qK22nWR6qpPTB1iy2/khIas/QIRf twOcCONx4wZc/XbX93L0tXAdc19fkrhConOYN0MKM8k2ySfGc0kuqHAD1EU/zxMKWYDbHzoPMs6bC T+YTdROlMRZVGOzQpgYkiqBvMedgGnK+qXNf7KohWd4bFQzOGpeKHkY+0C29ebX79mEAe0GYVrNpw t5nafqVweB0XXTlu8qUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mG21q-002yhX-0F; Tue, 17 Aug 2021 16:33:30 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mG21i-002yf3-9s for linux-arm-kernel@lists.infradead.org; Tue, 17 Aug 2021 16:33:26 +0000 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 9117331B; Tue, 17 Aug 2021 09:33:17 -0700 (PDT) Received: from monolith.cable.virginm.net (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EF1E53F40C; Tue, 17 Aug 2021 09:33:16 -0700 (PDT) From: Alexandru Elisei To: mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org Subject: [boot-wrapper PATCH] aarch64: Do not trap PMSNEVFR_EL1 Date: Tue, 17 Aug 2021 17:34:20 +0100 Message-Id: <20210817163420.813631-1-alexandru.elisei@arm.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210817_093322_430774_2ACAE61A X-CRM114-Status: UNSURE ( 7.44 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org FEAT_PMUv1p2 adds a new register, PMSNEVFR_EL1, and a new MDCR_EL3 trap bit for it, EnPMSN. Set the bit to 1 to allow lower exception levels direct access to the register. Signed-off-by: Alexandru Elisei --- arch/aarch64/boot.S | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/aarch64/boot.S b/arch/aarch64/boot.S index 2215f7ed3a1f..8951f1e4676a 100644 --- a/arch/aarch64/boot.S +++ b/arch/aarch64/boot.S @@ -88,8 +88,12 @@ ASM_FUNC(_start) cbz x1, 1f // Enable SPE for the non-secure world. - ldr x1, =(0x3 << 12) - orr x0, x0, x1 + ldr x2, =(0x3 << 12) + orr x0, x0, x2 + cmp x1, #3 + b.lt 1 + // Do not trap PMSNEVFR_EL1. + orr x0, x0, #(1 << 36) 1: mrs x1, id_aa64dfr0_el1 ubfx x1, x1, #44, #4 -- 2.32.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel