linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Possible regression in arm/io.h
@ 2012-10-24 10:38 Bastian Hecht
  2012-10-24 10:52 ` Will Deacon
  0 siblings, 1 reply; 14+ messages in thread
From: Bastian Hecht @ 2012-10-24 10:38 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Will,

your introduction of the "+Qo" in arch/arm/include/asm/io.h makes some
drivers fail to compile on newer gnu ARM gccs. Like in
drivers/mtd/nand/docg4.c there is an offset of 0x800 from a pointer
used to address I/O memory. This leads to the error message:

/tmp/ccwLMdCy.s: Error: bad immediate value for 8-bit offset (2048)

The gnu gcc people tracked it down to the asm directive "+Qo". Do we
really want to enforce to allow only addresses that are offsetable
with one byte? If I understand it correctly from the gnu gcc docs, the
"o" is doing this.

excerpt from asm/io.h:
static inline void __raw_writew(u16 val, volatile void __iomem *addr)
{
        asm volatile("strh %1, %0"
                     : "+Qo" (*(volatile u16 __force *)addr)
                     : "r" (val));
}

Bug report:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54983

So do we want to remove the "o" from all __raw_readX and __raw_writeX
functions? I've tried it and stuff compiles again without errors.

cheers,

Bastian Hecht

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

end of thread, other threads:[~2012-11-22 10:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-24 10:38 Possible regression in arm/io.h Bastian Hecht
2012-10-24 10:52 ` Will Deacon
2012-10-24 12:34   ` Bastian Hecht
2012-10-24 13:09     ` Will Deacon
2012-10-24 13:35       ` Bastian Hecht
2012-10-24 13:58         ` Will Deacon
2012-10-24 15:04           ` Bastian Hecht
2012-10-24 15:27             ` Will Deacon
2012-11-22  7:57               ` Artem Bityutskiy
2012-11-22 10:19                 ` Will Deacon
2012-11-22 10:23                   ` Artem Bityutskiy
2012-10-25  6:55   ` Artem Bityutskiy
2012-10-25 11:17     ` Will Deacon
2012-10-25 12:35       ` Mikael Pettersson

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).