public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* write ordering and macfb nop() usage
@ 2008-10-14 16:56 Finn Thain
  2008-10-14 22:04 ` Brad Boyer
  0 siblings, 1 reply; 4+ messages in thread
From: Finn Thain @ 2008-10-14 16:56 UTC (permalink / raw)
  To: linux-m68k


Hi All,

I've been working on macfb.c, and I notice that it is full of stuff like 
this:

        /* the nop's are there to order writes. */
        nubus_writeb(_regno, &cmap_regs->addr); nop();
        nubus_writeb(_red, &cmap_regs->lut);    nop();
        nubus_writeb(_green, &cmap_regs->lut);  nop();
        nubus_writeb(_blue, &cmap_regs->lut);

Timing aside, I don't see what are the nop's are for. I thought accessors 
like nubus_write/raw_out/out are intended to issue these writes in order 
anyway?

And why were nop's were used instead of an empty asm() or just a volatile 
qualifier anyway? Some accident of history like a compiler bug?

Also, can a nop provide a useful timing constraint when bus speed can vary 
so much from one machine to another?

I'm baffled.

Finn

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-10-15 19:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-14 16:56 write ordering and macfb nop() usage Finn Thain
2008-10-14 22:04 ` Brad Boyer
2008-10-15 15:01   ` Finn Thain
2008-10-15 19:08     ` Brad Boyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox