]> git.baikalelectronics.ru Git - kernel.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)
commitaee3fba594c33bcca1d5d3e361748f82f37b5411
tree1983cc4138765d367f91f5beb2d656418a16d8bc
parent2ec0c86030a14c1e28b8be589c00ac430fbfd788
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