[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPcyv4i7Sfo54koFC-KB+=YaBZpbW1dndp+DFJhwptFSTpfSVA@mail.gmail.com>
Date: Tue, 21 Jul 2015 09:08:56 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Christoph Hellwig <hch@....de>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>, linux-arch@...r.kernel.org,
Tony Luck <tony.luck@...el.com>,
Russell King - ARM Linux <linux@....linux.org.uk>,
Arnd Bergmann <arnd@...db.de>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Luis Rodriguez <mcgrof@...e.com>, X86 ML <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ralf Baechle <ralf@...ux-mips.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
"Kani, Toshimitsu" <toshi.kani@...com>,
Ross Zwisler <ross.zwisler@...ux.intel.com>,
kbuild test robot <fengguang.wu@...el.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 05/10] arch: unify ioremap prototypes and macro aliases
On Tue, Jul 21, 2015 at 6:34 AM, Christoph Hellwig <hch@....de> wrote:
>
> On Sun, Jul 19, 2015 at 08:18:00PM -0400, Dan Williams wrote:
> > Some archs define the first parameter to ioremap() as unsigned long,
> > while the balance define it as resource_size_t, similar confusion exists
> > for the type of the 'size' parameter. Unify on (resource_size_t,
> > unsigned long) to enable passing ioremap function pointers. Also, some
> > archs use function-like macros for defining ioremap aliases, but
> > asm-generic/io.h expects object-like macros, unify on the latter.
> >
> > Move all handling of ioremap aliasing (i.e. ioremap_wt => ioremap) to
> > include/linux/io.h. Add a check to lib/devres.c to warn at compile time
> > if an arch violates type expectations.
>
> I don't think devres really has aything to do with this code.
It's one of the only cross-arch C files that is built with HAS_IOMEM.
It depends on having a common ioremap prototype later in the series.
> > Kill ARCH_HAS_IOREMAP_WC and ARCH_HAS_IOREMAP_WT in favor of just
> > testing for ioremap_wc, and ioremap_wt being defined. This arrangement
> > allows drivers to know when ioremap_<foo> are being re-directed to plain
> > ioremap. A later patch uses this arrangement to implement support for
> > strict mappings.
> >
> > Acked-by: Christoph Hellwig <hch@....de>
>
> I only ACKed this as a band-aid to get the pmem code in. Now that
> we got that in with a less invasive hack I don't see any reasons to
> do this over doing the proper common prototypes and per-arch runtime checks
> of flags variant.
That's not too much of a setback. I had already started to realize
that nobody really wants the ioremap_<type> variants compared to
memremap. So rather than introduce this cleanup and deprecate
ioremap_<type> over time, let's just skip a step and start converting
to memremap() with a proper 'flags' parameter for the mapping-type
right away
--
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