Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mailbox: pcc: Clear any pending responder interrupts before enabling it

Some platforms may leave a responder interrupt pending from earlier
transactions. If a PCC responder channel has a pending interrupt when
the controller starts up, enabling the IRQ line without first clearing
the condition can lead to a spurious interrupt which could disrupt other
transmissions if the IRQ is shared.

Explicitly clear any pending responder interrupt before enabling the IRQ
to ensure a clean start. Acknowledge the responder channel via
pcc_chan_acknowledge() in startup before requesting/enablement of the
IRQ. This ensures a clean baseline for the first transfer/receiption
of the notification/response.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Tested-by: Adam Young <admiyo@os.amperecomputing.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>

authored by

Sudeep Holla and committed by
Jassi Brar
c2b69f71 9f3bbbb7

+6
+6
drivers/mailbox/pcc.c
··· 467 467 unsigned long irqflags; 468 468 int rc; 469 469 470 + /* 471 + * Clear and acknowledge any pending interrupts on responder channel 472 + * before enabling the interrupt 473 + */ 474 + pcc_chan_acknowledge(pchan); 475 + 470 476 if (pchan->plat_irq > 0) { 471 477 irqflags = pcc_chan_plat_irq_can_be_shared(pchan) ? 472 478 IRQF_SHARED | IRQF_ONESHOT : 0;