Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CURRENT broken on Raspberry Pi 2?



>>+int
>>+linux_workqueue_init(void)
>>+{
>>+	static ONCE_DECL(linux_workqueue_init_once);
>>+
>>+	return RUN_ONCE(&linux_workqueue_init_once, &linux_workqueue_init0);
>>+}
>>+
>
>linux_workqueue_init is called by DRM. Also linux_workqueue_fini deletes 
>the key which will never be re-created when you use RUN_ONCE. DRM also
>uses RUN_ONCE and I'm not sure if RUN_ONCE allows nested calls.
>
>So yes, something like this is needed, but there are some caveats.
>
>Moving the "linux module" from DRM into common might be one necessary
>step.

Ah, I did not notice linux_workqueue_fini. That's right, RUN_ONCE is not good.

Likewise, drm2/linux/linux_module.c:linux_guarantee_initialized() also
calls linux_init() only once, but linux_fini() will be called many times,
I actually panic when I repeat modload/modunload. hmmmm :-(


Since at least linux_workqueue should not be stopped as long as it is
used (by DRM or DWC2), we need to make linux_workqueue_init/fini nestable,
or simply empty linux_workqueue_fini() to keep worker thread running
all the time I guess.

-- 
ryo shimizu


Home | Main Index | Thread Index | Old Index