All of lore.kernel.org
 help / color / mirror / Atom feed
* Possible regression in arm/io.h
@ 2012-10-24 10:38 ` Bastian Hecht
  0 siblings, 0 replies; 28+ messages in thread
From: Bastian Hecht @ 2012-10-24 10:38 UTC (permalink / raw)
  To: will.deacon; +Cc: linux-mtd, linux-arm-kernel, Artem Bityutskiy

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] 28+ messages in thread

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

Thread overview: 28+ 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:38 ` Bastian Hecht
2012-10-24 10:52 ` Will Deacon
2012-10-24 10:52   ` Will Deacon
2012-10-24 12:34   ` Bastian Hecht
2012-10-24 12:34     ` Bastian Hecht
2012-10-24 13:09     ` Will Deacon
2012-10-24 13:09       ` Will Deacon
2012-10-24 13:35       ` Bastian Hecht
2012-10-24 13:35         ` Bastian Hecht
2012-10-24 13:58         ` Will Deacon
2012-10-24 13:58           ` Will Deacon
2012-10-24 15:04           ` Bastian Hecht
2012-10-24 15:04             ` Bastian Hecht
2012-10-24 15:27             ` Will Deacon
2012-10-24 15:27               ` Will Deacon
2012-11-22  7:57               ` Artem Bityutskiy
2012-11-22  7:57                 ` Artem Bityutskiy
2012-11-22 10:19                 ` Will Deacon
2012-11-22 10:19                   ` Will Deacon
2012-11-22 10:23                   ` Artem Bityutskiy
2012-11-22 10:23                     ` Artem Bityutskiy
2012-10-25  6:55   ` Artem Bityutskiy
2012-10-25  6:55     ` Artem Bityutskiy
2012-10-25 11:17     ` Will Deacon
2012-10-25 11:17       ` Will Deacon
2012-10-25 12:35       ` Mikael Pettersson
2012-10-25 12:35         ` Mikael Pettersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.