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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 B869EC352A4 for ; Mon, 10 Feb 2020 20:56:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 87A7320863 for ; Mon, 10 Feb 2020 20:56:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581368180; bh=XCaEk4AdMscuCIsfWqjQ6jxocwU0q3rPW8RgAU4hDEc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=eMCSlcFwnY/OljsuaaRKheihl3+ytyqaXbfSHAO+ROj1zvlSb9/eaM/pTiukxdrj9 CAaMDxCxEhdaBLw2iXrXefnt6P3Ucaf96RS3U37f8LEbaBNeQydv1Hu/dTt0arsl2U uKUxp7tYqkfzJ8MmDj+S/tQJiiAkbdCe47u5jwvs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727414AbgBJU4T (ORCPT ); Mon, 10 Feb 2020 15:56:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:44378 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726563AbgBJU4T (ORCPT ); Mon, 10 Feb 2020 15:56:19 -0500 Received: from localhost (unknown [104.132.1.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 03CF320715; Mon, 10 Feb 2020 20:56:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581368179; bh=XCaEk4AdMscuCIsfWqjQ6jxocwU0q3rPW8RgAU4hDEc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PNHzMZzG1ARQhWBIv0yUDMr6OkJkpLDpCXFMHwXLYyqqrNa2YPR4cge58/XUUN9Rq hmx36I3lSVP3vzVZmr5SQPP/Q4BWZWRLmFM+F8HCm+YVjH6eVg1yqXfeJYCZ3x8JVc nVRNmd4VTLVOsSziz+5UTlJZMFBTBaVXrWFZyqnI= Date: Mon, 10 Feb 2020 12:56:18 -0800 From: Greg KH To: Wu Hao Cc: mdf@kernel.org, will@kernel.org, mark.rutland@arm.com, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, atull@kernel.org, yilun.xu@intel.com, Luwei Kang Subject: Re: [PATCH v7 2/2] fpga: dfl: fme: add performance reporting support Message-ID: <20200210205618.GA1347752@kroah.com> References: <1581306469-22629-1-git-send-email-hao.wu@intel.com> <1581306469-22629-3-git-send-email-hao.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1581306469-22629-3-git-send-email-hao.wu@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 10, 2020 at 11:47:49AM +0800, Wu Hao wrote: > +What: /sys/bus/event_source/devices/fmeX/format > +Date: February 2020 > +KernelVersion: 5.7 > +Contact: Wu Hao > +Description: Read-only. Attribute group to describe the magic bits > + that go into perf_event_attr.config for a particular pmu. > + (See ABI/testing/sysfs-bus-event_source-devices-format). > + > + Each attribute under this group defines a bit range of the > + perf_event_attr.config. All supported attributes are listed > + below. > + > + event = "config:0-11" - event ID > + evtype = "config:12-15" - event type > + portid = "config:16-23" - event source > + > + For example, > + > + fab_mmio_read = "event=0x06,evtype=0x02,portid=0xff" Are perf sysfs files always this bad "multiple values per file"? Or is that unique to this driver? If not unique, do you have specific examples in the kernel that currently do this today? > +static struct attribute *fme_perf_events_attrs_empty[] = { > + NULL, Huh? > +}; > + > +static struct attribute_group fme_perf_events_group = { > + .name = "events", > + .attrs = fme_perf_events_attrs_empty, You create an empty directory? Why? What goes in here? very odd... greg k-h From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Subject: Re: [PATCH v7 2/2] fpga: dfl: fme: add performance reporting support Date: Mon, 10 Feb 2020 12:56:18 -0800 Message-ID: <20200210205618.GA1347752@kroah.com> References: <1581306469-22629-1-git-send-email-hao.wu@intel.com> <1581306469-22629-3-git-send-email-hao.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1581306469-22629-3-git-send-email-hao.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Wu Hao Cc: mdf-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, will-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, mark.rutland-5wv7dgnIgG8@public.gmane.org, linux-fpga-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, atull-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, yilun.xu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, Luwei Kang List-Id: linux-api@vger.kernel.org On Mon, Feb 10, 2020 at 11:47:49AM +0800, Wu Hao wrote: > +What: /sys/bus/event_source/devices/fmeX/format > +Date: February 2020 > +KernelVersion: 5.7 > +Contact: Wu Hao > +Description: Read-only. Attribute group to describe the magic bits > + that go into perf_event_attr.config for a particular pmu. > + (See ABI/testing/sysfs-bus-event_source-devices-format). > + > + Each attribute under this group defines a bit range of the > + perf_event_attr.config. All supported attributes are listed > + below. > + > + event = "config:0-11" - event ID > + evtype = "config:12-15" - event type > + portid = "config:16-23" - event source > + > + For example, > + > + fab_mmio_read = "event=0x06,evtype=0x02,portid=0xff" Are perf sysfs files always this bad "multiple values per file"? Or is that unique to this driver? If not unique, do you have specific examples in the kernel that currently do this today? > +static struct attribute *fme_perf_events_attrs_empty[] = { > + NULL, Huh? > +}; > + > +static struct attribute_group fme_perf_events_group = { > + .name = "events", > + .attrs = fme_perf_events_attrs_empty, You create an empty directory? Why? What goes in here? very odd... greg k-h