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 X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E2C8C433E6 for ; Tue, 26 Jan 2021 11:49:39 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3534323101 for ; Tue, 26 Jan 2021 11:49:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3534323101 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FsSRJwwI2HvXdhxkwoCQveiMgBfFPnwJeCZPp8zW1rI=; b=ajmg5dJxg6HH63gG4gBCzNChb Noo18DQw50SR3lfxtudX00A545+klmJWGTzFRZCL7ehQuIYQdIlaWLKUWi4o2VCKLgjaohEDgChjh ZHmSjBQUJPfsKS+LrUbCqlc43hXsOkRtepYxsnzzEmDyIkoCxRonGUaIX21PXpBTVwMQvHGLUw0SM KwRdLp6h21SrD0teERoDYNbpj/BEY23lpJpxIbxBftrDDjFGICC5+HTr1kgiEV0Js7/7MY8Fw6x/y uzfUdTgs2K6cZvfhtzw9KMhSd7B+FqdYSFJgVnqk/MMWfGHQLrmyNb231lkDdkh1eI5lDub3fRkSf qT2miT2JQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4MpE-0000US-AJ; Tue, 26 Jan 2021 11:48:00 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4MpC-0000Tx-Su for linux-arm-kernel@lists.infradead.org; Tue, 26 Jan 2021 11:47:59 +0000 Received: from fraeml744-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4DQ4b412yQz67bhZ; Tue, 26 Jan 2021 19:42:08 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml744-chm.china.huawei.com (10.206.15.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 26 Jan 2021 12:47:55 +0100 Received: from [10.47.2.35] (10.47.2.35) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 26 Jan 2021 11:47:54 +0000 Subject: Re: [PATCH 2/8] drivers/perf: hisi: Add PMU version for uncore PMU drivers. To: Shaokun Zhang , References: <1609395576-32775-1-git-send-email-zhangshaokun@hisilicon.com> <1609395576-32775-3-git-send-email-zhangshaokun@hisilicon.com> From: John Garry Message-ID: Date: Tue, 26 Jan 2021 11:46:33 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <1609395576-32775-3-git-send-email-zhangshaokun@hisilicon.com> Content-Language: en-US X-Originating-IP: [10.47.2.35] X-ClientProxiedBy: lhreml717-chm.china.huawei.com (10.201.108.68) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210126_064759_045987_78EEB62E X-CRM114-Status: GOOD ( 17.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Qi Liu , Will Deacon , Jonathan Cameron Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 31/12/2020 06:19, Shaokun Zhang wrote: nit: the subject is a little ambiguous. Maybe could have "Add v1 hw PMU symbol versioning for uncore PMU drivers" > For HiSilicon uncore PMU, more versions are supported and some variables > shall be added suffiex to distinguish the version which are prepared for suffix > the new drivers. > > Cc: Mark Rutland > Cc: Will Deacon > Cc: John Garry > Cc: Jonathan Cameron > Co-developed-by: Qi Liu > Signed-off-by: Qi Liu > Signed-off-by: Shaokun Zhang Apart from some small issues: Reviewed-by: John Garry > --- > drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 95 ++++++++++++++------------- > drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 27 ++++---- > drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 24 +++---- > 3 files changed, 74 insertions(+), 72 deletions(-) > > diff --git a/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c b/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c > index 69ccbe02f1e3..7f940c47b833 100644 > --- a/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c > +++ b/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c > @@ -36,8 +36,8 @@ > > /* DDRC has 8-counters */ > #define DDRC_NR_COUNTERS 0x8 > -#define DDRC_PERF_CTRL_EN 0x2 > - > +#define DDRC_V1_PERF_CTRL_EN 0x2 > +#define DDRC_V1_NR_EVENTS 0x07 > /* > * For DDRC PMU, there are eight-events and every event has been mapped > * to fixed-purpose counters which register offset is not consistent. > @@ -53,26 +53,26 @@ static const u32 ddrc_reg_off[] = { > > /* > * Select the counter register offset using the counter index. > - * In DDRC there are no programmable counter, the count > + * In PMU v1, there are no programmable counter, the count > * is readed form the statistics counter register itself. comment on existing code: /s/is readed form/is read from/ > */ > -static u32 hisi_ddrc_pmu_get_counter_offset(int cntr_idx) > +static u32 hisi_ddrc_pmu_v1_get_counter_offset(int cntr_idx) > { > return ddrc_reg_off[cntr_idx]; > } > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel