remoteproc on V4.1

I have pruss_remoteproc/virtio_rpmsg_bus working on V4.1 when I boot for the first time. However, when I uninstall the KO with rmmod -f pruss_remoteproc and then install the KO with modprobe pruss_remoteproc, I get a kernel exception.

Investigating further, I found that _omap_device_notifier_call sets pdev->archdata.od = NULL when the pruss_remoteproc is uninstalled, but when I install the pruss_remoteproc, pruss_probe tries to run omap_device_deassert_hardreset which references archdata.od which is is now NULL.

Looking at TI’s V3.14 kernel, it does not set archdata.od = NULL, so I can uninstall and install the KO without issue.

In the V4.1 code, if I comment out lines 57 & 60 [1], pruss_remoteproc uninstalls and installs without error.

My question is how do I recreate archdata.od before pruss_probe executes omap_device_deassert_hardreset? Given that this patch was authored by Pantelis, I figured you would be the best person to answer my question.


Thank you for your help,