• J
    MIPS: mipsregs.h: Add read const Cop0 macros · cd1e0737
    James Hogan 提交于
    Some Cop0 registers are constant and have no side effects when read.
    There is no need for the inline asm to read these to be marked
    __volatile__, and doing so prevents them from being removed by the
    compiler.
    
    Add a few new accessor macros to handle these registers more efficiently
    (especially for the sake of running in a guest where redundant access to
    the register may trap to the hypervisor):
      __read_const_32bit_c0_register()
      __read_const_64bit_c0_register()
      __read_const_ulong_c0_register()
    Signed-off-by: NJames Hogan <jhogan@kernel.org>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: Maciej W. Rozycki <macro@mips.com>
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/17922/
    cd1e0737
mipsregs.h 88.7 KB