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, 4 May 2009 12:48:28 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	linux-arch@...r.kernel.org, Michal Simek <monstr@...str.eu>,
	Remis Lima Baima <remis.developer@...glemail.com>,
	linux-kernel@...r.kernel.org, David Howells <dhowells@...hat.com>
Subject: Re: [PATCH 05/27] asm-generic: add generic io.h

io.h is more or less a straight copy from the mn10300 code,
so maybe David Howells is interested in this as well.

On Monday 04 May 2009, Geert Uytterhoeven wrote:
> On Thu, Nov 6, 2008 at 15:38, Arnd Bergmann <arnd@...db.de> wrote:
> > +static inline void outsw(unsigned long addr, const void *buffer, int count)
> > +{
> > +       if (count) {
> > +               const u16 *buf = buffer;
> > +               do {
> > +                       outw(*buf++, addr);
> > +               } while (--count);
> > +       }
> > +}
> > +
> > +static inline void outsl(unsigned long addr, const void *buffer, int count)
> > +{
> > +       if (count) {
> > +               const u32 *buf = buffer;
> > +               do {
> > +                       outl(*buf++, addr);
> > +               } while (--count);
> > +       }
> > +}
> 
> Do we ever call these with count == 0?

I don't think it can, but code is still more correct if it can handle it.
It could of course be written as

	const u32 *buf;
	for (buf = buffer; count; count--)
		outl(*buf++, addr);


> > +/*
> > + * Change "struct page" to physical address.
> > + */
> 
> Which `struct page'?

I can change the comment to what avr32 and m32r have:

arch/avr32/include/asm/io.h-/*
arch/avr32/include/asm/io.h: * ioremap  -   map bus memory into CPU space
arch/avr32/include/asm/io.h- * @offset  bus address of the memory
arch/avr32/include/asm/io.h- * @size    size of the resource to map
arch/avr32/include/asm/io.h- *
arch/avr32/include/asm/io.h: * ioremap performs a platform specific sequence of operations to make
arch/avr32/include/asm/io.h- * bus memory CPU accessible via the readb/.../writel functions and
arch/avr32/include/asm/io.h- * the other mmio helpers. The returned address is not guaranteed to
arch/avr32/include/asm/io.h- * be usable directly as a virtual address.
arch/avr32/include/asm/io.h- */


	Arnd <><
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ