Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp576391ybi; Tue, 16 Jul 2019 02:03:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWuM3XBHA9SmSW4k3IaH57SaAh3iAL5kzxFdb0ngu/NkLg0j8tM/YrKvvf9dqga90XtXG/ X-Received: by 2002:a63:c008:: with SMTP id h8mr28632718pgg.427.1563267782235; Tue, 16 Jul 2019 02:03:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563267782; cv=none; d=google.com; s=arc-20160816; b=SXIWaNyLiLwPC4MvL786iWneepxhWQ5u2LoeLEMdBYKIG7ByLCugzWLWLxhAqTCzA1 aGAHAji6/SgfhUYbpwXp9HAIQ34DqW7d/4slPeoPvgeyudTCXkL7ZfwQuSVLRJTkxzVQ OMHQKW0VQB0wegliJSYAiP4J+i6gvBuHOkWrfmkE2vb2qT2ZVaLzqzV7awRF/WEkgqQs /3seMATipCUK96RjzFpcqlb4d+eEnMJ/tFKrXOJIFdiYonOeutOlEF7C/Rjsk+7fmb3r jZ2fTdIC5JzfMJVEuesOZwK8HVRw9mJoyfdSRF0MHXMZRKDwlVEP9hrFSR4YlKS3ocNH qRwg== 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 :dkim-signature; bh=Y8N+WQ8vFvhuK+iDw7SzengsJ8xM3eLZ1NcZ88yLqJE=; b=bdVfyCbSoZuBal3mtyvH0fe6kO8vl4J799icaZgYGhVKkVpPvsP+dRXhBzerRq/BVz ev2keTFWxHAtZxp4HUDUHYHKct2YXYNh/g+pweJwwoqUzVPRqf7FtrRtqDU7lrmKIeQw KRE0zxbgPYRmGfCIPwL3GnmabTlxa97cptFIFJZKIXTRBuXoV6kSfB3xUOKDlMgr6GTP v/u6p1NLhnZ50SQyPecrZnGhXcmGHPlLb4VkHPQObKqrk/CVjb7UTRxUj/K08/pjnZL5 NTYtF+B/lsdfBLOzhhLwjYCN44JN9MYp+LVN5iwwy+HFLjuxu0pSbaxzHSMIJU0/5MWG TnlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lBBwDtpK; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14si919832pgh.205.2019.07.16.02.02.45; Tue, 16 Jul 2019 02:03:02 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lBBwDtpK; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731115AbfGPJCX (ORCPT + 99 others); Tue, 16 Jul 2019 05:02:23 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:37445 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726536AbfGPJCX (ORCPT ); Tue, 16 Jul 2019 05:02:23 -0400 Received: by mail-wm1-f65.google.com with SMTP id f17so17827428wme.2 for ; Tue, 16 Jul 2019 02:02:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Y8N+WQ8vFvhuK+iDw7SzengsJ8xM3eLZ1NcZ88yLqJE=; b=lBBwDtpKYnwj5om08Ld9G7MzFqUi2XQUS3hoolE7MbvD+IP5pGy7hoaNmH0ZVjQQzX lOe/Gd9oBymwrEy7NIds1XP9IfK5HxUWPa2AkuLbCYKFApHuEgYdxUGShc3GGdFjmEie rDO4DkfzNTQKgVWcZaGfp6iy/5BQgaWkWExcqz05DeOBORTx/bLVki6D3adq7utg3l8Y bgt+uUzQT05kvdAXacF1la9HxT2OFxPKXosPndZah8jV1Qq+Z2XK7XfhHfWTLAEjqT39 v9mNNRuGF8PWYL0sZmhacwxfDBvFMC5FG1TngmQorrNHUgvKpODE45n/ebOvSP410ZJZ uvSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Y8N+WQ8vFvhuK+iDw7SzengsJ8xM3eLZ1NcZ88yLqJE=; b=BUl1KcX37cAIyXsXClAC7yEXCwzS1S84mup63NTDmZoP0bh+7HpnFhvB62Md9E2IKV h7OXHPizzxAzwHeSynAgnSEz0A+nIvU29sS61zFWcp3EHqpPoXRcsfi+AxZFhwPXn2Th bxOetjBB8mHpCIYqb+nZqxLHCZ15WaQhbOCQvRmnf6LKhb6lGhXJi8Anp4IeTkdhfPJr xwZP7c4zwYXB3LVGRaMJ90wZvjvHL1ZuQ5FptHu5ji0yKDNp4FIU4XUw8UJuJU1C7ZEX r96gZAvUrsoOMssqG4tTfkLHGYvw0ezEzlPCH+ruFG/W55JZuUMJpuDZoS4G3RVYofmZ t3iQ== X-Gm-Message-State: APjAAAXuuD2DnL9uoz6UvMZecwqiC0nduGqWZ8gDJLNsvJczbl7bPoLT eFmoPmEzHeIE1O+BxeXp7jL8gTyb X-Received: by 2002:a1c:7d4e:: with SMTP id y75mr29719243wmc.169.1563267740927; Tue, 16 Jul 2019 02:02:20 -0700 (PDT) Received: from ogabbay-VM.habana-labs.com ([31.154.190.6]) by smtp.gmail.com with ESMTPSA id b15sm32361803wrt.77.2019.07.16.02.02.19 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 16 Jul 2019 02:02:20 -0700 (PDT) From: Oded Gabbay To: linux-kernel@vger.kernel.org, oshpigelman@habana.ai, ttayar@habana.ai Cc: gregkh@linuxfoundation.org Subject: [PATCH] habanalabs: add comments on INFO IOCTL Date: Tue, 16 Jul 2019 12:02:18 +0300 Message-Id: <20190716090218.12379-1-oded.gabbay@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds some in-code documentation on the different opcodes of the INFO IOCTL. Signed-off-by: Oded Gabbay --- include/uapi/misc/habanalabs.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/uapi/misc/habanalabs.h b/include/uapi/misc/habanalabs.h index 3956c226ca35..a5a1d0e7ec82 100644 --- a/include/uapi/misc/habanalabs.h +++ b/include/uapi/misc/habanalabs.h @@ -75,7 +75,19 @@ enum hl_device_status { HL_DEVICE_STATUS_MALFUNCTION }; -/* Opcode for management ioctl */ +/* Opcode for management ioctl + * + * HW_IP_INFO - Receive information about different IP blocks in the + * device. + * HL_INFO_HW_EVENTS - Receive an array describing how many times each event + * occurred since the last hard reset. + * HL_INFO_DRAM_USAGE - Retrieve the dram usage inside the device and of the + * specific context. This is relevant only for GOYA device. + * HL_INFO_HW_IDLE - Retrieve information about the idle status of each + * internal engine. + * HL_INFO_DEVICE_STATUS - Retrieve the device's status. This opcode doesn't + * require an open context. + */ #define HL_INFO_HW_IP_INFO 0 #define HL_INFO_HW_EVENTS 1 #define HL_INFO_DRAM_USAGE 2 -- 2.17.1