* [PATCH 1/2] habanalabs: add rate-limit to an error message
@ 2019-06-06 12:20 Oded Gabbay
2019-06-06 12:20 ` [PATCH 2/2] docs/habanalabs: update text for some entries in sysfs Oded Gabbay
2019-06-06 18:54 ` [PATCH 1/2] habanalabs: add rate-limit to an error message Joe Perches
0 siblings, 2 replies; 4+ messages in thread
From: Oded Gabbay @ 2019-06-06 12:20 UTC (permalink / raw)
To: linux-kernel
This patch changes the print of an error message about mis-configuration
of the debug infrastructure to be rate-limited, to prevent flooding of
kernel log, as these configuration requests can come at a high rate.
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
---
drivers/misc/habanalabs/habanalabs_ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/habanalabs/habanalabs_ioctl.c b/drivers/misc/habanalabs/habanalabs_ioctl.c
index c5f7ecabef0a..cbc5fa1ffe11 100644
--- a/drivers/misc/habanalabs/habanalabs_ioctl.c
+++ b/drivers/misc/habanalabs/habanalabs_ioctl.c
@@ -255,7 +255,7 @@ static int hl_debug_ioctl(struct hl_fpriv *hpriv, void *data)
case HL_DEBUG_OP_SPMU:
case HL_DEBUG_OP_TIMESTAMP:
if (!hdev->in_debug) {
- dev_err(hdev->dev,
+ dev_err_ratelimited(hdev->dev,
"Rejecting debug configuration request because device not in debug mode\n");
return -EFAULT;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] docs/habanalabs: update text for some entries in sysfs
2019-06-06 12:20 [PATCH 1/2] habanalabs: add rate-limit to an error message Oded Gabbay
@ 2019-06-06 12:20 ` Oded Gabbay
2019-06-06 18:54 ` [PATCH 1/2] habanalabs: add rate-limit to an error message Joe Perches
1 sibling, 0 replies; 4+ messages in thread
From: Oded Gabbay @ 2019-06-06 12:20 UTC (permalink / raw)
To: linux-kernel
This patch updates the description of some entries in sysfs for the
habanalabs driver.
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
---
.../ABI/testing/sysfs-driver-habanalabs | 42 +++++++++++--------
1 file changed, 24 insertions(+), 18 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-driver-habanalabs b/Documentation/ABI/testing/sysfs-driver-habanalabs
index 78b2bcf316a3..f433fc6db3c6 100644
--- a/Documentation/ABI/testing/sysfs-driver-habanalabs
+++ b/Documentation/ABI/testing/sysfs-driver-habanalabs
@@ -62,18 +62,20 @@ What: /sys/class/habanalabs/hl<n>/ic_clk
Date: Jan 2019
KernelVersion: 5.1
Contact: oded.gabbay@gmail.com
-Description: Allows the user to set the maximum clock frequency of the
- Interconnect fabric. Writes to this parameter affect the device
- only when the power management profile is set to "manual" mode.
- The device IC clock might be set to lower value then the
+Description: Allows the user to set the maximum clock frequency, in Hz, of
+ the Interconnect fabric. Writes to this parameter affect the
+ device only when the power management profile is set to "manual"
+ mode. The device IC clock might be set to lower value than the
maximum. The user should read the ic_clk_curr to see the actual
- frequency value of the IC
+ frequency value of the IC. This property is valid only for the
+ Goya ASIC family
What: /sys/class/habanalabs/hl<n>/ic_clk_curr
Date: Jan 2019
KernelVersion: 5.1
Contact: oded.gabbay@gmail.com
-Description: Displays the current clock frequency of the Interconnect fabric
+Description: Displays the current clock frequency, in Hz, of the Interconnect
+ fabric. This property is valid only for the Goya ASIC family
What: /sys/class/habanalabs/hl<n>/infineon_ver
Date: Jan 2019
@@ -92,18 +94,20 @@ What: /sys/class/habanalabs/hl<n>/mme_clk
Date: Jan 2019
KernelVersion: 5.1
Contact: oded.gabbay@gmail.com
-Description: Allows the user to set the maximum clock frequency of the
- MME compute engine. Writes to this parameter affect the device
- only when the power management profile is set to "manual" mode.
- The device MME clock might be set to lower value then the
+Description: Allows the user to set the maximum clock frequency, in Hz, of
+ the MME compute engine. Writes to this parameter affect the
+ device only when the power management profile is set to "manual"
+ mode. The device MME clock might be set to lower value than the
maximum. The user should read the mme_clk_curr to see the actual
- frequency value of the MME
+ frequency value of the MME. This property is valid only for the
+ Goya ASIC family
What: /sys/class/habanalabs/hl<n>/mme_clk_curr
Date: Jan 2019
KernelVersion: 5.1
Contact: oded.gabbay@gmail.com
-Description: Displays the current clock frequency of the MME compute engine
+Description: Displays the current clock frequency, in Hz, of the MME compute
+ engine. This property is valid only for the Goya ASIC family
What: /sys/class/habanalabs/hl<n>/pci_addr
Date: Jan 2019
@@ -163,18 +167,20 @@ What: /sys/class/habanalabs/hl<n>/tpc_clk
Date: Jan 2019
KernelVersion: 5.1
Contact: oded.gabbay@gmail.com
-Description: Allows the user to set the maximum clock frequency of the
- TPC compute engines. Writes to this parameter affect the device
- only when the power management profile is set to "manual" mode.
- The device TPC clock might be set to lower value then the
+Description: Allows the user to set the maximum clock frequency, in Hz, of
+ the TPC compute engines. Writes to this parameter affect the
+ device only when the power management profile is set to "manual"
+ mode. The device TPC clock might be set to lower value than the
maximum. The user should read the tpc_clk_curr to see the actual
- frequency value of the TPC
+ frequency value of the TPC. This property is valid only for
+ Goya ASIC family
What: /sys/class/habanalabs/hl<n>/tpc_clk_curr
Date: Jan 2019
KernelVersion: 5.1
Contact: oded.gabbay@gmail.com
-Description: Displays the current clock frequency of the TPC compute engines
+Description: Displays the current clock frequency, in Hz, of the TPC compute
+ engines. This property is valid only for the Goya ASIC family
What: /sys/class/habanalabs/hl<n>/uboot_ver
Date: Jan 2019
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] habanalabs: add rate-limit to an error message
2019-06-06 12:20 [PATCH 1/2] habanalabs: add rate-limit to an error message Oded Gabbay
2019-06-06 12:20 ` [PATCH 2/2] docs/habanalabs: update text for some entries in sysfs Oded Gabbay
@ 2019-06-06 18:54 ` Joe Perches
2019-06-07 8:08 ` Oded Gabbay
1 sibling, 1 reply; 4+ messages in thread
From: Joe Perches @ 2019-06-06 18:54 UTC (permalink / raw)
To: Oded Gabbay, linux-kernel
On Thu, 2019-06-06 at 15:20 +0300, Oded Gabbay wrote:
> This patch changes the print of an error message about mis-configuration
> of the debug infrastructure to be rate-limited, to prevent flooding of
> kernel log, as these configuration requests can come at a high rate.
[]
> diff --git a/drivers/misc/habanalabs/habanalabs_ioctl.c b/drivers/misc/habanalabs/habanalabs_ioctl.c
[]
> @@ -255,7 +255,7 @@ static int hl_debug_ioctl(struct hl_fpriv *hpriv, void *data)
> case HL_DEBUG_OP_SPMU:
> case HL_DEBUG_OP_TIMESTAMP:
> if (!hdev->in_debug) {
> - dev_err(hdev->dev,
> + dev_err_ratelimited(hdev->dev,
> "Rejecting debug configuration request because device not in debug mode\n");
> return -EFAULT;
> }
Perhaps this should be dev_dbg
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] habanalabs: add rate-limit to an error message
2019-06-06 18:54 ` [PATCH 1/2] habanalabs: add rate-limit to an error message Joe Perches
@ 2019-06-07 8:08 ` Oded Gabbay
0 siblings, 0 replies; 4+ messages in thread
From: Oded Gabbay @ 2019-06-07 8:08 UTC (permalink / raw)
To: Joe Perches; +Cc: Linux-Kernel@Vger. Kernel. Org
On Thu, Jun 6, 2019 at 9:54 PM Joe Perches <joe@perches.com> wrote:
>
> On Thu, 2019-06-06 at 15:20 +0300, Oded Gabbay wrote:
> > This patch changes the print of an error message about mis-configuration
> > of the debug infrastructure to be rate-limited, to prevent flooding of
> > kernel log, as these configuration requests can come at a high rate.
> []
> > diff --git a/drivers/misc/habanalabs/habanalabs_ioctl.c b/drivers/misc/habanalabs/habanalabs_ioctl.c
> []
> > @@ -255,7 +255,7 @@ static int hl_debug_ioctl(struct hl_fpriv *hpriv, void *data)
> > case HL_DEBUG_OP_SPMU:
> > case HL_DEBUG_OP_TIMESTAMP:
> > if (!hdev->in_debug) {
> > - dev_err(hdev->dev,
> > + dev_err_ratelimited(hdev->dev,
> > "Rejecting debug configuration request because device not in debug mode\n");
> > return -EFAULT;
> > }
>
> Perhaps this should be dev_dbg
>
>
But this a basic error. I prefer to give visibility to the user in such a case.
Thanks,
Oded
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-07 8:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06 12:20 [PATCH 1/2] habanalabs: add rate-limit to an error message Oded Gabbay
2019-06-06 12:20 ` [PATCH 2/2] docs/habanalabs: update text for some entries in sysfs Oded Gabbay
2019-06-06 18:54 ` [PATCH 1/2] habanalabs: add rate-limit to an error message Joe Perches
2019-06-07 8:08 ` Oded Gabbay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).