aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLedion Daja <ledion.daja@arm.com>2023-10-17 09:15:32 +0200
committerLedion Daja <ledion.daja@arm.com>2023-11-01 10:44:45 +0100
commitedd2550cd909b584610ac18387b3261a4f50b392 (patch)
treea941069744ea32754bf83c07b81a6bf9daba737d
parentc2eaf26a4a559bca4dc5110a4d05be8f961ce0c2 (diff)
downloadethos-u-linux-driver-stack-edd2550cd909b584610ac18387b3261a4f50b392.tar.gz
Decrease log verbosity in the kernel modules
Changed several logs level from info to dbg and removed redundant or uninformative logging in order to reduce verbosity of the kernel modules. Change-Id: Ie9ff7f3ae6478007ea58547380b3ddfef5d280b4 Signed-off-by: Ledion Daja <ledion.daja@arm.com>
-rw-r--r--kernel/ethosu_buffer.c38
-rw-r--r--kernel/ethosu_cancel_inference.c14
-rw-r--r--kernel/ethosu_capabilities.c12
-rw-r--r--kernel/ethosu_device.c89
-rw-r--r--kernel/ethosu_driver.c7
-rw-r--r--kernel/ethosu_inference.c71
-rw-r--r--kernel/ethosu_network.c28
-rw-r--r--kernel/ethosu_network_info.c16
-rw-r--r--remoteproc/ethosu_remoteproc.c18
9 files changed, 130 insertions, 163 deletions
diff --git a/kernel/ethosu_buffer.c b/kernel/ethosu_buffer.c
index 7a49b39..07c8033 100644
--- a/kernel/ethosu_buffer.c
+++ b/kernel/ethosu_buffer.c
@@ -1,5 +1,6 @@
/*
- * Copyright 2020-2023 Arm Limited and/or its affiliates
+ * SPDX-FileCopyrightText: Copyright 2020-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-License-Identifier: GPL-2.0-only
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,7 +16,6 @@
* along with this program; if not, you can access it online at
* http://www.gnu.org/licenses/gpl-2.0.html.
*
- * SPDX-License-Identifier: GPL-2.0-only
*/
/****************************************************************************
@@ -73,7 +73,7 @@ static void ethosu_buffer_destroy(struct kref *kref)
container_of(kref, struct ethosu_buffer, kref);
struct device *dev = buf->dev;
- dev_info(dev, "Buffer destroy. buf=0x%pK", buf);
+ dev_dbg(dev, "Buffer destroy. buf=0x%pK", buf);
memset(buf->cpu_addr, 0, buf->capacity);
dma_free_coherent(dev, buf->capacity, buf->cpu_addr,
@@ -89,8 +89,8 @@ static int ethosu_buffer_release(struct inode *inode,
struct ethosu_buffer *buf = file->private_data;
struct device *dev = buf->dev;
- dev_info(dev, "Buffer release. file=0x%pK, buf=0x%pK\n",
- file, buf);
+ dev_dbg(dev, "Buffer release. file=0x%pK, buf=0x%pK\n",
+ file, buf);
ethosu_buffer_put(buf);
@@ -104,8 +104,8 @@ static int ethosu_buffer_mmap(struct file *file,
struct device *dev = buf->dev;
int ret;
- dev_info(dev, "Buffer mmap. file=0x%pK, buf=0x%pK\n",
- file, buf);
+ dev_dbg(dev, "Buffer mmap. file=0x%pK, buf=0x%pK\n",
+ file, buf);
ret = dma_mmap_coherent(dev, vma, buf->cpu_addr,
buf->dma_addr, buf->capacity);
@@ -126,10 +126,6 @@ static long ethosu_buffer_ioctl(struct file *file,
if (ret)
return ret;
- dev_info(dev,
- "Buffer ioctl. file=0x%pK, buf=0x%pK, cmd=0x%x, arg=%lu\n",
- file, buf, cmd, arg);
-
switch (cmd) {
case ETHOSU_IOCTL_BUFFER_SET: {
struct ethosu_uapi_buffer uapi;
@@ -139,9 +135,9 @@ static long ethosu_buffer_ioctl(struct file *file,
break;
}
- dev_info(dev,
- "Buffer ioctl: Buffer set. size=%u, offset=%u\n",
- uapi.size, uapi.offset);
+ dev_dbg(dev,
+ "Buffer ioctl: Buffer set. size=%u, offset=%u\n",
+ uapi.size, uapi.offset);
ret = ethosu_buffer_resize(buf, uapi.size, uapi.offset);
break;
@@ -152,9 +148,9 @@ static long ethosu_buffer_ioctl(struct file *file,
uapi.size = buf->size;
uapi.offset = buf->offset;
- dev_info(dev,
- "Buffer ioctl: Buffer get. size=%u, offset=%u\n",
- uapi.size, uapi.offset);
+ dev_dbg(dev,
+ "Buffer ioctl: Buffer get. size=%u, offset=%u\n",
+ uapi.size, uapi.offset);
if (copy_to_user(udata, &uapi, sizeof(uapi))) {
ret = -EFAULT;
@@ -209,10 +205,10 @@ int ethosu_buffer_create(struct device *dev,
buf->file = fget(ret);
fput(buf->file);
- dev_info(dev,
- "Buffer create. file=0x%pK, fd=%d, buf=0x%pK, capacity=%zu, cpu_addr=0x%pK, dma_addr=0x%llx, phys_addr=0x%llx\n",
- buf->file, ret, buf, capacity, buf->cpu_addr, buf->dma_addr,
- virt_to_phys(buf->cpu_addr));
+ dev_dbg(dev,
+ "Buffer create. file=0x%pK, fd=%d, buf=0x%pK, capacity=%zu, cpu_addr=0x%pK, dma_addr=0x%llx, phys_addr=0x%llx\n",
+ buf->file, ret, buf, capacity, buf->cpu_addr, buf->dma_addr,
+ virt_to_phys(buf->cpu_addr));
return ret;
diff --git a/kernel/ethosu_cancel_inference.c b/kernel/ethosu_cancel_inference.c
index 4d7b544..d89f719 100644
--- a/kernel/ethosu_cancel_inference.c
+++ b/kernel/ethosu_cancel_inference.c
@@ -1,5 +1,6 @@
/*
- * Copyright 2022-2023 Arm Limited and/or its affiliates
+ * SPDX-FileCopyrightText: Copyright 2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-License-Identifier: GPL-2.0-only
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,7 +16,6 @@
* along with this program; if not, you can access it online at
* http://www.gnu.org/licenses/gpl-2.0.html.
*
- * SPDX-License-Identifier: GPL-2.0-only
*/
/****************************************************************************
@@ -101,9 +101,9 @@ int ethosu_cancel_inference_request(struct device *dev,
if (ret < 0)
goto kfree;
- dev_info(dev,
- "Inference cancellation create. cancel=0x%pK, msg.id=%ddev",
- cancellation, cancellation->msg.id);
+ dev_dbg(dev,
+ "Inference cancellation create. cancel=0x%pK, msg.id=%ddev",
+ cancellation, cancellation->msg.id);
ret = ethosu_cancel_inference_send(cancellation, mailbox);
if (0 != ret)
@@ -141,8 +141,8 @@ deregister:
&cancellation->msg);
kfree:
- dev_info(dev,
- "Cancel inference destroy. cancel=0x%pK", cancellation);
+ dev_dbg(dev,
+ "Cancel inference destroy. cancel=0x%pK", cancellation);
/* decrease the reference on the inference we are refering to */
ethosu_inference_put(cancellation->inf);
diff --git a/kernel/ethosu_capabilities.c b/kernel/ethosu_capabilities.c
index 83bd8cf..2c2d23a 100644
--- a/kernel/ethosu_capabilities.c
+++ b/kernel/ethosu_capabilities.c
@@ -1,5 +1,6 @@
/*
- * Copyright 2022-2023 Arm Limited and/or its affiliates
+ * SPDX-FileCopyrightText: Copyright 2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-License-Identifier: GPL-2.0-only
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,7 +16,6 @@
* along with this program; if not, you can access it online at
* http://www.gnu.org/licenses/gpl-2.0.html.
*
- * SPDX-License-Identifier: GPL-2.0-only
*/
/****************************************************************************
@@ -123,8 +123,8 @@ int ethosu_capabilities_request(struct device *dev,
if (ret < 0)
goto kfree;
- dev_info(dev, "Capabilities create. Id=%d, handle=0x%p\n",
- cap->msg.id, cap);
+ dev_dbg(dev, "Capabilities create. Id=%d, handle=0x%p\n",
+ cap->msg.id, cap);
ret = ethosu_capabilities_send(cap, mailbox);
if (0 != ret)
@@ -156,8 +156,8 @@ deregister:
ethosu_mailbox_deregister(mailbox, &cap->msg);
kfree:
- dev_info(dev, "Capabilities destroy. Id=%d, handle=0x%p\n",
- cap->msg.id, cap);
+ dev_dbg(dev, "Capabilities destroy. Id=%d, handle=0x%p\n",
+ cap->msg.id, cap);
devm_kfree(dev, cap);
return ret;
diff --git a/kernel/ethosu_device.c b/kernel/ethosu_device.c
index 83df62e..8e21512 100644
--- a/kernel/ethosu_device.c
+++ b/kernel/ethosu_device.c
@@ -83,9 +83,9 @@ static int ethosu_handle_rpmsg(struct rpmsg_device *rpdev,
device_lock(dev);
- dev_info(dev,
- "Msg: magic=0x%08x, type=%u, msg_id=%llu",
- rpmsg->header.magic, rpmsg->header.type, rpmsg->header.msg_id);
+ dev_dbg(dev,
+ "Msg: magic=0x%08x, type=%u, msg_id=%llu",
+ rpmsg->header.magic, rpmsg->header.type, rpmsg->header.msg_id);
switch (rpmsg->header.type) {
case ETHOSU_CORE_MSG_ERR:
@@ -104,11 +104,11 @@ static int ethosu_handle_rpmsg(struct rpmsg_device *rpdev,
rproc_report_crash(rproc_get_by_child(dev), RPROC_FATAL_ERROR);
break;
case ETHOSU_CORE_MSG_PING:
- dev_info(dev, "Msg: Ping");
+ dev_dbg(dev, "Msg: Ping");
ret = ethosu_mailbox_pong(mbox);
break;
case ETHOSU_CORE_MSG_PONG:
- dev_info(dev, "Msg: Pong");
+ dev_dbg(dev, "Msg: Pong");
break;
case ETHOSU_CORE_MSG_INFERENCE_RSP:
if (length != sizeof(rpmsg->inf_rsp)) {
@@ -119,9 +119,9 @@ static int ethosu_handle_rpmsg(struct rpmsg_device *rpdev,
break;
}
- dev_info(dev,
- "Msg: Inference response. ofm_count=%u, status=%u",
- rpmsg->inf_rsp.ofm_count, rpmsg->inf_rsp.status);
+ dev_dbg(dev,
+ "Msg: Inference response. ofm_count=%u, status=%u",
+ rpmsg->inf_rsp.ofm_count, rpmsg->inf_rsp.status);
ethosu_inference_rsp(mbox, rpmsg->header.msg_id,
&rpmsg->inf_rsp);
@@ -135,9 +135,9 @@ static int ethosu_handle_rpmsg(struct rpmsg_device *rpdev,
break;
}
- dev_info(dev,
- "Msg: Cancel Inference response. status=%u",
- rpmsg->cancel_rsp.status);
+ dev_dbg(dev,
+ "Msg: Cancel Inference response. status=%u",
+ rpmsg->cancel_rsp.status);
ethosu_cancel_inference_rsp(mbox,
rpmsg->header.msg_id,
&rpmsg->cancel_rsp);
@@ -167,21 +167,21 @@ static int ethosu_handle_rpmsg(struct rpmsg_device *rpdev,
break;
}
- dev_info(dev,
- "Msg: Capabilities response vs%hhu v%hhu.%hhu p%hhu av%hhu.%hhu.%hhu dv%hhu.%hhu.%hhu mcc%hhu csv%hhu cd%hhu",
- rpmsg->cap_rsp.version_status,
- rpmsg->cap_rsp.version_major,
- rpmsg->cap_rsp.version_minor,
- rpmsg->cap_rsp.product_major,
- rpmsg->cap_rsp.arch_major_rev,
- rpmsg->cap_rsp.arch_minor_rev,
- rpmsg->cap_rsp.arch_patch_rev,
- rpmsg->cap_rsp.driver_major_rev,
- rpmsg->cap_rsp.driver_minor_rev,
- rpmsg->cap_rsp.driver_patch_rev,
- rpmsg->cap_rsp.macs_per_cc,
- rpmsg->cap_rsp.cmd_stream_version,
- rpmsg->cap_rsp.custom_dma);
+ dev_dbg(dev,
+ "Msg: Capabilities response vs%hhu v%hhu.%hhu p%hhu av%hhu.%hhu.%hhu dv%hhu.%hhu.%hhu mcc%hhu csv%hhu cd%hhu",
+ rpmsg->cap_rsp.version_status,
+ rpmsg->cap_rsp.version_major,
+ rpmsg->cap_rsp.version_minor,
+ rpmsg->cap_rsp.product_major,
+ rpmsg->cap_rsp.arch_major_rev,
+ rpmsg->cap_rsp.arch_minor_rev,
+ rpmsg->cap_rsp.arch_patch_rev,
+ rpmsg->cap_rsp.driver_major_rev,
+ rpmsg->cap_rsp.driver_minor_rev,
+ rpmsg->cap_rsp.driver_patch_rev,
+ rpmsg->cap_rsp.macs_per_cc,
+ rpmsg->cap_rsp.cmd_stream_version,
+ rpmsg->cap_rsp.custom_dma);
ethosu_capability_rsp(mbox, rpmsg->header.msg_id,
&rpmsg->cap_rsp);
@@ -195,9 +195,9 @@ static int ethosu_handle_rpmsg(struct rpmsg_device *rpdev,
break;
}
- dev_info(dev,
- "Msg: Network info response. status=%u",
- rpmsg->net_info_rsp.status);
+ dev_dbg(dev,
+ "Msg: Network info response. status=%u",
+ rpmsg->net_info_rsp.status);
ethosu_network_info_rsp(mbox,
rpmsg->header.msg_id,
@@ -228,7 +228,7 @@ static int ethosu_open(struct inode *inode,
struct rpmsg_device *rpdev = edev->rpdev;
struct device *dev = &edev->dev;
- dev_info(dev, "Device open. file=0x%pK", file);
+ dev_dbg(dev, "Device open. file=0x%pK", file);
file->private_data = rpdev;
@@ -245,9 +245,6 @@ static long ethosu_ioctl(struct file *file,
void __user *udata = (void __user *)arg;
int ret;
- dev_info(dev, "Device ioctl. file=0x%pK, cmd=0x%x, arg=0x%lx",
- file, cmd, arg);
-
switch (cmd) {
case ETHOSU_IOCTL_DRIVER_VERSION_GET: {
const struct ethosu_uapi_kernel_driver_version version = {
@@ -261,7 +258,7 @@ static long ethosu_ioctl(struct file *file,
break;
}
case ETHOSU_IOCTL_CAPABILITIES_REQ: {
- dev_info(dev, "Device ioctl: Capabilities request");
+ dev_dbg(dev, "Device ioctl: Capabilities request");
ret = copy_to_user(udata, &edev->capabilities,
sizeof(edev->capabilities)) ? -EFAULT : 0;
@@ -272,7 +269,7 @@ static long ethosu_ioctl(struct file *file,
if (ret)
return ret;
- dev_info(dev, "Device ioctl: Send ping");
+ dev_dbg(dev, "Device ioctl: Send ping");
ret = ethosu_mailbox_ping(&edev->mailbox);
@@ -292,9 +289,9 @@ static long ethosu_ioctl(struct file *file,
if (ret)
return ret;
- dev_info(dev,
- "Device ioctl: Buffer create. capacity=%u",
- uapi.capacity);
+ dev_dbg(dev,
+ "Device ioctl: Buffer create. capacity=%u",
+ uapi.capacity);
ret = ethosu_buffer_create(dev, uapi.capacity);
@@ -314,9 +311,9 @@ static long ethosu_ioctl(struct file *file,
if (ret)
return ret;
- dev_info(dev,
- "Device ioctl: Network create. type=%u, fd/index=%u",
- uapi.type, uapi.fd);
+ dev_dbg(dev,
+ "Device ioctl: Network create. type=%u, fd/index=%u",
+ uapi.type, uapi.fd);
ret = ethosu_network_create(dev, &edev->mailbox, &uapi);
@@ -346,8 +343,8 @@ static struct rpmsg_endpoint *ethosu_create_ept(struct rpmsg_device *rpdev)
info.src = 0;
info.dst = rpdev->dst;
- dev_info(dev, "Creating rpmsg endpoint. name=%s, src=%u, dst=%u",
- info.name, info.src, info.dst);
+ dev_dbg(dev, "Creating rpmsg endpoint. name=%s, src=%u, dst=%u",
+ info.name, info.src, info.dst);
ept = rpmsg_create_ept(rpdev, ethosu_handle_rpmsg, NULL, info);
if (!ept) {
@@ -372,8 +369,6 @@ static void ethosu_dev_release(struct device *dev)
{
struct ethosu_device *edev = dev_get_drvdata(dev);
- dev_info(dev, "%s", __FUNCTION__);
-
clear_bit(MINOR(edev->cdev.dev), minors);
ethosu_mailbox_deinit(&edev->mailbox);
@@ -448,8 +443,6 @@ int ethosu_dev_init(struct rpmsg_device *rpdev,
int minor;
int ret;
- dev_info(dev, "%s", __FUNCTION__);
-
/* Reserve minor number for device node */
minor = find_first_zero_bit(minors, MINOR_COUNT);
if (minor >= MINOR_COUNT) {
@@ -558,8 +551,6 @@ void ethosu_dev_deinit(struct rpmsg_device *rpdev)
struct device *dev = &rpdev->dev;
struct ethosu_device *edev = dev_get_drvdata(dev);
- dev_info(dev, "%s", __FUNCTION__);
-
device_lock(&edev->dev);
ethosu_mailbox_fail(&edev->mailbox);
device_unlock(&edev->dev);
diff --git a/kernel/ethosu_driver.c b/kernel/ethosu_driver.c
index 085b2c0..48d2155 100644
--- a/kernel/ethosu_driver.c
+++ b/kernel/ethosu_driver.c
@@ -62,11 +62,8 @@ static dev_t devt;
static int ethosu_rpmsg_probe(struct rpmsg_device *rpdev)
{
- struct device *dev = &rpdev->dev;
int ret;
- dev_info(dev, "%s", __FUNCTION__);
-
/* Initialize device */
ret = ethosu_dev_init(rpdev, ethosu_class, devt);
if (ret)
@@ -77,10 +74,6 @@ static int ethosu_rpmsg_probe(struct rpmsg_device *rpdev)
static void ethosu_rpmsg_remove(struct rpmsg_device *rpdev)
{
- struct device *dev = &rpdev->dev;
-
- dev_info(dev, "%s", __FUNCTION__);
-
ethosu_dev_deinit(rpdev);
}
diff --git a/kernel/ethosu_inference.c b/kernel/ethosu_inference.c
index 6d3405d..5c57074 100644
--- a/kernel/ethosu_inference.c
+++ b/kernel/ethosu_inference.c
@@ -1,5 +1,6 @@
/*
- * Copyright 2020,2022-2023 Arm Limited and/or its affiliates
+ * SPDX-FileCopyrightText: Copyright 2020,2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-License-Identifier: GPL-2.0-only
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,7 +16,6 @@
* along with this program; if not, you can access it online at
* http://www.gnu.org/licenses/gpl-2.0.html.
*
- * SPDX-License-Identifier: GPL-2.0-only
*/
/****************************************************************************
@@ -153,9 +153,9 @@ static void ethosu_inference_kref_destroy(struct kref *kref)
container_of(kref, struct ethosu_inference, kref);
struct device *dev = inf->dev;
- dev_info(dev,
- "Inference destroy. inf=0x%pK, status=%d, ifm_count=%u, ofm_count=%u",
- inf, inf->status, inf->ifm_count, inf->ofm_count);
+ dev_dbg(dev,
+ "Inference destroy. inf=0x%pK, status=%d, ifm_count=%u, ofm_count=%u",
+ inf, inf->status, inf->ifm_count, inf->ofm_count);
ethosu_mailbox_deregister(inf->mailbox, &inf->msg);
@@ -176,9 +176,9 @@ static int ethosu_inference_release(struct inode *inode,
struct ethosu_inference *inf = file->private_data;
struct device *dev = inf->dev;
- dev_info(dev,
- "Inference release. file=0x%pK, inf=0x%pK",
- file, inf);
+ dev_dbg(dev,
+ "Inference release. file=0x%pK, inf=0x%pK",
+ file, inf);
device_lock(dev);
ethosu_inference_put(inf);
@@ -214,10 +214,6 @@ static long ethosu_inference_ioctl(struct file *file,
if (ret)
return ret;
- dev_info(dev,
- "Inference ioctl: file=0x%pK, inf=0x%pK, cmd=0x%x, arg=%lu",
- file, inf, cmd, arg);
-
switch (cmd) {
case ETHOSU_IOCTL_INFERENCE_STATUS: {
struct ethosu_uapi_result_status uapi = { 0 };
@@ -235,9 +231,9 @@ static long ethosu_inference_ioctl(struct file *file,
uapi.pmu_config.cycle_count = inf->pmu_cycle_counter_enable;
uapi.pmu_count.cycle_count = inf->pmu_cycle_counter_count;
- dev_info(dev,
- "Inference ioctl: Inference status. status=%s (%d)\n",
- status_to_string(uapi.status), uapi.status);
+ dev_dbg(dev,
+ "Inference ioctl: Inference status. status=%s (%d)\n",
+ status_to_string(uapi.status), uapi.status);
ret = copy_to_user(udata, &uapi, sizeof(uapi)) ? -EFAULT : 0;
@@ -246,9 +242,9 @@ static long ethosu_inference_ioctl(struct file *file,
case ETHOSU_IOCTL_INFERENCE_CANCEL: {
struct ethosu_uapi_cancel_inference_status uapi = { 0 };
- dev_info(dev,
- "Inference ioctl: Cancel Inference. Handle=%p\n",
- inf);
+ dev_dbg(dev,
+ "Inference ioctl: Cancel Inference. Handle=%p\n",
+ inf);
ret = ethosu_cancel_inference_request(dev, inf->mailbox, inf,
&uapi);
@@ -332,10 +328,10 @@ int ethosu_inference_create(struct device *dev,
}
/* Configure PMU and cycle counter */
- dev_info(dev,
- "Configuring events for PMU. events=[%u, %u, %u, %u]\n",
- uapi->pmu_config.events[0], uapi->pmu_config.events[1],
- uapi->pmu_config.events[2], uapi->pmu_config.events[3]);
+ dev_dbg(dev,
+ "Configuring events for PMU. events=[%u, %u, %u, %u]\n",
+ uapi->pmu_config.events[0], uapi->pmu_config.events[1],
+ uapi->pmu_config.events[2], uapi->pmu_config.events[3]);
/* Configure events and reset count for all events */
for (i = 0; i < ETHOSU_PMU_EVENT_MAX; i++) {
@@ -343,9 +339,6 @@ int ethosu_inference_create(struct device *dev,
inf->pmu_event_count[i] = 0;
}
- if (uapi->pmu_config.cycle_count)
- dev_info(dev, "Enabling cycle counter\n");
-
/* Configure cycle counter and reset any previous count */
inf->pmu_cycle_counter_enable = uapi->pmu_config.cycle_count;
inf->pmu_cycle_counter_count = 0;
@@ -368,9 +361,9 @@ int ethosu_inference_create(struct device *dev,
inf->file = fget(ret);
fput(inf->file);
- dev_info(dev,
- "Inference create. file=0x%pK, fd=%d, inf=0x%p, net=0x%pK, msg.id=0x%x",
- inf->file, fd, inf, inf->net, inf->msg.id);
+ dev_dbg(dev,
+ "Inference create. file=0x%pK, fd=%d, inf=0x%p, net=0x%pK, msg.id=0x%x",
+ inf->file, fd, inf, inf->net, inf->msg.id);
return fd;
@@ -480,17 +473,17 @@ void ethosu_inference_rsp(struct ethosu_mailbox *mailbox,
inf->pmu_cycle_counter_enable = rsp->pmu_cycle_counter_enable;
inf->pmu_cycle_counter_count = rsp->pmu_cycle_counter_count;
- dev_info(dev,
- "PMU events. config=[%u, %u, %u, %u], count=[%u, %u, %u, %u]\n",
- inf->pmu_event_config[0], inf->pmu_event_config[1],
- inf->pmu_event_config[2], inf->pmu_event_config[3],
- inf->pmu_event_count[0], inf->pmu_event_count[1],
- inf->pmu_event_count[2], inf->pmu_event_count[3]);
-
- dev_info(dev,
- "PMU cycle counter. enable=%u, count=%llu\n",
- inf->pmu_cycle_counter_enable,
- inf->pmu_cycle_counter_count);
+ dev_dbg(dev,
+ "PMU events. config=[%u, %u, %u, %u], count=[%u, %u, %u, %u]\n",
+ inf->pmu_event_config[0], inf->pmu_event_config[1],
+ inf->pmu_event_config[2], inf->pmu_event_config[3],
+ inf->pmu_event_count[0], inf->pmu_event_count[1],
+ inf->pmu_event_count[2], inf->pmu_event_count[3]);
+
+ if (inf->pmu_cycle_counter_enable)
+ dev_dbg(dev,
+ "PMU cycle counter: count=%llu\n",
+ inf->pmu_cycle_counter_count);
}
inf->done = true;
diff --git a/kernel/ethosu_network.c b/kernel/ethosu_network.c
index dc641c5..94354ed 100644
--- a/kernel/ethosu_network.c
+++ b/kernel/ethosu_network.c
@@ -1,5 +1,6 @@
/*
- * Copyright 2020,2022-2023 Arm Limited and/or its affiliates
+ * SPDX-FileCopyrightText: Copyright 2020,2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-License-Identifier: GPL-2.0-only
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,7 +16,6 @@
* along with this program; if not, you can access it online at
* http://www.gnu.org/licenses/gpl-2.0.html.
*
- * SPDX-License-Identifier: GPL-2.0-only
*/
/****************************************************************************
@@ -69,7 +69,7 @@ static void ethosu_network_destroy(struct kref *kref)
container_of(kref, struct ethosu_network, kref);
struct device *dev = net->dev;
- dev_info(dev, "Network destroy. net=0x%pK\n", net);
+ dev_dbg(dev, "Network destroy. net=0x%pK\n", net);
if (net->buf != NULL)
ethosu_buffer_put(net->buf);
@@ -84,8 +84,8 @@ static int ethosu_network_release(struct inode *inode,
struct ethosu_network *net = file->private_data;
struct device *dev = net->dev;
- dev_info(dev, "Network release. file=0x%pK, net=0x%pK\n",
- file, net);
+ dev_dbg(dev, "Network release. file=0x%pK, net=0x%pK\n",
+ file, net);
ethosu_network_put(net);
@@ -105,15 +105,11 @@ static long ethosu_network_ioctl(struct file *file,
if (ret)
return ret;
- dev_info(dev,
- "Network ioctl: file=0x%pK, net=0x%pK, cmd=0x%x, arg=0x%lx\n",
- file, net, cmd, arg);
-
switch (cmd) {
case ETHOSU_IOCTL_NETWORK_INFO: {
struct ethosu_uapi_network_info uapi = { 0 };
- dev_info(dev, "Network ioctl: Network info. net=0x%pK\n", net);
+ dev_dbg(dev, "Network ioctl: Network info. net=0x%pK\n", net);
ret = ethosu_network_info_request(dev, net->mailbox, net,
&uapi);
@@ -131,9 +127,9 @@ static long ethosu_network_ioctl(struct file *file,
break;
}
- dev_info(dev,
- "Network ioctl: Inference. ifm_fd=%u, ofm_fd=%u\n",
- uapi.ifm_fd[0], uapi.ofm_fd[0]);
+ dev_dbg(dev,
+ "Network ioctl: Inference. ifm_fd=%u, ofm_fd=%u\n",
+ uapi.ifm_fd[0], uapi.ofm_fd[0]);
ret = ethosu_inference_create(dev, net->mailbox, net, &uapi);
break;
@@ -185,9 +181,9 @@ int ethosu_network_create(struct device *dev,
net->file = fget(ret);
fput(net->file);
- dev_info(dev,
- "Network create. file=0x%pK, fd=%d, net=0x%pK, buf=0x%pK, index=%u",
- net->file, ret, net, net->buf, net->index);
+ dev_dbg(dev,
+ "Network create. file=0x%pK, fd=%d, net=0x%pK, buf=0x%pK, index=%u",
+ net->file, ret, net, net->buf, net->index);
return ret;
diff --git a/kernel/ethosu_network_info.c b/kernel/ethosu_network_info.c
index 724db28..feabcae 100644
--- a/kernel/ethosu_network_info.c
+++ b/kernel/ethosu_network_info.c
@@ -1,5 +1,6 @@
/*
- * Copyright 2022-2023 Arm Limited and/or its affiliates
+ * SPDX-FileCopyrightText: Copyright 2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-License-Identifier: GPL-2.0-only
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,7 +16,6 @@
* along with this program; if not, you can access it online at
* http://www.gnu.org/licenses/gpl-2.0.html.
*
- * SPDX-License-Identifier: GPL-2.0-only
*/
/****************************************************************************
@@ -85,9 +85,9 @@ int ethosu_network_info_request(struct device *dev,
if (ret)
goto deregister;
- dev_info(dev,
- "Network info create. info=0x%pK, net=0x%pK, msg.id=0x%x\n",
- info, info->net, info->msg.id);
+ dev_dbg(dev,
+ "Network info create. info=0x%pK, net=0x%pK, msg.id=0x%x\n",
+ info, info->net, info->msg.id);
/* Unlock the device mutex and wait for completion */
device_unlock(dev);
@@ -111,9 +111,9 @@ deregister:
ethosu_network_put(info->net);
kfree:
- dev_info(dev,
- "Network info destroy. info=0x%pK, msg.id=0x%x\n",
- info, info->msg.id);
+ dev_dbg(dev,
+ "Network info destroy. info=0x%pK, msg.id=0x%x\n",
+ info, info->msg.id);
devm_kfree(dev, info);
return ret;
diff --git a/remoteproc/ethosu_remoteproc.c b/remoteproc/ethosu_remoteproc.c
index 87de3b0..c6d7735 100644
--- a/remoteproc/ethosu_remoteproc.c
+++ b/remoteproc/ethosu_remoteproc.c
@@ -153,8 +153,8 @@ static int ethosu_add_carveout(struct rproc *rproc,
if (!mem)
return -ENOMEM;
- dev_info(dev, "Add carveout mapping. dma=%pad, da=%x, va=%p, len=%zu",
- &mem->dma, mem->da, mem->va, mem->len);
+ dev_dbg(dev, "Add carveout mapping. dma=%pad, da=%x, va=%p, len=%zu",
+ &mem->dma, mem->da, mem->va, mem->len);
rproc_add_carveout(rproc, mem);
@@ -170,12 +170,10 @@ static int ethosu_rproc_prepare(struct rproc *rproc)
int i;
int ret;
- dev_info(dev, "Preparing Ethos-U");
-
/* Add carveout for each 'reg' device tree entry */
for (i = 0; of_address_to_resource(np, i, &res) == 0; i++) {
- dev_info(dev, "Found resource. start=%llx, size=%llx",
- res.start, resource_size(&res));
+ dev_dbg(dev, "Found resource. start=%llx, size=%llx",
+ res.start, resource_size(&res));
ret = ethosu_add_carveout(rproc, res.start,
resource_size(&res), res.name);
@@ -194,9 +192,9 @@ static int ethosu_rproc_prepare(struct rproc *rproc)
return -EINVAL;
}
- dev_info(dev,
- "Found memory region. pa=%llx, size=%llu, name=%s",
- res_mem->base, res_mem->size, it.node->name);
+ dev_dbg(dev,
+ "Found memory region. pa=%llx, size=%llu, name=%s",
+ res_mem->base, res_mem->size, it.node->name);
ret = ethosu_add_carveout(rproc, res_mem->base, res_mem->size,
it.node->name);
@@ -322,7 +320,7 @@ static int ethosu_mailbox_init(struct ethosu_rproc *erproc)
erproc->ch_tx = mbox_request_channel_byname(cl, "tx");
if (IS_ERR(erproc->ch_tx)) {
- dev_info(dev, "Using same channel for RX and TX");
+ dev_dbg(dev, "Using same channel for RX and TX");
erproc->ch_tx = erproc->ch_rx;
}