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:   Mon, 8 Oct 2018 12:21:01 +0200
From:   Boris Brezillon <boris.brezillon@...tlin.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Wolfram Sang <wsa@...-dreams.de>,
        Linux I2C <linux-i2c@...r.kernel.org>,
        Jonathan Corbet <corbet@....net>,
        "open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
        gregkh <gregkh@...uxfoundation.org>,
        Przemyslaw Sroka <psroka@...ence.com>,
        Arkadiusz Golec <agolec@...ence.com>,
        Alan Douglas <adouglas@...ence.com>,
        Bartosz Folta <bfolta@...ence.com>,
        Damian Kos <dkos@...ence.com>,
        Alicja Jurasik-Urbaniak <alicja@...ence.com>,
        Cyprian Wronka <cwronka@...ence.com>,
        Suresh Punnoose <sureshp@...ence.com>,
        Rafal Ciepiela <rafalc@...ence.com>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        Nishanth Menon <nm@...com>, Rob Herring <robh+dt@...nel.org>,
        Pawel Moll <pawel.moll@....com>,
        Mark Rutland <mark.rutland@....com>,
        Ian Campbell <ijc+devicetree@...lion.org.uk>,
        Kumar Gala <galak@...eaurora.org>,
        DTML <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Vitor Soares <Vitor.Soares@...opsys.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Xiang Lin <Xiang.Lin@...aptics.com>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Sekhar Nori <nsekhar@...com>,
        Przemyslaw Gaj <pgaj@...ence.com>,
        Peter Rosin <peda@...ntia.se>, mshettel@...eaurora.org,
        swboyd@...omium.org
Subject: Re: [PATCH v8 07/10] i3c: master: Add driver for Cadence IP

On Mon, 8 Oct 2018 12:06:30 +0200
Arnd Bergmann <arnd@...db.de> wrote:

> On Wed, Oct 3, 2018 at 3:22 PM Boris Brezillon
> <boris.brezillon@...tlin.com> wrote:
> >
> > Add a driver for Cadence I3C master IP.
> >
> > Signed-off-by: Boris Brezillon <boris.brezillon@...tlin.com>
> > ---  
> 
> > Changes in v7:
> > - Fix readsl/writesl() usage
> > - Add a depends on ARM || ARM64 || XTENSA to forbid selection of this
> >   driver on platforms that are not implementing readsl/writesl  
> 
> Most architectures include asm-generic/io.h, which contains a generic
> implementation of readsl(). Maybe that #ifdef could be extended here?
> I remember discussing this with you not so long ago, which led to
> commit 0bbf47eab469 ("ia64: use asm-generic/io.h"). Do we have
> a list of architectures that don't include asm-generic/io.h? Maybe
> the 'depends on' could be for the set of architectures that fail here.

Well, we started patching 2 archs (ia64 and sparc) based on kbuild
robots failure report, and then I received other reports (still from
kbuild robots) long after the initial ones. I can't tell for sure which
archs are not implementing those functions, hence the conservative
approach taken here.

> 
> > +static void cdns_i3c_master_rd_from_rx_fifo(struct cdns_i3c_master *master,
> > +                                           u8 *bytes, int nbytes)
> > +{
> > +       readsl(master->regs + RX_FIFO, bytes, nbytes / 4);
> > +       if (nbytes & 3) {
> > +               u32 tmp = __raw_readl(master->regs + RX_FIFO);
> > +
> > +               memcpy(bytes + (nbytes & ~3), &tmp, nbytes & 3);
> > +       }
> > +}  
> 
> The __raw_readl() is probably correct here (I can't think of any
> architecture on which it is not), but it still makes me feel uneasy
> about possible endianess or other issues.
> 
> Maybe make this:?
> 
>         readsl(master->regs + RX_FIFO, &tmp, 1);

I'm fine with that, assuming it does the same thing :-).

Powered by blists - more mailing lists