linux-imx/include/linux/soc
Jason-JH.Lin 69ff68332d
soc: mediatek: mtk-cmdq: Add cmdq_pkt_acquire_event() function
Add cmdq_pkt_acquire_event() function to support CMDQ user making
an instruction for acquiring event.

CMDQ users can use cmdq_pkt_acquire_event() as `mutex_lock`
and cmdq_pkt_clear_event() as `mutex_unlock` to protect the global
resource modified instructions between them.

cmdq_pkt_acquire_event() would wait for event to be cleared.
After event is cleared by cmdq_pkt_clear_event() in other GCE threads,
cmdq_pkt_acquire_event() would set event and keep executing next
instruction. So the mutex would work like this:

    cmdq_pkt_acquire_event() /* mutex lock */

    /* critical secton instructions that modified global resource */

    cmdq_pkt_clear_event() /* mutex unlock */

Prevent the critical section instructions from being affected by other
GCE threads.

Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240307013458.23550-5-jason-jh.lin@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2024-04-23 12:16:55 +02:00
..
actions
amlogic
andes irqchip/riscv-intc: Introduce Andes hart-level interrupt controller 2024-02-23 09:57:42 +01:00
apple soc: apple: rtkit: Get rid of apple_rtkit_send_message_wait 2023-11-23 19:09:24 +09:00
brcmstb
cirrus
dove
ixp4xx
marvell/octeontx2
mediatek soc: mediatek: mtk-cmdq: Add cmdq_pkt_acquire_event() function 2024-04-23 12:16:55 +02:00
mmp
nxp
pxa
qcom TTY/Serial driver update for 6.9-rc1 2024-03-21 12:44:10 -07:00
renesas
samsung soc: samsung: exynos-pmu: Add regmap support for SoCs that protect PMU regs 2024-02-25 11:39:23 +01:00
sunxi
ti