[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdU1d8T=A2dM8rY86xrZ5WYj9pLme6pc08ypxwCAUC123g@mail.gmail.com>
Date: Fri, 13 Dec 2013 20:17:46 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Fwd: [PATCH 3/4] arch: Clean up asm/barrier.h implementations using asm-generic/barrier.h
Woops, misspelling of kernel.org in the original email...
---------- Forwarded message ----------
From: Geert Uytterhoeven <geert@...ux-m68k.org>
Date: Fri, Dec 13, 2013 at 8:16 PM
Subject: Re: [PATCH 3/4] arch: Clean up asm/barrier.h implementations
using asm-generic/barrier.h
To: Peter Zijlstra <peterz@...radead.org>
Cc: Linux-Arch <linux-arch@...r.kernel.org>,
linux-kernel@...r.kerne.org, Paul McKenney
<paulmck@...ux.vnet.ibm.com>, Linus Torvalds
<torvalds@...ux-foundation.org>, Victor Kaplansky
<VICTORK@...ibm.com>, Oleg Nesterov <oleg@...hat.com>, Anton Blanchard
<anton@...ba.org>, Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Frédéric Weisbecker <fweisbec@...il.com>, Mathieu Desnoyers
<mathieu.desnoyers@...ymtl.ca>, Michael Ellerman
<michael@...erman.id.au>, Michael Neuling <mikey@...ling.org>, Russell
King <linux@....linux.org.uk>, Martin Schwidefsky
<schwidefsky@...ibm.com>, Heiko Carstens <heiko.carstens@...ibm.com>,
Tony Luck <tony.luck@...el.com>
Hi Peter,
On Fri, Dec 13, 2013 at 3:57 PM, Peter Zijlstra <peterz@...radead.org> wrote:
> There are a few architectures (m32r, m68k) that could probably
> do away with their barrier.h file entirely but are kept for now due to
> their unconventional nop() implementation.
m32r uses `__asm__ __volatile__ ("nop" : : )' instead of
`asm volatile ("nop")'. Isn't the latter just a shorthand of the former?
m68k has an additional `barrier()', which I think is unneeded.
I looked at the asm output for drivers/block/ataflop.c and
drivers/video/macfb.c, with and without the barrier.
For ataflop, there were no differences.
For macfb, removing the barrier allowed the compiler to keep the base
addresses of the MMIO registers in registers, but there were no changes
to the register accesses themselves.
So IMHO both m32r and m68k can switch to the asm-generic version.
I'm wondering whether we can just drop nop() from the in-kernel API?
There are few users outside arch/:
drivers/block/ataflop.c
drivers/net/ethernet/amd/am79c961a.c
drivers/tty/serial/crisv10.c
drivers/video/macfb.c
>From a quick glance, all of them (ab)use nop() instead of one of the other
primitives. For the macfb case, it seems to be due to missing ordering
inside the nubus_*() I/O accessors.
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
--
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