Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1542034rwd; Tue, 16 May 2023 19:58:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ782hicb3f1vusnRmv3yOvc8COQTj0E7J6Vmc/BVp3v7cuBlRVI0qhBhlwEYozLRlNXt9MQ X-Received: by 2002:a05:6a20:3d19:b0:105:23cf:747d with SMTP id y25-20020a056a203d1900b0010523cf747dmr17709224pzi.5.1684292305876; Tue, 16 May 2023 19:58:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684292305; cv=none; d=google.com; s=arc-20160816; b=W8a52ty9ifIcvwRBTEZczNJVsPnKkZdno2V4y1wWiRGiJIVba8hkIR9dAaNchD6sc2 G8W5z9PWAPfZLTJSgHmd3J+uZAFLPJ5i3U65ENxmkS2aKcMllgHpbsgtq+PuiyjnIYRk LwZWud/G7IGKMxeCi7xsnGsT+Y+8eoVEy0OxzGDlqMvLItoaagN6Yb0cbLWWQXOGOJlp tU6AmAfyfPIgp4+gijttbYJG13tcAH/Md7fHZ88BvIrOTOuJRAqC0oq6p2rExWLWO6Kj qvUAyawV91XgVglL03WKM1xV0r/8IoA8TAN3bEhQFVQp54cXIBPxJ5bQRwS88T0Z5Agl uLcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=3PXcdgTKpGpozDLBKv81syNZk7P2vii8BUPgh+YxkCw=; b=RjNp6USktsOnv93M08ihnrVKDb6segMc3qmLomOtT36JmXl4GJrPcRenFKxYo25TRN ljmuzFDsXPj6DI7J77qLdSwSoRf5gGt84cHcNAMnVOE1SZJy+4C6/YmWPzevmL/cIHFc tQdioPdgo1YFMcUA4tn2Z2P7FjkevwbRsJDrwA79Fi+4EGeW7sssW8iippRXSW5YQkbB zvoDDeA8570U9qUoIa7/vNTY0rSQS4Xqo1xws1wKGMgyszSULthlmUKyr7HHziglsw+Y eB2D+528uvDUFgNmf0YD9oq9yRi6NcPUWwqwZPP+KzDu+luBbl8b9lGYlS0XSX5ua0ho m5zQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l71-20020a63914a000000b005308b2910c5si14116311pge.338.2023.05.16.19.58.14; Tue, 16 May 2023 19:58:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232119AbjEQCfu (ORCPT + 99 others); Tue, 16 May 2023 22:35:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbjEQCft (ORCPT ); Tue, 16 May 2023 22:35:49 -0400 Received: from out30-118.freemail.mail.aliyun.com (out30-118.freemail.mail.aliyun.com [115.124.30.118]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 639744ED3; Tue, 16 May 2023 19:35:34 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R471e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=xueshuai@linux.alibaba.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---0Viqoj7k_1684290929; Received: from 30.240.113.228(mailfrom:xueshuai@linux.alibaba.com fp:SMTPD_---0Viqoj7k_1684290929) by smtp.aliyun-inc.com; Wed, 17 May 2023 10:35:30 +0800 Message-ID: <18b27158-a8fb-e1d9-f85e-f12620b69bfb@linux.alibaba.com> Date: Wed, 17 May 2023 10:35:27 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH v4 3/4] drivers/perf: add DesignWare PCIe PMU driver Content-Language: en-US To: Bjorn Helgaas Cc: yangyicong@huawei.com, will@kernel.org, Jonathan.Cameron@huawei.com, baolin.wang@linux.alibaba.com, robin.murphy@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, rdunlap@infradead.org, mark.rutland@arm.com, zhuo.song@linux.alibaba.com References: From: Shuai Xue In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/5/17 03:19, Bjorn Helgaas wrote: > On Tue, May 16, 2023 at 09:01:09PM +0800, Shuai Xue wrote: >> ... > >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include > > Typically in alpha order. Got it, I will reorder them. > >> +#define DWC_PCIE_VSEC_RAS_DES_ID 0x02 >> + >> +#define DWC_PCIE_EVENT_CNT_CTL 0x8 > > Add a blank line here. Sure, will add it. > >> +/* >> + * Event Counter Data Select includes two parts: > >> +#define DWC_PCIE_EVENT_CNT_DATA 0xC >> +#define DWC_PCIE_DURATION_4US 0xff > ... > Pick upper-case hex or lower-case hex and use consistently. Will pick upper-case hex for all macros. > >> +#define DWC_PCIE_LANE_EVENT_MAX_PERIOD (GENMASK_ULL(31, 0)) >> +#define DWC_PCIE_TIME_BASED_EVENT_MAX_PERIOD (GENMASK_ULL(63, 0)) > > Unnecessary outer "()". Ok, will remove it. > >> +struct dwc_pcie_pmu { >> + struct pci_dev *pdev; /* Root Port device */ >> + u32 ras_des; /* RAS DES capability offset */ > > u16 is enough to address all of config space. Go it. will fix in next version. Thank you :) Best Regards, Shuai