linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@linux-mips.org,
	linux-fbdev-devel@lists.sourceforge.net, adaplas@gmail.com
Subject: Re: [REPOST PATCH] gbefb: cmap FIFO timeout
Date: Tue, 29 Jul 2008 17:37:45 -0700	[thread overview]
Message-ID: <20080729173745.7428ce62.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080729221204.25D97C2F34@solo.franken.de>

On Wed, 30 Jul 2008 00:12:04 +0200 (CEST)
Thomas Bogendoerfer <tsbogend@alpha.franken.de> wrote:

> +static void gbe_loadcmap(void)
> +{
> +	int i, j;
> +
> +	for (i = 0; i < 256; i++) {
> +		for (j = 0; j < 1000 && gbe->cm_fifo >= 63; j++)
> +			udelay(10);
> +		if (j == 1000)
> +			printk(KERN_ERR "gbefb: cmap FIFO timeout\n");
> +
> +		gbe->cmap[i] = gbe_cmap[i];
> +	}
>  }

This is polling the hardware, yes?

I'd have thought there's a terrible risk of the compiler "optimising"
the read of gbe->cm_fifo.  Shouldn't we be using readl() here?

<looks>

oh.  It's declared volatile.  ugh.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

      reply	other threads:[~2008-07-30  0:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-29 22:12 [REPOST PATCH] gbefb: cmap FIFO timeout Thomas Bogendoerfer
2008-07-30  0:37 ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080729173745.7428ce62.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=adaplas@gmail.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-mips@linux-mips.org \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).