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 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 0AF15C433EF for ; Mon, 20 Dec 2021 09:00:46 +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: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RnHs9s7bF3D/BifK4U9j/oe+rS+B1jp6LcXmTqQoNQo=; b=40YCouhG0tTaAV GiwbhUUmub3s1lfA4I/dntaVjtwd/f5DaxENMHDJUDNj3TXpcMHBCdgGLaqDQ+JG07qMdnZM+d57p YQVvEseu+gxK/ZmyxIcAC8ahrCaObt6vmcpbR6iuOTRRA1KyNIlH+WAFXDfuuiBs5kip7P+Dp/m0g DFBrEV0BAFF3S8mvs/7hv9WigqhT3/6iHyRM8bTPOdHaUO2j3qyG5tZzmMvMgzxO6hNhbb5ZJjiUd 3SLHpu4WU6m/xUGMxe5PU6qFWaVG+7pbRe6qOnoUfH3swIAxu8Gcqo7MCGkY/c8QMxq3OXE3TGx2L O9Uj6fQYfVQJ4+xOZgXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzEVz-001KNj-V7; Mon, 20 Dec 2021 08:59:28 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzEVw-001KMH-12 for linux-arm-kernel@lists.infradead.org; Mon, 20 Dec 2021 08:59:25 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 3710FCE0FCD; Mon, 20 Dec 2021 08:59:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5904CC36AE8; Mon, 20 Dec 2021 08:59:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639990758; bh=46RsZo0ws/9+quKAbHwL7TKhtpHgmtSERbH+0eEU3XQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=la4N0kT0Qu5OqhBpo9fcvp+AC3nu/zQgQasedz2erOtkA5e/UaiFga+2RrpU928L4 CocgEKFHiOWw6xvBnTMs0IF8qlrcDHMXemBN0Uuny+D4j5nMB7kwf8A0URh/Q3K3+I 3lDGJnHcZ6LkyfIUa821b0xp45c71VoNcSqRgqDu3zvmk4xy+5Nryh1H8N8MjoisG8 Tk/mzzVfc8YRRuoS6rRJ7C/b+aGpk1k05BzeIXT7Auxsb3urz4XgwxbLm0TycAxl2/ Rz1zxCmnTd3SyryXR7EfZ125F8B3WZzGRcXk7kKVYjpH1gGrsqEE4v+VvteUD6MYFx 788vEIKr3qMfw== Received: from cfbb000407.r.cam.camfibre.uk ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mzEVo-00DF71-7R; Mon, 20 Dec 2021 08:59:16 +0000 Date: Mon, 20 Dec 2021 08:59:15 +0000 Message-ID: <87mtkvwt24.wl-maz@kernel.org> From: Marc Zyngier To: Florian Fainelli Cc: linux-arm-kernel@lists.infradead.org, Chris Healy , Will Deacon , Stefan Wahren , vincent.weaver@maine.edu, Mark Rutland Subject: Re: [PATCH v3 0/5] In-Reply-To: References: <20180518143913.26306-1-marc.zyngier@arm.com> <20180521181948.GB19122@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: f.fainelli@gmail.com, linux-arm-kernel@lists.infradead.org, cphealy@gmail.com, will@kernel.org, stefan.wahren@i2se.com, vincent.weaver@maine.edu, mark.rutland@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211220_005924_447062_60635C4B X-CRM114-Status: GOOD ( 40.54 ) 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 Hi Florian, On Sun, 19 Dec 2021 23:46:32 +0000, Florian Fainelli wrote: > > Hi Will, Marc, +Mark > > On 5/21/2018 11:19 AM, Will Deacon wrote: > > Hi Marc, > > > > Thanks for this. > > > > On Fri, May 18, 2018 at 03:39:08PM +0100, Marc Zyngier wrote: > >> PMUv3 has been introduced with ARMv8 and, while it has only been used > >> on 64bit systems so far, it would definitely be useful for 32bit > >> guests running under KVM/arm64, for example. > >> > >> There is also the case of people natively running 32bit kernels on > >> 64bit HW and trying to upstream unspeakable hacks, hoping that the > >> stars will align and that they'll win the lottery (see [1]). > >> > >> So let's try again, and make the PMUv3 driver usable for everyone. > >> > >> This is done in three steps: > >> (1) Move the driver from arch/arm64 to drivers/perf > >> (2) Add a handful of system register accessors so that we can reuse > >> the driver on 32bit > >> (3) Provide the same accessors on 32bit, enable compilation, and > >> make it the default selection for mach-virt. > >> > >> Tested on a Seattle box with 32bit guests. > > > > I think we should go ahead with something like this, but I don't think > > we're quite there with these patches. If we're going to move the arch code > > out into drivers, let's do that for the perf_event* files under arch/arm/ > > as well. Then we could have a structure along the lines of: > > > > > > drivers/perf/arm_pmu.c - As it is today > > drivers/perf/arm_cpu/xscale_pmu.c - Only builds for 32-bit > > drivers/perf/arm_cpu/armv6_pmu.c - Only builds for 32-bit > > drivers/perf/arm_cpu/arch_pmu.c - Works for v7/v8 on > > both 32-bit and 64-bit > > There has been a recent renewed interest in this patch series from my > side as well as other users, and I have picked up where Marc left and > started moving the Xscale and ARMv6 PMU drivers as Will had asked the > current result can be seen here: > > https://github.com/ffainelli/linux/commits/arm-pmuv3 Blast from the past! > > It is not entirely clear to me what you had in mind when you want to > have a common driver for v7 and v8 under > drivers/perf/arm_cpu/arch_pmu.c. How much sharing or consolidation > would you expect to be done there? The v7/v8 models are very similar (they share most of the registers, and there is only a few bits and pieces that differ between PMUv3 and its ancestors). It should be possible to build a single driver However, the 32bit PMU code is bundled together with the Krait/Scorpion code that isn't quite the same. Maybe this should be spun as a different driver if this can be disentangled neatly enough? M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel