Re: [PATCH 2/3] m68k: Switch to asm-generic/barrier.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Finn,

On Wed, Feb 5, 2014 at 2:03 AM, Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx> wrote:
On Tue, 4 Feb 2014, Geert Uytterhoeven wrote:
The generic nop() implementation is fine for m68k.

If the barrier in the old nop() implementation isn't needed anymore,
perhaps we should also remove the nop() instances in macfb.c? One comment
from this file says, "the nop's are there to order writes". (I don't know
whether there is any timing issue here. Seeing the way nop() was sprinkled
through macfb.c, I doubt that there is.) Is the volatile casting in
nubus_writeb() aka raw_outb() aka out_8() equivalent to the old barrier?

barrier() does:

#define barrier() __asm__ __volatile__("": : :"memory")

I.e. it prevents gcc from:
  1. Reordering instructions due to the volatile,
  2. Caching data in registers due to the "memory".

nop() still has the former, while the volatile casting in the I/O macros
should have the same effect as the latter.

So yes, I think they can be removed. Can you test that, please?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux