Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1842771ybv; Sun, 23 Feb 2020 16:43:19 -0800 (PST) X-Google-Smtp-Source: APXvYqyc+PveyOG8ghALUV6WDvMj2FW5ys2ULwZ0UsBu0R2tqb7xN5EqEIV/jxmOz+OhGLuCeeNY X-Received: by 2002:a05:6808:8fc:: with SMTP id d28mr10940051oic.152.1582504995366; Sun, 23 Feb 2020 16:43:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582504995; cv=none; d=google.com; s=arc-20160816; b=0wDETOITFaXdnD2EnWRvKvGCVuVMb2wNfzkQugcwc9VVzO3zcfFArMUZSjna0YovIW lQYdTW2KLz6GHKRzP73+qU+8fZLj5L8w6mF7e8p4EtFpJAz/VYL3nUWGdpjMFVv36iUp Q5dfdvdaSmdt6MnqToZNd4FUv4plQo9/p2oxk5Ex5jeWvZuSTRuflYxbYbguOSeks58n e+mKwQnWsuLxqWmh9QgTBCLuerdWwT8WgCDOIMEghL6Xr2jpg2JS20A8uybgakbi+mgk UwL9PUJ1/phfyAOyutpCj4tILfnR/E5Uim7IQN7PXAYR7qJ78vUL2OtzdrG6CwNXTlTb eKmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=H3Gjw+ElKbT7bVW/eMNXgoPtOtufK81wYsPdgosCuDU=; b=Y09qD+EHokMrnj8T7dlrgf2+0Bbb4jFw70F0D+W06EEssnmb7uE9a8/iOFCLOtSXkk KKLUG+OUijT5EoelFqdPgD2Lb8/v1b7OVOSNxtktG1F/xSRxXos095jKHt1eJnVpF2bt NXNMOcLtyyp+nw8ndBNiweKhUsAbdVs4L2sh0Zkw2OH3iB7erCAtn0ES0+f4rzWeHOve of4KkPacPVE8O3/JJN6GLxnNZ580HowZlqJ9SC5VTEYaLq/9Qdgi/YgxJigq2v0hS2f5 srWSn7vgc3cqnWietwHsgcgnDtANZwElZXlWe8gWqjVZvjdu+8pHMHCmxdWFHp192272 R8kQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o25si6047563otk.28.2020.02.23.16.43.03; Sun, 23 Feb 2020 16:43:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727219AbgBXAmz (ORCPT + 99 others); Sun, 23 Feb 2020 19:42:55 -0500 Received: from mga11.intel.com ([192.55.52.93]:23673 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727151AbgBXAmy (ORCPT ); Sun, 23 Feb 2020 19:42:54 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Feb 2020 16:42:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,478,1574150400"; d="scan'208";a="349809813" Received: from hao-dev.bj.intel.com ([10.238.157.65]) by fmsmga001.fm.intel.com with ESMTP; 23 Feb 2020 16:42:52 -0800 From: Wu Hao To: mdf@kernel.org, will@kernel.org, mark.rutland@arm.com, gregkh@linuxfoundation.org, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linux-api@vger.kernel.org, atull@kernel.org, yilun.xu@intel.com, Wu Hao Subject: [PATCH v8 0/2] add performance reporting support to FPGA DFL drivers Date: Mon, 24 Feb 2020 08:21:45 +0800 Message-Id: <1582503707-10737-1-git-send-email-hao.wu@intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, This patchset adds performance reporting support for FPGA DFL drivers. It introduces one pmu to expose userspace interfaces via standard perf API. User could use standard perf tool to access perf events exposed via pmu. This patchset is generated based on 5.6-rc2. Main changes from v7: - rename pmu name from "fme%d" to "dfl_fme%d". - monitor cpu hotplug for cpumask sysfs and update cpumask sysfs doc. - add extra read for 64bit counter registers to avoid 2-32bit readl issue. Main changes from v6: - add a new ABI/testing/ sysfs documentation in patch #2. - fix a warning reported by kbuild in patch #2. Main changes from v5: - use dev_ext_attribute instead of fme_perf_event_attr. - use is_visible function to decide which events to expose per hardware capability, and add event_init checking for all events. Main changes from v4: - rebase and clean up. - update Kconfig for PERF_EVENTS dependency. Main changes from v3: - add more descriptions in doc, including how to use perf tool for these hardware counters. (patch #1) - use standard perf API instead of sysfs entries. (patch #2) Wu Hao (1): fpga: dfl: fme: add performance reporting support Xu Yilun (1): Documentation: fpga: dfl: add description for performance reporting support .../testing/sysfs-bus-event_source-devices-dfl_fme | 104 ++ Documentation/fpga/dfl.rst | 84 ++ drivers/fpga/Kconfig | 2 +- drivers/fpga/Makefile | 1 + drivers/fpga/dfl-fme-main.c | 4 + drivers/fpga/dfl-fme-perf.c | 1021 ++++++++++++++++++++ drivers/fpga/dfl-fme.h | 2 + drivers/fpga/dfl.h | 2 + 8 files changed, 1219 insertions(+), 1 deletion(-) create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices-dfl_fme create mode 100644 drivers/fpga/dfl-fme-perf.c -- 1.8.3.1