]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/io: Allow I/O writes to use {W,X}ZR
authorRobin Murphy <robin.murphy@arm.com>
Thu, 8 Sep 2016 10:02:20 +0000 (11:02 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 8 Sep 2016 10:04:13 +0000 (11:04 +0100)
commit67cc4fb6dff6b00f706ad5e3136fbe1c02d7b636
tree215fee038e2e7a2a8e864495c867205b59828215
parentd9c453ecda9817db775ed0505ccd1de1ccd6f50b
arm64/io: Allow I/O writes to use {W,X}ZR

When zeroing an I/O location, the current accessors are forced to
allocate a temporary register to store the zero for the write. By
tweaking the assembly constraints, we can allow the compiler to use
the zero register directly in such cases, and save some juggling.
Compiling a representative kernel configuration with GCC 6 shows
that 2.3KB worth of code can be wasted just on that!

  text     data    bss      dec      hex     filename
 13316776 3248256 18176769 34741801 2121e29 vmlinux.o.new
 13319140 3248256 18176769 34744165 2122765 vmlinux.o.old

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/io.h