Loading drivers/mailbox/msm_qmp.c +12 −2 Original line number Diff line number Diff line Loading @@ -215,6 +215,8 @@ struct qmp_device { */ static void send_irq(struct qmp_device *mdev) { int ret; /* * Any data associated with this event must be visable to the remote * before the interrupt is triggered Loading @@ -222,8 +224,11 @@ static void send_irq(struct qmp_device *mdev) wmb(); if (mdev->mbox_chan) { mbox_send_message(mdev->mbox_chan, NULL); ret = mbox_send_message(mdev->mbox_chan, NULL); mbox_client_txdone(mdev->mbox_chan, 0); if (ret < 0) QMP_ERR(mdev->ilc, "failed to trigger ipcc irq %d\n", ret); } else { writel_relaxed(mdev->irq_mask, mdev->tx_irq_reg); } Loading Loading @@ -527,6 +532,7 @@ static irqreturn_t qmp_irq_handler(int irq, void *priv) kthread_queue_work(&mdev->kworker, &mdev->kwork); mdev->rx_irq_count++; QMP_INFO(mdev->ilc, "Queued rx worker count:%d\n", mdev->rx_irq_count); return IRQ_HANDLED; } Loading @@ -542,9 +548,12 @@ static void __qmp_rx_worker(struct qmp_mbox *mbox) struct qmp_device *mdev = mbox->mdev; unsigned long flags; QMP_INFO(mdev->ilc, "Enter rx worker state:%d\n", mbox->local_state); memcpy_fromio(&desc, mbox->desc, sizeof(desc)); if (desc.magic != QMP_MAGIC) if (desc.magic != QMP_MAGIC) { QMP_ERR(mdev->ilc, "wrong magic 0x:%x\n", desc.magic); return; } mutex_lock(&mbox->state_lock); switch (mbox->local_state) { Loading Loading @@ -660,6 +669,7 @@ static void __qmp_rx_worker(struct qmp_mbox *mbox) default: QMP_ERR(mdev->ilc, "Local Channel State corrupted\n"); } QMP_INFO(mdev->ilc, "Exit rx worker state:%d\n", mbox->local_state); mutex_unlock(&mbox->state_lock); } Loading drivers/soc/qcom/smp2p.c +8 −0 Original line number Diff line number Diff line Loading @@ -270,6 +270,9 @@ static void qcom_smp2p_notify_in(struct qcom_smp2p *smp2p) status = val ^ entry->last_value; entry->last_value = val; /* Ensure irq_pending is read correctly */ mb(); status |= *entry->irq_pending; SMP2P_INFO("%d:\t%s: status:%0lx val:%0x\n", Loading Loading @@ -391,6 +394,11 @@ static int smp2p_retrigger_irq(struct irq_data *irqd) SMP2P_INFO("%d: %s: %lu\n", entry->smp2p->remote_pid, entry->name, irq); set_bit(irq, entry->irq_pending); /* Ensure irq_pending is visible to all cpus that retried interrupt * can run on */ mb(); return 0; } Loading Loading
drivers/mailbox/msm_qmp.c +12 −2 Original line number Diff line number Diff line Loading @@ -215,6 +215,8 @@ struct qmp_device { */ static void send_irq(struct qmp_device *mdev) { int ret; /* * Any data associated with this event must be visable to the remote * before the interrupt is triggered Loading @@ -222,8 +224,11 @@ static void send_irq(struct qmp_device *mdev) wmb(); if (mdev->mbox_chan) { mbox_send_message(mdev->mbox_chan, NULL); ret = mbox_send_message(mdev->mbox_chan, NULL); mbox_client_txdone(mdev->mbox_chan, 0); if (ret < 0) QMP_ERR(mdev->ilc, "failed to trigger ipcc irq %d\n", ret); } else { writel_relaxed(mdev->irq_mask, mdev->tx_irq_reg); } Loading Loading @@ -527,6 +532,7 @@ static irqreturn_t qmp_irq_handler(int irq, void *priv) kthread_queue_work(&mdev->kworker, &mdev->kwork); mdev->rx_irq_count++; QMP_INFO(mdev->ilc, "Queued rx worker count:%d\n", mdev->rx_irq_count); return IRQ_HANDLED; } Loading @@ -542,9 +548,12 @@ static void __qmp_rx_worker(struct qmp_mbox *mbox) struct qmp_device *mdev = mbox->mdev; unsigned long flags; QMP_INFO(mdev->ilc, "Enter rx worker state:%d\n", mbox->local_state); memcpy_fromio(&desc, mbox->desc, sizeof(desc)); if (desc.magic != QMP_MAGIC) if (desc.magic != QMP_MAGIC) { QMP_ERR(mdev->ilc, "wrong magic 0x:%x\n", desc.magic); return; } mutex_lock(&mbox->state_lock); switch (mbox->local_state) { Loading Loading @@ -660,6 +669,7 @@ static void __qmp_rx_worker(struct qmp_mbox *mbox) default: QMP_ERR(mdev->ilc, "Local Channel State corrupted\n"); } QMP_INFO(mdev->ilc, "Exit rx worker state:%d\n", mbox->local_state); mutex_unlock(&mbox->state_lock); } Loading
drivers/soc/qcom/smp2p.c +8 −0 Original line number Diff line number Diff line Loading @@ -270,6 +270,9 @@ static void qcom_smp2p_notify_in(struct qcom_smp2p *smp2p) status = val ^ entry->last_value; entry->last_value = val; /* Ensure irq_pending is read correctly */ mb(); status |= *entry->irq_pending; SMP2P_INFO("%d:\t%s: status:%0lx val:%0x\n", Loading Loading @@ -391,6 +394,11 @@ static int smp2p_retrigger_irq(struct irq_data *irqd) SMP2P_INFO("%d: %s: %lu\n", entry->smp2p->remote_pid, entry->name, irq); set_bit(irq, entry->irq_pending); /* Ensure irq_pending is visible to all cpus that retried interrupt * can run on */ mb(); return 0; } Loading