drivers: firmware: scmi: Extend SCMI transport layer by trace events
authorLukasz Luba <lukasz.luba@arm.com>
Tue, 17 Dec 2019 13:43:45 +0000 (13:43 +0000)
committerSudeep Holla <sudeep.holla@arm.com>
Mon, 30 Dec 2019 12:34:37 +0000 (12:34 +0000)
commit729d3530a50417a88f3f485ba2dc88ff8adfeacb
treee584b5e58a5aa6a84c901f18129dd1388f30c9b0
parent257d0e20ec4f94e33ac463b918fb82bb1b2dcbe0
drivers: firmware: scmi: Extend SCMI transport layer by trace events

The SCMI transport layer communicates via mailboxes and shared memory with
firmware running on a microcontroller. It is platform specific how long it
takes to pass a SCMI message. The most sensitive requests are coming from
CPUFreq subsystem, which might be used by the scheduler.
Thus, there is a need to measure these delays and capture anomalies.
This change introduces trace events wrapped around transfer code.

According to Jim's suggestion a unique transfer_id is to distinguish
similar entries which might have the same message id, protocol id and
sequence. This is a case then there are some timeouts in transfers.

Suggested-by: Jim Quinlan <james.quinlan@broadcom.com>
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/common.h
drivers/firmware/arm_scmi/driver.c