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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53AAA5AC.5070707@pengutronix.de>
Date:	Wed, 25 Jun 2014 12:34:20 +0200
From:	Marc Kleine-Budde <mkl@...gutronix.de>
To:	David Laight <David.Laight@...LAB.COM>,
	"'bhupesh.sharma@...escale.com'" <bhupesh.sharma@...escale.com>,
	"linux-can@...r.kernel.org" <linux-can@...r.kernel.org>
CC:	"wg@...ndegger.com" <wg@...ndegger.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: can: Remodel FlexCAN register read/write APIs for
 BE instances

On 06/25/2014 12:29 PM, David Laight wrote:
>> Ok. Or should I create two functions for read and write - one does it in LE way and the other
>> in BE way and parse the DT to understand which endianness the module supports.
> 
> An indirect call is likely to be slower than a conditional.
> The conditional inside a non-inlined function is likely to get
> predicted correctly on any code paths that matter.
> Unfortunately using a real function increases register pressure.
> 
> Maybe a compile-time option for BE, LE or both.
> So a 'generic' kernel can work, but a SoC specific one will be faster.
> Then have the driver load/attach/init fail if it is the wrong endianness.

Don't overengineer, CAN is max 1 MiB/s.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ