Re: [REPOST PATCH] gbefb: cmap FIFO timeout

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

 



On Wed, 30 Jul 2008 00:12:04 +0200 (CEST)
Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx> 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.


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux