Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1262313

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

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/5] spi: introduce mmap read support for spi flash devices
Date 2015-11-04 15:50 +0100
Message-ID <qr7xT-1HX-5@gated-at.bofh.it> (permalink)
References <qqGHo-1jJ-7@gated-at.bofh.it> <qqGHo-1jJ-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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.

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/5] spi: introduce mmap read support for spi flash devices Vignesh R <vigneshr@ti.com> - 2015-11-03 11:10 +0100
  Re: [PATCH v2 1/5] spi: introduce mmap read support for spi flash devices Michal Suchanek <hramrach@gmail.com> - 2015-11-03 12:30 +0100
    Re: [PATCH v2 1/5] spi: introduce mmap read support for spi flash  devices Vignesh R <vigneshr@ti.com> - 2015-11-04 05:50 +0100
  Re: [PATCH v2 1/5] spi: introduce mmap read support for spi flash  devices Mark Brown <broonie@kernel.org> - 2015-11-04 15:50 +0100
    Re: [PATCH v2 1/5] spi: introduce mmap read support for spi flash  devices Vignesh R <vigneshr@ti.com> - 2015-11-05 13:40 +0100
      Re: [PATCH v2 1/5] spi: introduce mmap read support for spi flash  devices Mark Brown <broonie@kernel.org> - 2015-11-05 16:40 +0100

csiph-web