Thread (17 messages) 17 messages, 5 authors, 2015-11-06

[PATCH v2 1/5] spi: introduce mmap read support for spi flash devices

From: broonie@kernel.org (Mark Brown)
Date: 2015-11-04 14:40:13
Also in: linux-devicetree, linux-omap, linux-spi, lkml

On Tue, Nov 03, 2015 at 03:36:10PM +0530, Vignesh R wrote:
+	}
+	mutex_lock(&master->mmap_lock_mutex);
+	ret = master->spi_mtd_mmap_read(spi, from, len, retlen, buf,
+					read_opcode, addr_width,
+					dummy_bytes);
+	mutex_unlock(&master->mmap_lock_mutex);
+	if (master->auto_runtime_pm)
+		pm_runtime_put(master->dev.parent);
It's a bit worrying that this doesn't sync with the message queue except
via the mutex: this means that we might be out of order with respect to
any asynchronous transfers that are happening on the device.  I'm not
sure that this is a practical problem, though there is some risk of
unfair scheduling that would have to be under extreme load and it might
make sense to prioritise reads anyway.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151104/71e12d1f/attachment.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help