FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 07-14-2010, 01:09 PM
Catalin Marinas
 
Default Second "Linaro kernel merge result of the moment"aka "arm_next" published

On Wed, 2010-07-14 at 07:05 +0100, John Rigby wrote:
> Here is an update. First, I am still getting errors of the form:
>
> /home/jcrigby/work/git-trees/kernelbuild/linux/drivers/mtd/onenand/onenand_sim.c:142:
> error: expected expression before 'do'
>
> The 'do' here is from arch/arm/include/asm/io.h:
> #define writew(v,c) do { wmb(); writew_relaxed(v,c); }
> while (0)
>
> That looks ok until you find out how it is used in
> drivers/mtd/onenand/onenand_sim.c:
>
> #define ONENAND_SET_WP_STATUS(v, this)
>
> (writew(v, this->base + ONENAND_REG_WP_STATUS))
>
> The parens around it make the valid statement into an invalid
> expression.

This was discussed recently on the ARM Linux list. The conclusion was
that using brackets around writew() is dangerous as it gives writew() a
type and the compiler may generate code which forces a read back from
the register being written. Using inline functions for writew() has some
performance impact (it seems to add around 78K in size to the Linux
kernel).

So we could change the driver above to remove the brackets but any other
suggestion is welcome.

--
Catalin


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 07:00 AM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org