From patchwork Thu Jun 1 03:01:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilkka Koskinen X-Patchwork-Id: 13262922 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 9F2E3C7EE24 for ; Thu, 1 Jun 2023 03:03:05 +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: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:In-Reply-To:References: List-Owner; bh=+sRVGptI6bBzjay/2fGliAlZdTBwDPjAyjgLb+0aa3A=; b=Ghf0jEXyo+OdGO Gt9ncWMzw1+xNRjU98PTtfrrKjAGFwAnbnw7NmOGJ3Ms4Rnmo68yjvEewQ3z3ID6Zsh2baJvhhdg3 cgvwXHTZZolXC+dqaJsh1Ghq3t+7rpwe6YlhWHKZxXmCOzFhVArlEqF0opt9T0h/ADk0FGCTKHjO0 C05YE1iNMt5mgUjUuwu2YVYfccW88SdI20Ik6fi39brioK80tv9jPnHUWch7KyUsYH8aiAXBV8sMq si2PrCeNlFXwrAixfMQRwSugXSCKyDTOt+9dSo94uCigt7HLuBuIzCYB10FyGgQ7hQg6XPvlrm1mu xg25f6OMZj7MDNwoyUHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q4YaF-001lOM-1Z; Thu, 01 Jun 2023 03:02:39 +0000 Received: from mail-mw2nam10on20711.outbound.protection.outlook.com ([2a01:111:f400:7e89::711] helo=NAM10-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q4YaC-001lN6-07 for linux-arm-kernel@lists.infradead.org; Thu, 01 Jun 2023 03:02:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e4n7wtRLLK7Rco5obE5F51Rs043bQLFKy/R25ZzTS6YWGTde9/f4cuTKTwZD0Y8G0gIcJmxta8cvx5RbUiJSQ5h/FwTQ1a+kxp+6TmL1ouuwXAwtr4V3wSekgZVoAWWNiRJoiU6AZoGOil8wX4ORomT8TkimaITvPj5coV3icvsfzgXk9kxektC9wb1/dsXsaxcDsvGtqJWlYKFPO1Jv8/22cflEDjdJ9ThVY4y58vv1dS5nZ5+a53TKygXzn7qt8jbuDCngKoUpzLLYdAMVJ/9KhvD8qNcpR8qVNsJwM9UURybHf7uP2VOPMo5fqOP+BFRDJXQuYc+fwPNrD+HKdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=d65Wo5EG9F8HQayaLlS48GXBxOZlohrCEMTy3Z++FE8=; b=H17vuTRI9jMEPZT/A3b/o5Bb6dzn8io0KIqbsoF8PKXVFupLTbPDf+Ik65HTXYYhYDW/ccLytzO7D6qmqvIzAzh0f9TOdRJFplg+wTfbev8Hym/2rhf6q6kF9759UaDk1JHCJKNq4CHZYQk6FimHJvSWYPgFG/HNr9tnzc2t04UmQslY45xztOmIHuQp6iKPlUfvAqE0qzGNCn0lyPbKHhO0vBC5Dn0ALfN5F0DiSrZVy9bYxRf9m38SBZ/uBP36tX5+xAFsvzoyJmp58/DJ/yx1q0TazHMy05rdje1nnwQAg5RsWj7zH85gxkevn0ZG+qPFg8rDeG/1axkGAXQmAw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=d65Wo5EG9F8HQayaLlS48GXBxOZlohrCEMTy3Z++FE8=; b=Rfk21SkI3t0FXykkdxo52CQDfgTF7fAVkiTJlIaY7oRjGSneUhMfrJg8zI/ALH4vJlWgtjTv1qiKCfaQjqtaF+BKyiJ2NrGe2gtOTYZiuLVU7fo8qvmgQUdngNOXEloc/aayxnMRY3wb2eygO4ym/ZsASlmlbbl/RLNoUvyEOLU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from DM5PR0102MB3590.prod.exchangelabs.com (2603:10b6:4:a4::25) by DS0PR01MB7889.prod.exchangelabs.com (2603:10b6:8:143::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.23; Thu, 1 Jun 2023 03:02:24 +0000 Received: from DM5PR0102MB3590.prod.exchangelabs.com ([fe80::5aae:2a5e:15f5:8196]) by DM5PR0102MB3590.prod.exchangelabs.com ([fe80::5aae:2a5e:15f5:8196%2]) with mapi id 15.20.6433.022; Thu, 1 Jun 2023 03:02:24 +0000 From: Ilkka Koskinen To: Jonathan Corbet , Will Deacon , Mark Rutland , Besar Wicaksono , Suzuki K Poulose , Robin Murphy Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ilkka Koskinen Subject: [PATCH v2 0/5] perf: ampere: Add support for Ampere SoC PMUs Date: Wed, 31 May 2023 20:01:39 -0700 Message-Id: <20230601030144.3458136-1-ilkka@os.amperecomputing.com> X-Mailer: git-send-email 2.40.1 X-ClientProxiedBy: CH0PR08CA0015.namprd08.prod.outlook.com (2603:10b6:610:33::20) To DM5PR0102MB3590.prod.exchangelabs.com (2603:10b6:4:a4::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR0102MB3590:EE_|DS0PR01MB7889:EE_ X-MS-Office365-Filtering-Correlation-Id: ae5d2ca1-be7f-48b8-595f-08db624c9fe2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aybqQzoH7LCJ2q1NN4LGi5daBimdjMeSa7iHAh/7OEtqFHjLpiD6wz1ey6c+roDgPDuW69xmXuxeHj3nBDU41jXxCIoLtdKt0jRv4S7cca5NW4k3qvibxxbHp5vrMi0H+6R10oObCax6Rf39N/SPTz93g9aZYuRUZWYdjquQ4pYZ8Ns82Y4mQLIrDvV22IPSUQh1nZfc3fMfv6k08PlJboSCB3z0fzItC8TGGmGHngDZh76RoOxrTLBMX1YaKS/BsvkkC+yBUWtR/0kt1g/r/lpp0O4u3rHWaG6nf6vjGNmTdNJEN1x/Y16fgabDSblPN4Ov/zytxXUBJ8NtdXg7FRHfpeHKDLJmCuK7tCIdca5qu4/bI6uFtsnssccngUGx4UKkKH4Mqer2OcR6ixwoBc89BTo8SfZyiYZchJ28dP7MAToYcfnCKxnzrv+W5E/sLDaM6rabnKVWygM2YUrbOJO0ui5Prwi3/Sm465XZmKKNQm/m7/iaZvCpn3VDxx5UdDuK5pWGmLN0Uo0SdkFvmmSDH3PRBqgqGyPRC3c0OPcXumU6+yoePgyYX8oLvTsE14j+dWUfVxFX/WnxEvx/38aa5wNU1ogjNipoTYgBBWIwSE2EfQcKOlD9XiIbkx1l X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR0102MB3590.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(376002)(39860400002)(136003)(366004)(346002)(451199021)(4744005)(83380400001)(2616005)(2906002)(86362001)(38100700002)(38350700002)(6666004)(41300700001)(316002)(6486002)(52116002)(5660300002)(8936002)(8676002)(478600001)(110136005)(4326008)(66476007)(66556008)(66946007)(26005)(186003)(1076003)(6506007)(6512007)(107886003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Y8WXbugDVQcJvzqe9inXCCsiTqx9jAZx0RSDLtWiXX+pTTRlFPmD0JvuEsHM5i48Eq0AZD+M5SkFlKC8dkxTveqP4jd3j66oqc5NTG9yRqcjBGjh4em9BMotsiM4e8oAKLvbb9Kyp7y3cLc67rG3NWwAW1MF1ogHUxhtO1PjNYHWRPlemiiroBMMeHiWdA2dp8PFMK8OHBGghpanvntXTNmVUtHR7aquC/4pZD1NWsT7SY+YkWSypePn38wYczDUcsFU4t6wI3GR0WZ1FccCOi27IUL4a2BrLTUO5mZ+z/fu/QMNZe7NGUdvsVyJXOVNJ7TCvk4Xn2g/2C/xuLOpfPVj1wKp85CmdifUSxNKByhec39QT3sBW479C1MNyWCJvCQ4NqMpwvfdDqP3pDGn0v9QzIVLw5xr/DMvEMn5HEN/MS5HySQHoN/Y1nkMY3IKz32Ey7BIcoXygH0yxgsKZQCjwUcUlFmkeDrLTLLllMUhJ2ytydLAoijG1ZU0SIohNMVhuq+xLS2GK+tNGDkSqiLAyOlifNksbilrNz2AZ4qZNcFFVmqOBNKuI8SR7szFh5TbP8E0vF8lcP9C7r4M0Lbzj4+JGIQvyuL8fJR0BsWMNbxsv8fwwg2Vk+Dk97DElEDZeJSlbCVoXGhrWe1jgIfUnc18a4Ck8irWWVc/9rDE74F+/X8Aq09LwS886UuJU3WnLSID4xWmd8laCjstiGSkfpnSPbwecf+GwiaXNmp4xo4ukOYHE1Rq75WMR2W1vj3UKjZpdlbJCZeNtA6/YM6clC+NwU3mWZD3K93727qiorYZQDQDBeQqMzIcxMwI/FbyPQppD+zS6fN6zr583dW2czVdwovJB8mFKVqF6tztbh6y+XBgr6RYKbdm3Ly1VCFSMuhbonswdm7gePrRbvzgG8qyQES2UblFTJKN4c9GlKqvPPdgfTAdyUzSY/lIPT8E4apliUtIR3BJshp+rG3msng9toKimUup/FLYJ95L5XJLGzh2ECCfi4F2C9YJs+n+g5E2rZjaya+NwLE/6knWSNeJExooqBwk6mLWLgbQfWgo7CduCIFKl0HGSoQo+3qdv5hij1KoLXc15Kn5GEKoQ1ntJo16HjoSPGhos5zM0c2A8E9B9m2xZZsLM4s5c8+pbUXg9qXmagSCXJ4g4h0ICsCoNf/gFL1t0xpVEpZhSVKW+pRIyfnbDL8LRvi3HORG3KU7ltmtwCuKgWa3vQ+mGAO7B2ImJbx1BayEAIpRqRFOU+6yXSJr4Af3RnOXZqnXUrJH2pPvKTn5jT1IWlmCusrVfS+qWD/bW6UqfjpE9LKFOOH/rFhQKWMJPENs/3XFLDBOo0Q+4gbR9ckEZWyTk+JaFN6gPvtBl4SP9f1mpp5ij3zSSJfisMoofdCbjSl34xFi2NFNaoT8L3jHzWruPITWmceyrJBVSHrADl3b8zce8aZkfS1y4j5ikHaGqTvX6SW9zOiML9oDhwG20oaQmYLNrci4vSknJGKTKy0bkT9HkvDPebQqcJoEy2wi/0oCaw6ehH+MDw3S0nbTxWf5HFeO9+Ad9eGAXIzBoQqwYFzoZ9MQBQ0pKO5WidxZw/dQoh5a6kyVK3aJXHOEag== X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: ae5d2ca1-be7f-48b8-595f-08db624c9fe2 X-MS-Exchange-CrossTenant-AuthSource: DM5PR0102MB3590.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2023 03:02:24.4106 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hIwQFEMDnHsLYaYJwoGf8f+OAq+gkynlCFblxzRp4g0xv25e/xcbs+Wr0FldS7t6hdZS2jDZYen7xChA1GMPiTDVl/IQYzxMszdk4VlOa97PZ8ArxRjokKEUeWOuweap X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR01MB7889 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230531_200236_099908_769BFAED X-CRM114-Status: UNSURE ( 9.26 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Changes since v1: * Rather than creating a completely new driver, implemented as a submodule of Arm CoreSight PMU driver * Fixed shared filter handling Ilkka Koskinen (5): perf: arm_cspmu: Support 32-bit accesses to 64-bit registers perf: arm_cspmu: Support shared interrupts perf: arm_cspmu: Support implementation specific filters perf: arm_cspmu: Support implementation specific event validation perf: arm_cspmu: ampere_cspmu: Add support for Ampere SoC PMU .../admin-guide/perf/ampere_cspmu.rst | 30 +++ drivers/perf/arm_cspmu/Makefile | 2 +- drivers/perf/arm_cspmu/ampere_cspmu.c | 232 ++++++++++++++++++ drivers/perf/arm_cspmu/ampere_cspmu.h | 17 ++ drivers/perf/arm_cspmu/arm_cspmu.c | 31 ++- drivers/perf/arm_cspmu/arm_cspmu.h | 7 + 6 files changed, 312 insertions(+), 7 deletions(-) create mode 100644 Documentation/admin-guide/perf/ampere_cspmu.rst create mode 100644 drivers/perf/arm_cspmu/ampere_cspmu.c create mode 100644 drivers/perf/arm_cspmu/ampere_cspmu.h