Skip to contentSkip to conversation

platform/mellanox: Fix mlxbf-tmfifo not handling all virtio CONSOLE notifictions

PATCH Superseded Shiih-Yi Chen 2 participants 2 messages Aug 14, 2023 – Aug 21, 2023

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/mellanox: Fix mlxbf-tmfifo not handling all virtio CONSOLE notifictions

From: shihyic <[email protected]>

rshim console does not show all entries of dmesg.

Fixed by setting MLXBF_TM_TX_LWM_IRQ for every CONSOLE notification.

---
 drivers/platform/mellanox/mlxbf-tmfifo.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/platform/mellanox/mlxbf-tmfifo.c +2 -0
index a79318e90a13..4561b7d42412 100644
@@ -887,6 +887,8 @@ static bool mlxbf_tmfifo_virtio_notify(struct virtqueue *vq)
 			tm_vdev = fifo->vdev[VIRTIO_ID_CONSOLE];
 			mlxbf_tmfifo_console_output(tm_vdev, vring);
 			spin_unlock_irqrestore(&fifo->spin_lock[0], flags);
+			test_and_set_bit(MLXBF_TM_TX_LWM_IRQ,
+					 &fifo->pend_events);
 		} else if (test_and_set_bit(MLXBF_TM_TX_LWM_IRQ,
 					    &fifo->pend_events)) {
 			return true;
Signature · 1 line
2.30.1
#1 lore raw

Hi,

Quoted 19 lines · Shiih-Yi Chen

From: shihyic <[email protected]>

rshim console does not show all entries of dmesg.

Fixed by setting MLXBF_TM_TX_LWM_IRQ for every CONSOLE notification.

---
 drivers/platform/mellanox/mlxbf-tmfifo.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/platform/mellanox/mlxbf-tmfifo.c +0 -0
index a79318e90a13..4561b7d42412 100644

drivers/platform/mellanox/mlxbf-tmfifo.c static bool mlxbf_tmfifo_virtio_notify(struct virtqueue *vq) · line 891

Quoted 5 lines
drivers/platform/mellanox/mlxbf-tmfifo.c +2 -0
@@ -887,6 +887,8 @@ static bool mlxbf_tmfifo_virtio_notify(struct virtqueue *vq)
 			tm_vdev = fifo->vdev[VIRTIO_ID_CONSOLE];
 			mlxbf_tmfifo_console_output(tm_vdev, vring);
 			spin_unlock_irqrestore(&fifo->spin_lock[0], flags);
+			test_and_set_bit(MLXBF_TM_TX_LWM_IRQ,
+					 &fifo->pend_events);

You are not doing anything with the test result of test_and_set_bit() here, so I think you can just use a (cheaper) set_bit() call here ?

Regards,

Hans

Quoted 3 lines
drivers/platform/mellanox/mlxbf-tmfifo.c +0 -0
 		} else if (test_and_set_bit(MLXBF_TM_TX_LWM_IRQ,
 					    &fifo->pend_events)) {
 			return true;