firmware: qcom: tz_log: change to use debugfs_create_file_unsafe

In the 4.9 kernel, a global srcu lock was added to debugfs file
operation, which will be hold during full_proxy_read operation. As
tz_log reading operation will sleep until there is new data coming,
this makes srcu deadlock with other driver debugfs operations. To
break deadlock for sleep use cases during debugfs_read, change to
use debugfs_create_file_unsafe(), then full_proxy_read is not used,
and it will not hold srcu lock. Besides, tz_log debugfs won't get
removed and thus, there is no need to protect it against removal
races. The use of debugfs_create_file_unsafe() is safe here.

Change-Id: I63efc408f4adb04a664c0944b899946770d60b18
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
1 file changed