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] [thread-next>] [day] [month] [year] [list]
Date: Wed, 24 Jan 2024 15:28:32 +0000
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Mark Brown <broonie@...nel.org>, Jonas Gorski <jonas.gorski@...il.com>
CC: Guenter Roeck <linux@...ck-us.net>, Herve Codina
	<herve.codina@...tlin.com>, Amit Kumar Mahapatra
	<amit.kumar-mahapatra@....com>, "linux-spi@...r.kernel.org"
	<linux-spi@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, Thomas Petazzoni
	<thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH] spi: Raise limit on number of chip selects



Le 24/01/2024 à 15:59, Mark Brown a écrit :
> On Wed, Jan 24, 2024 at 02:41:03PM +0100, Jonas Gorski wrote:
> 
>> For some reason we don't store neither the actual number of supported
>> parallel chipselects in the controller, nor the amount of chipselects
>> used by the spi device, so all loops always  need to iterate
>> SPI_CS_CNT_MAX times and check for the chipselect numbers not being
>> 0xff instead of limiting by the (possible to know) actual number of
>> chip selects in use.
> 
> Yes, we really can do a lot better here if we keep a bit more data
> around.

When I see all those loops over SPI_CS_CNT_MAX I have the feeling it 
could have been done a lot easier, for instance by using bitmaps.

Should we revert that commit 4d8ff6b0991d ("spi: Add multi-cs memories 
support in SPI core") and implement something simpler ?

Also have the impression that the commit is doing several things at once 
and should have been split in several commits, for instance that 'if 
((of_property_read_bool(nc, "parallel-memories")) ' stuff seems 
unrelated to the implementation of the generic support of multi-chipselects.

Christophe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ