[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6508070.FGfEk39Nmq@wuerfel>
Date: Tue, 15 Jul 2014 11:22:54 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Ley Foon Tan <lftan@...era.com>
Cc: linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, lftan.linux@...il.com,
cltang@...esourcery.com
Subject: Re: [PATCH v2 06/29] nios2: I/O Mapping
On Tuesday 15 July 2014 16:45:33 Ley Foon Tan wrote:
> +#ifdef __IO_USE_DUFFS
> +
> +/* Use "Duff's Device" to unroll the loops. */
> +#define __IO_OUT_LOOP(a, b, l) \
> + do { \
The I/O loops can probably better go into the C file that uses them.
> +
> +/*
> + * PCI is not enabled in nios2. Provide dummy implementation to get 'allyesconfig'
> + * to build successfully.
> + */
> +#define inb(addr) 0
> +#define inw(addr) 0
> +#define inl(addr) 0
> +#define outb(x, addr)
> +#define outw(x, addr)
> +#define outl(x, addr)
These should either use inline functions or macros that behave like them,
to avoid miscompilation. The normal way to define those macros is
#define inb(a) ({ 0; })
#define outb(x, a) do { } while (0)
> +static inline void __iomem *ioremap_writethrough(unsigned long physaddr,
> + unsigned long size)
> +{
> + return __ioremap(physaddr, size, 0);
> +}
ioremap_writethrough() is not a standard interface, just drop it.
> +static inline void __iomem *ioremap_fullcache(unsigned long physaddr,
> + unsigned long size)
> +{
> + return __ioremap(physaddr, size, _PAGE_CACHED);
> +}
This is more commonly called ioremap_cache().
ioremap_fullcache() is defined on some architectures but never used. If
you don't use this in your own code, you can drop it as well.
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