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 E04ADC3DA4A for ; Fri, 16 Aug 2024 10:30:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=P87BIJ/EPTTWRdIzFPobL6wOkXU94J5lfnRtq68T8Rc=; b=VR13x+ugcjxxwRjEWv989HibUn AvZF002x1F0vHUgBs6g4salqopaQEm1lnC08hC1iwbU6FF1FELolYZd5DBeaTQnOrr3O8UZ6jU973 BXIG/AjQf1+geACCnNk+GyMJTZRN7JwsJwhuOyYxUUShR3YdPucUSOGGT9Tt28vT3Na5gM0MnDWBU +iQ0leAwvEpRhdbm5ANisMcqHxy4WHqHykAgN3/ABajqBVv5SmoFm1kG6jyQ2h53yxe/BR1zDIija CXY2HKk0uokZj0dYuDretuSE3zM6WyYFQfYRhgjL//1JjtOVDnK+6kYmrUs/RTtObu6xEAmS/Ug3v edPhvP0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1seuDU-0000000CarK-04O2; Fri, 16 Aug 2024 10:29:56 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1seuCp-0000000CamR-2jh8 for linux-arm-kernel@lists.infradead.org; Fri, 16 Aug 2024 10:29:16 +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 18E7C143D; Fri, 16 Aug 2024 03:29:41 -0700 (PDT) Received: from J2N7QTR9R3 (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 154F53F73B; Fri, 16 Aug 2024 03:29:13 -0700 (PDT) Date: Fri, 16 Aug 2024 11:29:11 +0100 From: Mark Rutland To: Robin Murphy Cc: will@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, ilkka@os.amperecomputing.com Subject: Re: [PATCH 6/8] perf/arm-cmn: Refactor DTC PMU register access Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240816_032915_752196_658E860D X-CRM114-Status: GOOD ( 13.18 ) 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 On Fri, Aug 09, 2024 at 08:15:45PM +0100, Robin Murphy wrote: > Annoyingly, we're soon going to have to cope with PMU registers moving > about. This will mostly be straightforward, except for the hard-coding > of CMN_PMU_OFFSET for the DTC PMU registers. As a first step, refactor > those accessors to allow for encapsulating a variable offset without > making a big mess all over. > > Signed-off-by: Robin Murphy > --- > drivers/perf/arm-cmn.c | 64 ++++++++++++++++++++++++------------------ > 1 file changed, 36 insertions(+), 28 deletions(-) Aside from a minoe comment below this looks fine to me. > struct arm_cmn_dtc { > void __iomem *base; > + void __iomem *pmu_base; > int irq; > - int irq_friend; > + s8 irq_friend; Unrelated change? AFAICT there's no reason for 'irq_friend' to change from 'int' to 's8', and nothing in the commit message explains it. Otherwise this all looks fine to me. Mark.