]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
remoteproc: zynqmp_r5: ack IPI before checking vrings
authorWendy Liang <wendy.liang@xilinx.com>
Sun, 17 Mar 2019 10:47:56 +0000 (03:47 -0700)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 18 Mar 2019 14:57:30 +0000 (15:57 +0100)
If we ack IPI interrupt after checking vrings, it is
possible to miss some IPI interrupts. Ack the IPI
interrupts before checking the vrings to make sure
no IPI interrupts are missed.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/remoteproc/zynqmp_r5_remoteproc.c

index 61c95c33ca9b644ca106203e1dbc563dd21c1582..f1bbdd7d846768ee36b0ae49604f0ab531e054ae 100644 (file)
@@ -611,6 +611,7 @@ static void handle_event_notified(struct work_struct *work)
 
        local = container_of(work, struct zynqmp_r5_pdata, workqueue);
 
+       (void)mbox_send_message(local->rx_chan, NULL);
        rproc = local->rproc;
        if (rproc->sysfs_kick) {
                sysfs_notify(&rproc->dev.kobj, NULL, "remote_kick");
@@ -622,7 +623,6 @@ static void handle_event_notified(struct work_struct *work)
         * And thus, we scan through all the registered notifyids.
         */
        idr_for_each(&rproc->notifyids, event_notified_idr_cb, rproc);
-       (void)mbox_send_message(local->rx_chan, NULL);
 }
 
 /**