]> git.openfabrics.org - ~emulex/infiniband.git/commit
ARM: 7567/1: io: avoid GCC's offsettable addressing modes for halfword accesses
authorWill Deacon <will.deacon@arm.com>
Fri, 26 Oct 2012 17:42:08 +0000 (18:42 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 29 Oct 2012 10:04:27 +0000 (10:04 +0000)
commit7629a9f661f72eb383fb896e59efea1eac74e882
tree1983cc4138765d367f91f5beb2d656418a16d8bc
parent39141ddfb63a664f26d3f42f64ee386e879b492c
ARM: 7567/1: io: avoid GCC's offsettable addressing modes for halfword accesses

Using the 'o' memory constraint in inline assembly can result in GCC
generating invalid immediate offsets for memory access instructions with
reduced addressing capabilities (i.e. smaller than 12-bit immediate
offsets):

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

As there is no constraint to specify the exact addressing mode we need,
fallback to using 'Q' exclusively for halfword I/O accesses. This may
emit an additional add instruction (using an extra register) in order
to construct the address but it will always be accepted by GAS.

Reported-by: Bastian Hecht <hechtb@googlemail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/io.h