Skip to content

Commit ccc8480

Browse files
cristiccbroonie
authored andcommitted
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>
1 parent ac84ca8 commit ccc8480

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/sof/amd/acp-ipc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ irqreturn_t acp_sof_ipc_irq_thread(int irq, void *context)
165165
int dsp_msg, dsp_ack;
166166
unsigned int status;
167167

168-
if (sdev->first_boot && sdev->fw_state != SOF_FW_BOOT_COMPLETE) {
168+
if (unlikely(sdev->first_boot && sdev->fw_state != SOF_FW_BOOT_COMPLETE)) {
169169
acp_mailbox_read(sdev, sdev->dsp_box.offset, &status, sizeof(status));
170170

171171
if ((status & SOF_IPC_PANIC_MAGIC_MASK) == SOF_IPC_PANIC_MAGIC) {

0 commit comments

Comments
 (0)