Jens,
I guess you've seen that optee_disable_shm_cache() must somehow be called in the kexec flow. I don't know how to do that though.
Calling optee_disable_shm_cache() in kexec path does not solve the problem.
I tested with the following changes,
static struct platform_driver optee_driver = { .probe = optee_probe, .remove = optee_remove, + .shutdown = optee_remove, .driver = { .name = "optee", .of_match_table = optee_dt_match, }, };
so with the above I can still reproduce the issue. I even tried a cleaner approach by implementing optee_shutdown,
+static int optee_shutdown(struct platform_device *pdev) +{ + struct optee *optee = platform_get_drvdata(pdev); + + optee_disable_shm_cache(optee); + + tee_device_unregister(optee->supp_teedev); + tee_device_unregister(optee->teedev); + +}
I haven't had much luck yet in finding a solution, let me know if you have any ideas.
Thanks, - Allen