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: <20210224173649.GA10809@amd>
Date:   Wed, 24 Feb 2021 18:36:50 +0100
From:   Pavel Machek <pavel@....cz>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     Álvaro Fernández Rojas <noltari@...il.com>,
        Dan Murphy <dmurphy@...com>, linux-leds@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] leds: bcm6328: improve write and read functions

Hi!

> >> Yeah, but ideally you should not be copying comments; there should be
> >> one central place which does it and does it right.
> > 
> > I’m open to suggestions :).
> > Which central place would be a good place for you?
> 
> I did consider creating an include/linux/brcm/brcm_io.h header or
> something like that but I am really not sure what the benefit would
> be.

Less code duplication? It is immediately clear that driver including
this is specific for brcm SoCs and would not try to work somewhere else?

> As far as using _relaxed() this is absolutely correct because the bus
> logic that connects the CPU to its on-chip registers is non re-ordering
> non posted. That is true on the MIPS BE/LE and ARM when configured in LE
> or BE.

If that's right on particular SoC, then _relaxed and normal versions
should be same; drivers still need to use normal versions, because
they may be running on different SoC...?

> We need the swapping for ARM because when running in ARM BE32, the data
> is going to be in the host CPU endian, but the register bus is hard
> wired to little endian.

Yeah I see you need to do some byteswapping. But I'm pretty sure not
all MIPS BE boxes do the magic swapping, right? And drivers/leds is
not a place where you encode knowledge about SoC byte swapping.

Best regards,
								Pavel
-- 
http://www.livejournal.com/~pavelmachek

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ