mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1] [v1] platform/mellanox: Fix mlxbf-tmfifo not handling all virtio CONSOLE notifictions
@ 2023-08-14 17:35 Shiih-Yi Chen
  0 siblings, 0 replies; 3+ messages in thread
From: Shiih-Yi Chen @ 2023-08-14 17:35 UTC (permalink / raw)
  To: linux-kernel; +Cc: shihyic, davethompson, limings

From: shihyic <shihyic@nvidia.com>

rshim console does not show all entries of dmesg.

Fixed by setting MLXBF_TM_TX_LWM_IRQ for every CONSOLE notification. 
 

Signed-off-by: shihyic <shihyic@nvidia.com>
Review-by: limings@nvidia.com

---
 drivers/platform/mellanox/mlxbf-tmfifo.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/platform/mellanox/mlxbf-tmfifo.c b/drivers/platform/mellanox/mlxbf-tmfifo.c
index a79318e90a13..4561b7d42412 100644
--- a/drivers/platform/mellanox/mlxbf-tmfifo.c
+++ b/drivers/platform/mellanox/mlxbf-tmfifo.c
@@ -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;
-- 
2.30.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] [v1] platform/mellanox: Fix mlxbf-tmfifo not handling all virtio CONSOLE notifictions
  2023-08-14 17:53 Shiih-Yi Chen
@ 2023-08-21 10:03 ` Hans de Goede
  0 siblings, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2023-08-21 10:03 UTC (permalink / raw)
  To: Shiih-Yi Chen, linux-kernel, Mark Gross, Vadim Pasternak,
	platform-driver-x86
  Cc: davthompson, limings

Hi,

On 8/14/23 19:53, Shiih-Yi Chen wrote:
> From: shihyic <shihyic@nvidia.com>
> 
> rshim console does not show all entries of dmesg.
> 
> Fixed by setting MLXBF_TM_TX_LWM_IRQ for every CONSOLE notification. 
>  
> 
> Signed-off-by: shihyic <shihyic@nvidia.com>
> Review-by: limings@nvidia.com
> 
> ---
>  drivers/platform/mellanox/mlxbf-tmfifo.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/platform/mellanox/mlxbf-tmfifo.c b/drivers/platform/mellanox/mlxbf-tmfifo.c
> index a79318e90a13..4561b7d42412 100644
> --- a/drivers/platform/mellanox/mlxbf-tmfifo.c
> +++ b/drivers/platform/mellanox/mlxbf-tmfifo.c
> @@ -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



>  		} else if (test_and_set_bit(MLXBF_TM_TX_LWM_IRQ,
>  					    &fifo->pend_events)) {
>  			return true;


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v1] [v1] platform/mellanox: Fix mlxbf-tmfifo not handling all virtio CONSOLE notifictions
@ 2023-08-14 17:53 Shiih-Yi Chen
  2023-08-21 10:03 ` Hans de Goede
  0 siblings, 1 reply; 3+ messages in thread
From: Shiih-Yi Chen @ 2023-08-14 17:53 UTC (permalink / raw)
  To: linux-kernel, Hans de Goede, Mark Gross, Vadim Pasternak,
	platform-driver-x86
  Cc: shihyic, davthompson, limings

From: shihyic <shihyic@nvidia.com>

rshim console does not show all entries of dmesg.

Fixed by setting MLXBF_TM_TX_LWM_IRQ for every CONSOLE notification. 
 

Signed-off-by: shihyic <shihyic@nvidia.com>
Review-by: limings@nvidia.com

---
 drivers/platform/mellanox/mlxbf-tmfifo.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/platform/mellanox/mlxbf-tmfifo.c b/drivers/platform/mellanox/mlxbf-tmfifo.c
index a79318e90a13..4561b7d42412 100644
--- a/drivers/platform/mellanox/mlxbf-tmfifo.c
+++ b/drivers/platform/mellanox/mlxbf-tmfifo.c
@@ -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;
-- 
2.30.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-21 10:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-14 17:35 [PATCH v1] [v1] platform/mellanox: Fix mlxbf-tmfifo not handling all virtio CONSOLE notifictions Shiih-Yi Chen
2023-08-14 17:53 Shiih-Yi Chen
2023-08-21 10:03 ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®