lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120210110618.GB3056@opensource.wolfsonmicro.com>
Date:	Fri, 10 Feb 2012 11:06:19 +0000
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Laxman Dewangan <ldewangan@...dia.com>
Cc:	gregkh@...uxfoundation.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH V1] regmap: add bulk_write() for non-volatile register set

On Fri, Feb 10, 2012 at 02:43:43PM +0530, Laxman Dewangan wrote:

Please remember to delete unnneded context from your mails, it makes it
much easier to find what you're saying.

> So I am going to allocate buffer for some size, initially
> min(val_bytes * max_register, 128) bytes, and in bulk_write(), if
> require buffer is more than 128 then re-alloc buffer which is now
> (req_size + 128).
> And then copy the data into this buffer, modify it and send to device.

What I'd suggest doing as a first pass is just allocating the buffer
each time, anything else is a performance optimisation we can worry
about incrementally.  Remember, this only has to be faster than I2C most
of the time and I2C is really slow.  For your case with 8 byte values
there's an even better optimisation which is to notice that we don't
need to swap at all and just use the original buffer directly.

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ