Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8580128ybl; Thu, 16 Jan 2020 20:06:41 -0800 (PST) X-Google-Smtp-Source: APXvYqxcjZh5xu3WloNsu6tPqhOOONGRN0li4cWmUV3EwiWhhbN844Su72x/4NTxUioUJU9O/O5t X-Received: by 2002:aca:f411:: with SMTP id s17mr2038854oih.177.1579234001742; Thu, 16 Jan 2020 20:06:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579234001; cv=none; d=google.com; s=arc-20160816; b=OVrxFRReUETp1rGYP7d9u67A1JEmxHIZwILTWpYFg68dyi6xvm6wcEPB2lZ9EWxR6q NX6xIR/m2PAm96puwyVinAmI3mLyL2KTgz0mzYo2XbVpt3qO+hw3A3ct0EIv9rqvqm/3 f7iIFblyb7Af4yZVOEv+YpfS6CbMSEDYFKVYDYjmRWOUNIbb2Kst6to758wKH80tiyhx ciA5+I2YaAiOi5WWYFHRkb6Ff6iFQw7IOVw3Um/CTDc2CcOM6uRfGaz6UOZyL7gs0fNW B5xTDAnsf28mAdtOy6mwkmeB1vXDmQwTjG7te59Qbq83S5wc4UWDDy6BjGzCXLgUw1Q7 bk3w== 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=5HX40OB+8g7xoHsNwbtSpgUzq7hXUYWmZFquEfNtVcM=; b=A9QdHRJhi1PfcHI+5qDCX3YJopUKxmvnSu7EwPNEU3m6kJoaKnJDUv9OSeHD01mnrZ +qicYiwjNdlTgg41MA1mU02TFDtfBgpN4efmEGrKo60jS4UsNuEZlwJetKwyVsr1+fuM 9aaTGLXDgySkzdXJVO/x5X0vNlEJuVMttlX0CmzAq7Vr0Br89ciidh2Z5r+fSMYFLD9z ZH2uRNLREzUwXotxdOwbCGzbKkdif70jyy7ILW1ltMHA8eiarWSALELlsb73ogu8rpJc O3A3aQJNkIX8vkIiwbcU8OxBxEXaZosBX2m6OZs7mobz0YCeG1d1xhATj28uqvvcWHd8 GZTg== 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 b67si3716947oii.79.2020.01.16.20.06.30; Thu, 16 Jan 2020 20:06:41 -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 S1729501AbgAQDbI (ORCPT + 99 others); Thu, 16 Jan 2020 22:31:08 -0500 Received: from mga14.intel.com ([192.55.52.115]:1832 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728925AbgAQDbI (ORCPT ); Thu, 16 Jan 2020 22:31:08 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2020 19:31:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,328,1574150400"; d="scan'208";a="306100487" Received: from hao-dev.bj.intel.com ([10.238.157.65]) by orsmga001.jf.intel.com with ESMTP; 16 Jan 2020 19:31:05 -0800 From: Wu Hao To: will@kernel.org, mdf@kernel.org, mark.rutland@arm.com, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linux-api@vger.kernel.org, atull@kernel.org, gregkh@linuxfoundation.org, Wu Hao Subject: [RESEND Patch v6 0/2] add performance reporting support to FPGA DFL drivers Date: Fri, 17 Jan 2020 11:10:26 +0800 Message-Id: <1579230628-22243-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 latest fpga/for-next branch. 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 Documentation/fpga/dfl.rst | 83 ++++ drivers/fpga/Makefile | 1 + drivers/fpga/dfl-fme-main.c | 4 + drivers/fpga/dfl-fme-perf.c | 943 ++++++++++++++++++++++++++++++++++++++++++++ drivers/fpga/dfl-fme.h | 2 + drivers/fpga/dfl.h | 2 + 6 files changed, 1035 insertions(+) create mode 100644 drivers/fpga/dfl-fme-perf.c -- 1.8.3.1