Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6730049rwl; Mon, 9 Jan 2023 12:13:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXuT2OC+16kW31etJdIqF6RvZJ9wPndWo64/ngiSzdUJL/M9zTCQ4yC6PwOLBBZi6u+d0gio X-Received: by 2002:a17:902:9897:b0:192:f500:e831 with SMTP id s23-20020a170902989700b00192f500e831mr17736482plp.8.1673295216566; Mon, 09 Jan 2023 12:13:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673295216; cv=none; d=google.com; s=arc-20160816; b=omU7Cid0bUnxn3azlSJEQ3ODACTAHIzHG7yWKm7Aus04dS+4/jte1/+vfvTUipZUEn wEBKQXgMoBYfUv4Wc9+L2kTGYWft9T70AoBv/dpBzGHHHrlcZkIvIdNa0Wr9XV45XIuM t5OZ9VFY+SSo+i70nfX01NM3aaMX/ITdUs5iAXbOBqeQq/wMQ1lIMInG/d/GRgQXEJKa QrGlULe0FY4wn0kZL+rZIOLI7fSz/AflcfOGdB6ssR5nPZOesRFl99GnG2N6K9FZF3Ed dt1PU0lmxBYZZesLG0DKer9v59JpaplHyuT2+WBm/Kzm2MBcElaWwlPncKVbZZcWU1Q4 o7rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=jYXNYZPoEZW+cpasaK2qS1x4BldwPdfg2ohHEnkw8tk=; b=wPgouOVJhKYchpV+ogplJqksmWkhJJWsSFnJv6p0dBoqOgtp0ju/bI2TUv4olCpYiD drxwVMHUM1HvjwV18QvjxURYUgJMQodt42qZ5Aq8j/JB9hL2fXH1ddNXdOF8oNvw2LDa g8iuN4vGyaJBWGdSuP64Tk+GeKlhTh/fR5bI8nIOLAX9PSnPApQu3lQ7vDZPEhfh5jRD MzSCu14IX9OpcFJDFAU9+OQLRvYrHZOOvoSBUlJGZUkKfI7qLth0gIhIMEB0zgIj6wGl h9F6JMk181EVHt+UW7I053dnwq4pLuv2NUK4p3XzI7tnkh6pwkU3oXyLIAwacBWN3gOs /DRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u11-20020a170902e80b00b00188e877e8ddsi10737071plg.139.2023.01.09.12.13.29; Mon, 09 Jan 2023 12:13:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237270AbjAIT1V (ORCPT + 53 others); Mon, 9 Jan 2023 14:27:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237260AbjAIT1B (ORCPT ); Mon, 9 Jan 2023 14:27:01 -0500 Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1151F63389; Mon, 9 Jan 2023 11:26:46 -0800 (PST) Received: by mail-oi1-f171.google.com with SMTP id s66so7408095oib.7; Mon, 09 Jan 2023 11:26:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jYXNYZPoEZW+cpasaK2qS1x4BldwPdfg2ohHEnkw8tk=; b=kQGO3iEdLoOWs1SkqSU9Cp/VYjVBTvd+VIr8HmRaTSUPZCW5GqMXqKJZUPQJubbR34 jv1L743ZNUo0h61t6euXLvC8+Y6/wrMCthMfZzKBirZ6x/9yK3AOQpsBC8zyORUXVGCU oazwsjOvJCGHhKgKtEMBloVVYj49Ur7ZMmGbQVjrX7G8iTzrHfHl+gtvaEBGgHUj64Vg eL0ItaEvQiSJmJ0zvSTcQvvo1inOqX5INbKbgqBojb6Z6FJw4ghLwdWnICzFzkPFpZO/ pnKLmXlI20mM1bryGAz8whINnJBj/dz5mg96FgHO7KaKFWP9/mGYuDZdluh9NxFjm+z6 LHIg== X-Gm-Message-State: AFqh2kp4p6LtxSWvNI+ktJtLFPVGf9kp9gXLGJTZuTDz91ZMdyWd7Gqf 4aNuFry6JlG5vhBVdDsYSWCRgoF3Yg== X-Received: by 2002:a05:6808:190e:b0:35c:b79:8cf8 with SMTP id bf14-20020a056808190e00b0035c0b798cf8mr38989203oib.6.1673292405102; Mon, 09 Jan 2023 11:26:45 -0800 (PST) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id bg31-20020a056808179f00b00363b5a6bc9esm4343635oib.12.2023.01.09.11.26.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 11:26:44 -0800 (PST) Received: (nullmailer pid 1483616 invoked by uid 1000); Mon, 09 Jan 2023 19:26:31 -0000 From: Rob Herring Date: Mon, 09 Jan 2023 13:26:22 -0600 Subject: [PATCH v4 6/8] perf: arm_spe: Support new SPEv1.2/v8.7 'not taken' event MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20220825-arm-spe-v8-7-v4-6-327f860daf28@kernel.org> References: <20220825-arm-spe-v8-7-v4-0-327f860daf28@kernel.org> In-Reply-To: <20220825-arm-spe-v8-7-v4-0-327f860daf28@kernel.org> To: Peter Zijlstra , Will Deacon , Mark Rutland , Catalin Marinas , Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Oliver Upton , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim Cc: Mark Brown , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-perf-users@vger.kernel.org, James Clark X-Mailer: b4 0.12-dev X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Arm SPEv1.2 (Armv8.7/v9.2) adds a new event, 'not taken', in bit 6 of the PMSEVFR_EL1 register. Update arm_spe_pmsevfr_res0() to support the additional event. Tested-by: James Clark Signed-off-by: Rob Herring --- v4: - Rebase on v6.2-rc1 v3: - No change v2: - Update for v6.1 sysreg generated header changes --- arch/arm64/include/asm/sysreg.h | 2 ++ drivers/perf/arm_spe_pmu.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index db269eda7c1c..fc8787727792 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -221,6 +221,8 @@ BIT_ULL(6) | BIT_ULL(4) | BIT_ULL(2) | BIT_ULL(0)) #define PMSEVFR_EL1_RES0_V1P1 \ (PMSEVFR_EL1_RES0_IMP & ~(BIT_ULL(18) | BIT_ULL(17) | BIT_ULL(11))) +#define PMSEVFR_EL1_RES0_V1P2 \ + (PMSEVFR_EL1_RES0_V1P1 & ~BIT_ULL(6)) /* Buffer error reporting */ #define PMBSR_EL1_FAULT_FSC_SHIFT PMBSR_EL1_MSS_SHIFT diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c index af6d3867c3e7..82f67e941bc4 100644 --- a/drivers/perf/arm_spe_pmu.c +++ b/drivers/perf/arm_spe_pmu.c @@ -677,9 +677,11 @@ static u64 arm_spe_pmsevfr_res0(u16 pmsver) case ID_AA64DFR0_EL1_PMSVer_IMP: return PMSEVFR_EL1_RES0_IMP; case ID_AA64DFR0_EL1_PMSVer_V1P1: + return PMSEVFR_EL1_RES0_V1P1; + case ID_AA64DFR0_EL1_PMSVer_V1P2: /* Return the highest version we support in default */ default: - return PMSEVFR_EL1_RES0_V1P1; + return PMSEVFR_EL1_RES0_V1P2; } } -- 2.39.0