From patchwork Tue Dec 7 15:07:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 12695160 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 04C37C433F5 for ; Tue, 7 Dec 2021 15:27:23 +0000 (UTC) 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:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fHgaBtC9Md+bOEXD1azLQst1fzoQKewE/1Ql39aHRNw=; b=ZpqlSac5egJKRy uHlWqU5zhq7Rv1/6Fd3uX9O2A104t6f/NvIRnLyYk0JTOGnpvb3jjlpO/85/KMjDTAQjcp5c+v1hg OC3v7h4y9NqM6OwdQbyDjTa5VVGJYUWdSrt8hgLEU+cdjLSavrWsVnBPeHw6RAqySrP8UQgrhe8C7 WAgdNkdUTFRkmxKgxXPtntjWyIkIhf0zTBNrIj0RystZa0slS5q8f07plAOeEm+BNVeQ/mpdqcXnm u6hCPYsLVMwbEK+ObsI4a7iA/u8LjGQ9ATIP6Ptr3SERAFu0W0fNX8L8A9mwm/J3CGAOnK8aW0D0S dCD4TdriqBnSMtxw28FQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mucLV-009CK4-Tb; Tue, 07 Dec 2021 15:25:35 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1muc4a-0096ST-5i for linux-arm-kernel@lists.infradead.org; Tue, 07 Dec 2021 15:08:05 +0000 Received: by mail-wr1-x42d.google.com with SMTP id u1so30064861wru.13 for ; Tue, 07 Dec 2021 07:08:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/RhMDsMYpJArj85ePJZA76IVQF/IHDWU7SNFhbUBUTI=; b=dgw2zeSVUupAmUvu1P8BZSoOduMra+cMYNjWSPg35k5/FeE2+qb8O2qTlzJFjER7/F WK3qsTV3dVwOuGZHr0DjH365AD0B+y7oTBAlVyRMSkNL7aVY8yZKTSh2F/bVKc/IXsYO yk3Bc3Hqb5weMkspXuQoylVp7yz2vV7ne/MhXNlVbnCIz7vi7J/m/BAWy6/ceY+Sr8m8 A/95Z+KW/FGoh1xKpfwkzyGEijHYLE+6nPiXVT6DKLA5fVF7v0HF1WGWl2p6bu3ICAe2 g1anFudrzryE92MWnn8TIRbyRYsACTkUDtDgwenkml4wBr+AuFX/mXE4VItZxdWlFH8S oz1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/RhMDsMYpJArj85ePJZA76IVQF/IHDWU7SNFhbUBUTI=; b=lbQZo6c4A9FM5b8UqoOOKDvC4dw1ZI77rIlGqRaFMVLNcGmYHCUElRr/1NFabW8Sfw 8rEUAJshLX/WH8UXf2p6zNnB9Ropg0RLv+E/+It9GI3LY9JYf//AsuAcOazV6EfxwcPQ zIzMmXYYbrpgltBPMyMhe3GPmXqkUW8Yhu4dIwPEMJdtjPk/c5HIQMpRv9VUxc+KmwIU j+CNvYZYN1YQsEPonWA5ISx7VpccgqsMOPMZ50cupDzHtOe4GJFksbFwGs6bhTTy2zE1 VlZ3p4L8O2BhrTCSFPUXMaTNEBMoM6FfPNGQSXzk2NwRPc7ULbN09E90+FAU6S8BZrvy V14A== X-Gm-Message-State: AOAM5319sDw1oplJWjtUAlzmEuwcXj/moP9M6cMdipKWiJ9rW64AfiaH Idw1kjSBtym82kSDzdSyttk= X-Google-Smtp-Source: ABdhPJwCsE4EfZj1BDtABSuSPH0m8azfXayNzV69e+L8Do5HH43Um319dVT5lEsQVeA/KutJ30YXCg== X-Received: by 2002:a5d:52c3:: with SMTP id r3mr52542133wrv.115.1638889682511; Tue, 07 Dec 2021 07:08:02 -0800 (PST) Received: from localhost ([193.209.96.43]) by smtp.gmail.com with ESMTPSA id z18sm14633280wrq.11.2021.12.07.07.08.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Dec 2021 07:08:01 -0800 (PST) From: Thierry Reding To: Will Deacon , Mark Rutland , Thierry Reding Cc: Rob Herring , Jon Hunter , linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/3] arm64: perf: Support Denver and Carmel PMUs Date: Tue, 7 Dec 2021 16:07:45 +0100 Message-Id: <20211207150746.444478-2-thierry.reding@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211207150746.444478-1-thierry.reding@gmail.com> References: <20211207150746.444478-1-thierry.reding@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211207_070804_251684_B527ABB6 X-CRM114-Status: GOOD ( 13.05 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Thierry Reding Add support for the NVIDIA Denver and Carmel PMUs using the generic PMUv3 event map for now. Signed-off-by: Thierry Reding Acked-by: Mark Rutland --- arch/arm64/kernel/perf_event.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c index b4044469527e..8c8cf369c450 100644 --- a/arch/arm64/kernel/perf_event.c +++ b/arch/arm64/kernel/perf_event.c @@ -1247,6 +1247,18 @@ static int armv8_vulcan_pmu_init(struct arm_pmu *cpu_pmu) armv8_vulcan_map_event); } +static int armv8_denver_pmu_init(struct arm_pmu *cpu_pmu) +{ + return armv8_pmu_init_nogroups(cpu_pmu, "armv8_nvidia_denver", + armv8_pmuv3_map_event); +} + +static int armv8_carmel_pmu_init(struct arm_pmu *cpu_pmu) +{ + return armv8_pmu_init_nogroups(cpu_pmu, "armv8_nvidia_carmel", + armv8_pmuv3_map_event); +} + static const struct of_device_id armv8_pmu_of_device_ids[] = { {.compatible = "arm,armv8-pmuv3", .data = armv8_pmuv3_init}, {.compatible = "arm,cortex-a34-pmu", .data = armv8_a34_pmu_init}, @@ -1265,6 +1277,8 @@ static const struct of_device_id armv8_pmu_of_device_ids[] = { {.compatible = "arm,neoverse-n1-pmu", .data = armv8_n1_pmu_init}, {.compatible = "cavium,thunder-pmu", .data = armv8_thunder_pmu_init}, {.compatible = "brcm,vulcan-pmu", .data = armv8_vulcan_pmu_init}, + {.compatible = "nvidia,denver-pmu", .data = armv8_denver_pmu_init}, + {.compatible = "nvidia,carmel-pmu", .data = armv8_carmel_pmu_init}, {}, };