• Jose Abreu's avatar
    ARC: io.h: Implement reads{x}()/writes{x}() · 10d44343
    Jose Abreu authored
    Some ARC CPU's do not support unaligned loads/stores. Currently, generic
    implementation of reads{b/w/l}()/writes{b/w/l}() is being used with ARC.
    This can lead to misfunction of some drivers as generic functions do a
    plain dereference of a pointer that can be unaligned.
    
    Let's use {get/put}_unaligned() helpers instead of plain dereference of
    pointer in order to fix. The helpers allow to get and store data from an
    unaligned address whilst preserving the CPU internal alignment.
    According to [1], the use of these helpers are costly in terms of
    performance so we added an initial check for a buffer already aligned so
    that the usage of the helpers can be avoided, when possible.
    
    [1] Documentation/unaligned-memory-access.txt
    
    Cc: Alexey Brodkin <abrodkin@synopsys.com>
    Cc: Joao Pinto <jpinto@synopsys.com>
    Cc: David Laight <David.Laight@ACULAB.COM>
    Tested-by: default avatarVitor Soares <soares@synopsys.com>
    Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
    Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
    10d44343
Name
Last commit
Last update
..
boot Loading commit data...
configs Loading commit data...
include Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
oprofile Loading commit data...
plat-axs10x Loading commit data...
plat-eznps Loading commit data...
plat-hsdk Loading commit data...
plat-sim Loading commit data...
plat-tb10x Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
Kconfig.debug Loading commit data...
Makefile Loading commit data...