[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 7 Jul 2015 12:27:43 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Russell King - ARM Linux <linux@....linux.org.uk>
Cc: "Luis R. Rodriguez" <mcgrof@...e.com>,
Christoph Hellwig <hch@....de>,
Andy Lutomirski <luto@...capital.net>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Julia Lawall <julia.lawall@...6.fr>,
Dan Williams <dan.j.williams@...el.com>,
Arnd Bergmann <arnd@...db.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ross Zwisler <ross.zwisler@...ux.intel.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Juergen Gross <jgross@...e.com>, X86 ML <x86@...nel.org>,
"Kani, Toshimitsu" <toshi.kani@...com>,
"linux-nvdimm@...ts.01.org" <linux-nvdimm@...1.01.org>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Stefan Bader <stefan.bader@...onical.com>,
Linux MM <linux-mm@...ck.org>,
Ralf Baechle <ralf@...ux-mips.org>,
Henrique de Moraes Holschuh <hmh@....eng.br>,
Michael Ellerman <mpe@...erman.id.au>,
Tejun Heo <tj@...nel.org>, Paul Mackerras <paulus@...ba.org>,
"Luis R. Rodriguez" <mcgrof@...not-panic.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v5 2/6] arch: unify ioremap prototypes and macro aliases
On Tue, Jul 7, 2015 at 12:13 PM, Russell King - ARM Linux
<linux@....linux.org.uk> wrote:
> Another issue is... the use of memcpy()/memset() directly on memory
> returned from ioremap*(). The pmem driver does this. This fails sparse
> checks. However, years ago, x86 invented the memcpy_fromio()/memcpy_toio()
> memset_io() functions, which took a __iomem pointer (which /presumably/
> means they're supposed to operate on the memory associated with an
> ioremap'd region.)
>
> Should these functions always be used for mappings via ioremap*(), and
> the standard memcpy()/memset() be avoided? To me, that sounds like a
> very good thing, because that gives us more control over the
> implementation of the functions used to access ioremap'd regions,
> and the arch can decide to prevent GCC inlining its own memset() or
> memcpy() code if desired.
Yes they should. Not doing that is a typical portability bug (works on x86,
not everywhere).
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
--
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