public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Oded Gabbay <oded.gabbay@gmail.com>
Cc: linux-kernel@vger.kernel.org, Omer Shpigelman <oshpigelman@habana.ai>
Subject: Re: [PATCH 1/2] habanalabs: add new IOCTL for debug, tracing and profiling
Date: Tue, 2 Apr 2019 14:01:40 +0200	[thread overview]
Message-ID: <20190402120140.GB24119@kroah.com> (raw)
In-Reply-To: <20190402113539.23838-1-oded.gabbay@gmail.com>

On Tue, Apr 02, 2019 at 02:35:38PM +0300, Oded Gabbay wrote:
> From: Omer Shpigelman <oshpigelman@habana.ai>
> 
> Habanalabs ASICs use the ARM coresight infrastructure to support debug,
> tracing and profiling of neural networks topologies.
> 
> Because the coresight is configured using register writes and reads, and
> some of the registers hold sensitive information (e.g. the address in
> the device's DRAM where the trace data is written to), the user must go
> through the kernel driver to configure this mechanism.
> 
> This patch implements the common code of the IOCTL and calls the
> ASIC-specific function for the actual H/W configuration.
> 
> The IOCTL supports configuration of seven coresight components:
> ETR, ETF, STM, FUNNEL, BMON, SPMU and TIMESTAMP
> 
> The user specifies which component he wishes to configure and provides a
> pointer to a structure (located in its process space) that contains the
> relevant configuration.
> 
> The common code copies the relevant data from the user-space to kernel
> space and then calls the ASIC-specific function to do the H/W
> configuration.
> 
> After the configuration is done, which is usually composed
> of several IOCTL calls depending on what the user wanted to trace, the
> user can start executing the topology. The trace data will be written to
> the user's area in the device's DRAM.
> 
> After the tracing operation is complete, and user will call the IOCTL
> again to disable the tracing operation. The user also need to read
> values from registers for some of the components (e.g. the size of the
> trace data in the device's DRAM). In that case, the user will provide a
> pointer to an "output" structure in user-space, which the IOCTL code will
> fill according the to selected component.
> 
> Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai>
> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
> ---
>  drivers/misc/habanalabs/device.c              |   2 +-
>  drivers/misc/habanalabs/goya/Makefile         |   3 +-
>  drivers/misc/habanalabs/goya/goya.c           |   1 +
>  drivers/misc/habanalabs/goya/goyaP.h          |   1 +
>  drivers/misc/habanalabs/goya/goya_coresight.c |  13 ++
>  drivers/misc/habanalabs/habanalabs.h          |  25 ++++
>  drivers/misc/habanalabs/habanalabs_ioctl.c    | 123 +++++++++++++++++-
>  include/uapi/misc/habanalabs.h                | 116 ++++++++++++++++-
>  8 files changed, 280 insertions(+), 4 deletions(-)
>  create mode 100644 drivers/misc/habanalabs/goya/goya_coresight.c
> 
> diff --git a/drivers/misc/habanalabs/device.c b/drivers/misc/habanalabs/device.c
> index e3797f582436..6cbfd560721e 100644
> --- a/drivers/misc/habanalabs/device.c
> +++ b/drivers/misc/habanalabs/device.c
> @@ -1044,7 +1044,7 @@ void hl_device_fini(struct hl_device *hdev)
>  			WARN(1, "Failed to remove device because reset function did not finish\n");
>  			return;
>  		}
> -	};
> +	}
>  
>  	/* Mark device as disabled */
>  	hdev->disabled = true;

This change isn't part of this new feature :(


  parent reply	other threads:[~2019-04-02 12:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02 11:35 [PATCH 1/2] habanalabs: add new IOCTL for debug, tracing and profiling Oded Gabbay
2019-04-02 11:35 ` [PATCH 2/2] habanalabs: add goya implementation for debug configuration Oded Gabbay
2019-04-02 12:01 ` Greg KH [this message]
2019-04-02 12:43   ` [PATCH 1/2] habanalabs: add new IOCTL for debug, tracing and profiling Oded Gabbay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190402120140.GB24119@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oded.gabbay@gmail.com \
    --cc=oshpigelman@habana.ai \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox