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]
Message-ID: <2578061.XAFRqVoOGU@benoit.monin>
Date: Thu, 06 Nov 2025 11:46:53 +0100
From: Benoît Monin <benoit.monin@...tlin.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Andi Shyti <andi.shyti@...nel.org>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
 Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
 Mika Westerberg <mika.westerberg@...ux.intel.com>,
 Jan Dabros <jsd@...ihalf.com>,
 Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
 Clark Williams <clrkwllms@...nel.org>, Steven Rostedt <rostedt@...dmis.org>,
 Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
 Gregory CLEMENT <gregory.clement@...tlin.com>,
 Théo Lebrun <theo.lebrun@...tlin.com>,
 Tawfik Bayouk <tawfik.bayouk@...ileye.com>,
 Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>,
 Dmitry Guzman <dmitry.guzman@...ileye.com>, linux-i2c@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-rt-devel@...ts.linux.dev
Subject:
 Re: [PATCH v2 2/5] i2c: designware: Optimize flag reading in i2c_dw_read()

Hi Andy,

On Friday, 31 October 2025 at 15:48:50 CET, Andy Shevchenko wrote:
> On Fri, Oct 31, 2025 at 03:35:40PM +0100, Benoît Monin wrote:
> > Optimize the i2c_dw_read() function by reading the message flags only
> > once per message, rather than for every byte.
> > 
> > The message index is only modified by the outer loop, so reading the
> > flags in the inner loop was always getting the same value.
> 
> Does it affect the binary (compiled) file?
> 
Yes it does. On the mips64 system I am testing this on, built with gcc11,
i2c_dw_process_transfer() which inline i2c_dw_read() get 16 bytes shorter.
 
Looking at the disassembled code, the flags was read in the inner loop prior
to the patch.

Best regards,
-- 
Benoît Monin, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ