aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>2025-02-07 13:46:05 +0200
committerMark Brown <broonie@kernel.org>2025-02-10 13:41:51 +0000
commitccc8480d90e8cb60f06bd90e227f34784927e19f (patch)
treeba3eedbb1bee5f46eefce43a173443593ee97e02
parentASoC: SOF: amd: Handle IPC replies before FW_BOOT_COMPLETE (diff)
downloadwireguard-linux-ccc8480d90e8cb60f06bd90e227f34784927e19f.tar.xz
wireguard-linux-ccc8480d90e8cb60f06bd90e227f34784927e19f.zip
ASoC: SOF: amd: Add branch prediction hint in ACP IRQ handler
The conditional involving sdev->first_boot in acp_sof_ipc_irq_thread() will succeed only once, i.e. during the very first run of the DSP firmware. Use the unlikely() annotation to help improve branch prediction accuracy. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Link: https://patch.msgid.link/20250207-sof-vangogh-fixes-v1-4-67824c1e4c9a@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to '')
-rw-r--r--sound/soc/sof/amd/acp-ipc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/sof/amd/acp-ipc.c b/sound/soc/sof/amd/acp-ipc.c
index 12caefd08788..22d4b807e1bb 100644
--- a/sound/soc/sof/amd/acp-ipc.c
+++ b/sound/soc/sof/amd/acp-ipc.c
@@ -165,7 +165,7 @@ irqreturn_t acp_sof_ipc_irq_thread(int irq, void *context)
int dsp_msg, dsp_ack;
unsigned int status;
- if (sdev->first_boot && sdev->fw_state != SOF_FW_BOOT_COMPLETE) {
+ if (unlikely(sdev->first_boot && sdev->fw_state != SOF_FW_BOOT_COMPLETE)) {
acp_mailbox_read(sdev, sdev->dsp_box.offset, &status, sizeof(status));
if ((status & SOF_IPC_PANIC_MAGIC_MASK) == SOF_IPC_PANIC_MAGIC) {