[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <10f740e80905040007x38dfcdc5i4a7d351e59db71e9@mail.gmail.com>
Date:	Mon, 4 May 2009 09:07:23 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	linux-arch@...r.kernel.org, Michal Simek <monstr@...str.eu>,
	Remis Lima Baima <remis.developer@...glemail.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 05/27] asm-generic: add generic io.h
On Thu, Nov 6, 2008 at 15:38, Arnd Bergmann <arnd@...db.de> wrote:
> --- /dev/null
> +++ b/include/asm-generic/io.h
> +static inline void insb(unsigned long addr, void *buffer, int count)
> +{
> +       if (count) {
> +               u8 *buf = buffer;
> +               do {
> +                       u8 x = inb(addr);
> +                       *buf++ = x;
> +               } while (--count);
> +       }
> +}
> +
> +static inline void insw(unsigned long addr, void *buffer, int count)
> +{
> +       if (count) {
> +               u16 *buf = buffer;
> +               do {
> +                       u16 x = inw(addr);
> +                       *buf++ = x;
> +               } while (--count);
> +       }
> +}
> +
> +static inline void insl(unsigned long addr, void *buffer, int count)
> +{
> +       if (count) {
> +               u32 *buf = buffer;
> +               do {
> +                       u32 x = inl(addr);
> +                       *buf++ = x;
> +               } while (--count);
> +       }
> +}
> +
> +static inline void outsb(unsigned long addr, const void *buffer, int count)
> +{
> +       if (count) {
> +               const u8 *buf = buffer;
> +               do {
> +                       outb(*buf++, addr);
> +               } while (--count);
> +       }
> +}
> +
> +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?
> +/*
> + * Change "struct page" to physical address.
> + */
Which `struct page'?
> +static inline void *__ioremap(unsigned long offset, unsigned long size,
> +                             unsigned long flags)
> +{
> +       return (void *) offset;
> +}
> +
> +static inline void *ioremap(unsigned long offset, unsigned long size)
> +{
> +       return (void *) offset;
> +}
Gr{oetje,eeting}s,
						Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
Powered by blists - more mailing lists
 
