summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 134a38d)
raw | patch | inline | side by side (parent: 134a38d)
author | Suman Anna <s-anna@ti.com> | |
Tue, 19 Feb 2019 02:03:11 +0000 (20:03 -0600) | ||
committer | Suman Anna <s-anna@ti.com> | |
Sun, 24 Feb 2019 01:20:51 +0000 (19:20 -0600) |
The PRU remoteproc driver is not configured for 'auto-boot' by default,
and allows to be booted either by in-kernel PRU client drivers or by
userspace using the generic remoteproc sysfs interfaces. The sysfs
interfaces should not be permitted to change the remoteproc firmwares
or states when a PRU is being managed by an in-kernel client driver.
Use the newly introduced remoteproc generic 'deny_sysfs_ops' flag to
provide these restrictions by setting and clearing it appropriately
during the PRU acquire and release steps.
Signed-off-by: Suman Anna <s-anna@ti.com>
and allows to be booted either by in-kernel PRU client drivers or by
userspace using the generic remoteproc sysfs interfaces. The sysfs
interfaces should not be permitted to change the remoteproc firmwares
or states when a PRU is being managed by an in-kernel client driver.
Use the newly introduced remoteproc generic 'deny_sysfs_ops' flag to
provide these restrictions by setting and clearing it appropriately
during the PRU acquire and release steps.
Signed-off-by: Suman Anna <s-anna@ti.com>
drivers/remoteproc/pru_rproc.c | patch | blob | history |
index ae18d27b3a602b92d66fc9d596566ff052b38a03..a7c6e523726c4122116c0d7e536c61a09eedf213 100644 (file)
}
pru->client_np = np;
+ rproc->deny_sysfs_ops = 1;
mutex_unlock(&pru->lock);
mutex_lock(&pru->lock);
pru->client_np = NULL;
+ rproc->deny_sysfs_ops = 0;
mutex_unlock(&pru->lock);
put_device(&rproc->dev);