kernel_samsung_a53x/drivers/firmware/arm_scmi
Justin Chen cc26f5e9ee BACKPORT: firmware: arm_scmi: Queue in scmi layer for mailbox implementation
send_message() does not block in the MBOX implementation. This is
because the mailbox layer has its own queue. However, this confuses
the per xfer timeouts as they all start their timeout ticks in
parallel.

Consider a case where the xfer timeout is 30ms and a SCMI transaction
takes 25ms:

  | 0ms: Message #0 is queued in mailbox layer and sent out, then sits
  |      at scmi_wait_for_message_response() with a timeout of 30ms
  | 1ms: Message #1 is queued in mailbox layer but not sent out yet.
  |      Since send_message() doesn't block, it also sits at
  |      scmi_wait_for_message_response() with a timeout of 30ms
  |  ...
  | 25ms: Message #0 is completed, txdone is called and message #1 is sent
  | 31ms: Message #1 times out since the count started at 1ms. Even though
  |       it has only been inflight for 6ms.

Bug: 374939101
Fixes: 5c8a47a5a91d ("firmware: arm_scmi: Make scmi core independent of the transport type")
Change-Id: I0ab132221c28d4594f0bbc161f431ceb49830824
Signed-off-by: Justin Chen <justin.chen@broadcom.com>
Message-Id: <20241014160717.1678953-1-justin.chen@broadcom.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
(cherry picked from commit da1642bc97c4ef67f347edcd493bd0a52f88777b)
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
(cherry picked from commit e02772c76d6fa54bd75b3961bb08c3a01122dbc9)
2025-01-19 00:09:58 +01:00
..
base.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clock.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
driver.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mailbox.c BACKPORT: firmware: arm_scmi: Queue in scmi layer for mailbox implementation 2025-01-19 00:09:58 +01:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
notify.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
notify.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reset.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scmi_pm_domain.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sensors.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
shmem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
system.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
voltage.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00