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: <ZAWobtBuBYBng6s+@MiWiFi-R3L-srv>
Date:   Mon, 6 Mar 2023 16:46:38 +0800
From:   Baoquan He <bhe@...hat.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     linux-kernel@...r.kernel.org,
        Linux-Arch <linux-arch@...r.kernel.org>, linux-mm@...ck.org,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Luis Chamberlain <mcgrof@...nel.org>,
        Christoph Hellwig <hch@...radead.org>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Helge Deller <deller@....de>,
        Serge Semin <fancer.lancer@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Huacai Chen <chenhuacai@...nel.org>,
        Jiaxun Yang <jiaxun.yang@...goat.com>,
        linux-mips@...r.kernel.org
Subject: Re: [PATCH v3 1/2] mips: add <asm-generic/io.h> including

On 03/03/23 at 01:40pm, Arnd Bergmann wrote:
> On Fri, Mar 3, 2023, at 11:28, Baoquan He wrote:
> > With the adding, some default ioremap_xx methods defined in
> > asm-generic/io.h can be used. E.g the default ioremap_uc() returning
> > NULL.
> >
> > Signed-off-by: Baoquan He <bhe@...hat.com>
> > Cc: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
> > Cc: Geert Uytterhoeven <geert@...ux-m68k.org>
> > Cc: Helge Deller <deller@....de>
> > Cc: Serge Semin <fancer.lancer@...il.com>
> > Cc: Florian Fainelli <f.fainelli@...il.com>
> > Cc: Huacai Chen <chenhuacai@...nel.org>
> > Cc: Jiaxun Yang <jiaxun.yang@...goat.com>
> > Cc: linux-mips@...r.kernel.org
> 
> Reviewed-by: Arnd Bergmann <arnd@...db.de>
> 
> I think this is all good. I had look at what cleanups we could do as
> follow-ups:

Thanks a lot for careful reviewing and great suggestions.

> 
> > +#define phys_to_virt phys_to_virt
> >  static inline void * phys_to_virt(unsigned long address)
> >  {
> >  	return __va(address);
> 
> This is the same as the asm-generic version, so the mips definition
> is no longer needed.

Agree, I can clean this up with a followup patch.

> 
> > @@ -359,6 +360,27 @@ __BUILD_MEMORY_PFX(__raw_, q, u64, 0)
> >  __BUILD_MEMORY_PFX(__mem_, q, u64, 0)
> >  #endif
> > 
> > +#define readb readb
> > +#define readw readw
> > +#define readl readl
> > +#define writeb writeb
> > +#define writew writew
> > +#define writel writel
> > +
> > +#ifdef CONFIG_64BIT
> > +#define readq readq
> > +#define writeq writeq
> > +#define __raw_readq __raw_readq
> > +#define __raw_writeq __raw_writeq
> > +#endif
> > +
> > +#define __raw_readb __raw_readb
> > +#define __raw_readw __raw_readw
> > +#define __raw_readl __raw_readl
> > +#define __raw_writeb __raw_writeb
> > +#define __raw_writew __raw_writew
> > +#define __raw_writel __raw_writel
> 
> The mips code defines the __raw variants with slightly different
> semantics on both barriers and byteswap, which makes it impractical
> to share any of the above.				
> 
> > +#define memset_io memset_io
> >  static inline void memset_io(volatile void __iomem *addr, unsigned 
> > char val, int count)
> >  {
> >  	memset((void __force *) addr, val, count);
> >  }
> > +#define memcpy_fromio memcpy_fromio
> >  static inline void memcpy_fromio(void *dst, const volatile void 
> > __iomem *src, int count)
> >  {
> >  	memcpy(dst, (void __force *) src, count);
> >  }
> > +#define memcpy_toio memcpy_toio
> 
> These are again the same as the generic version

OK, can remove this with the above change.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ