• Greg Ungerer's avatar
    m68knommu: switch to using asm-generic/uaccess.h · a27bc11f
    Greg Ungerer authored
    Switch to using the asm-generic/uaccess functions for non-MMU builds.
    Remove all the m68knommu local specific uaccess defines and macros.
    
    There is nothing so special about the m68knommu targets that they cannot
    use all of the asm-generic uaccess support. Using the asm-generic
    uaccess definitions also resolves some of the existing problems with
    missing __user annotations in the m68knommu specific functions.
    
    The elimination of all of the contents of uaccess_no.h means we can fold
    the uaccess_mm.h back into uaccess.h - and just have the single file
    now.
    
    The resulting generated code ends up being slightly smaller (by a few
    hundred bytes) due to the compilers ability to better optimize load
    and stores without forcing its hand with asm statements.
    
    Specifically trivial cases like this contrived example:
    
        get_user(x, ptr);
        x++;
        put_user(x, ptr);
    
    end up now being optimized to a single instruction on m68k. More
    generally the compiler can avoid using a temporary register in many
    cases as well.
    Reported-by: default avatarkernel test robot <lkp@intel.com>
    Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarGreg Ungerer <gerg@linux-m68k.org>
    a27bc11f
uaccess.h 10.4 KB