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 9EC17D2CE08 for ; Tue, 22 Oct 2024 16:59:51 +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:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:CC:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zqTktaHPayemBZLgWk6cwfeyy5b4eGN/FjbqP9LY4wE=; b=u2njh/L6/ZFSo3PmCwON0dhAsQ g5hA86j6j28Qx9h2/dPis6gmCRiFsJ/N00Xo4in8VIcnGZDKGuesJTJVxlcXc/UIFty0iFHxCuPXp 18tu/RFBLnIh4i+ccqS5yefCSFlqcqpDwzhY4LcnGrZgz1pXi4kjA/BviPglA+/COOFW2WMbDC6N2 NVdKyMC7VAwRdihJfGpAowKKyStSGZjn0e+HH+ckinACgarjF272ulwmEkoWOUUXUvrT8ziQKg3qg 5YjvfC29X8kh0hXIgYUykz5GLx75aBjCM8XlaMtMvrGe24h5ae/K/1L5NUqZvi7q611a1ja1y+v0p Ii5QSO/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3IEN-0000000BZSr-423w; Tue, 22 Oct 2024 16:59:39 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3HoN-0000000BTl9-1laY for linux-arm-kernel@lists.infradead.org; Tue, 22 Oct 2024 16:32:49 +0000 Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4XXyPL0kX9z6K5lW; Wed, 23 Oct 2024 00:31:50 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id AF8D0140A9C; Wed, 23 Oct 2024 00:32:45 +0800 (CST) Received: from localhost (10.203.177.66) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 22 Oct 2024 18:32:45 +0200 Date: Tue, 22 Oct 2024 17:32:43 +0100 From: Jonathan Cameron To: Yicong Yang CC: , , , , , , , Subject: Re: [PATCH v2 5/8] drivers/perf: hisi: Provide a generic implementation of cpumask/identifier Message-ID: <20241022173243.0000183a@Huawei.com> In-Reply-To: <20241022145305.47056-6-yangyicong@huawei.com> References: <20241022145305.47056-1-yangyicong@huawei.com> <20241022145305.47056-6-yangyicong@huawei.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.203.177.66] X-ClientProxiedBy: lhrpeml100001.china.huawei.com (7.191.160.183) To frapeml500008.china.huawei.com (7.182.85.71) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241022_093247_638533_97D4AFEB X-CRM114-Status: GOOD ( 13.90 ) 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 Tue, 22 Oct 2024 22:53:02 +0800 Yicong Yang wrote: > From: Yicong Yang > > Each type of HiSilicon Uncore PMU has the following sysfs attributes: > > - format: bitmask in perf_event_attr::config[012] of corresponding > attribute > - event: events name and corresponding event code > - cpumask: range of CPUs the events can be opened on > - identifier: the version of this PMU > > Different types of PMU have different implementations of the "format" > and "event" but all share the same implementation of the "cpumask" > and "identifier". Thus we can move cpumask and identifier to the > hisi_uncore_pmu framework and drivers can use the generic > implementation. > > Signed-off-by: Yicong Yang One trivial unrelated white space change crept in to drop if you end up respinning for some other reason. Reviewed-by: Jonathan Cameron > diff --git a/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c b/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c > index c47d33ccb489..742fb67d8a02 100644 > --- a/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c > +++ b/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c > > @@ -485,6 +462,7 @@ static int hisi_hha_pmu_dev_probe(struct platform_device *pdev, > hha_pmu->pmu_events.attr_groups = hisi_hha_pmu_v1_attr_groups; > hha_pmu->num_counters = HHA_V1_NR_COUNTERS; > } > + stray change. > hha_pmu->ops = &hisi_uncore_hha_ops; > hha_pmu->dev = &pdev->dev; > hha_pmu->on_cpu = -1;